GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: use openssl's own memory BIOs in crypto_context.cc by GauriSpears · Pull Request #47160 · nodejs/node

Conversation

@GauriSpears

@GauriSpears GauriSpears commented Mar 19, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

NodeBIO's memory buffer structure does not support BIO_C_FILE_SEEK and B IO_C_FILE_TELL. This prevents OpenSSL PEM_read_bio_PrivateKey from readi ng some private keys. So I switched to OpenSSL's own protected memory bu ffers.

Fixes: #47008

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot

nodejs-github-bot commented Mar 19, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Mar 19, 2023
bnoordhuis
bnoordhuis reviewed Mar 19, 2023
View reviewed changes
Comment thread src/crypto/crypto_context.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 19, 2023

Copy link
Copy Markdown
Contributor Author

There was an error requiring running CLANG_FORMAT_START=$(git merge-base HEAD main) make format-cpp
I ran the command and re-commited everything. Hope it will help,

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears
GauriSpears requested a review from bnoordhuis March 19, 2023 15:52
@GauriSpears

GauriSpears commented Mar 20, 2023

Copy link
Copy Markdown
Contributor Author

Please help! I ran the CLANG_FORMAT_START=$(git merge-base HEAD main) make format-cpp several times and updated commits, but I got the Linters / format-cpp error again. What should I do?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bnoordhuis
bnoordhuis reviewed Mar 20, 2023
View reviewed changes
Comment thread src/crypto/crypto_context.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 20, 2023

Copy link
Copy Markdown
Contributor Author

Oh, thanks a lot!

bnoordhuis reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Mar 20, 2023

Copy link
Copy Markdown
Member

This prevents OpenSSL PEM_read_bio_PrivateKey from readi ng some private keys.

Is it possible to add a test for this? That feels necessary for a change like this (otherwise a future PR that undoes these changes with the goal of simplifying code probably also has a good chance of being approved).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 20, 2023

Copy link
Copy Markdown
Contributor Author

This prevents OpenSSL PEM_read_bio_PrivateKey from readi ng some private keys.

Is it possible to add a test for this? That feels necessary for a change like this (otherwise a future PR that undoes these changes with the goal of simplifying code probably also has a good chance of being approved).

I can give you a test key but you have to install gost-engine (additional OpenSSL engine) to check it...
Maybe we should test that BIO created with LoadBIO must support BIO_seek?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 21, 2023

Copy link
Copy Markdown
Contributor Author

I've tried environment without gost-engine installed and found that I can't make TLS connection but I can create secure context with my key (it fails without my patch and successes with it). So I'll try to write a test.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 21, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

By the way, what is a reason to statically link OpenSSL during Node.JS compilation by default? I mean that's somehow weird that in the rest of platform you can load any openssl config with --openssl-config option, load any engine with crypto.setEngine, but, for example, tls part is statically linked to a certain OpenSSL.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 21, 2023

Copy link
Copy Markdown
Member

If you've ever tried to ship a dynamically linked binary across a multitude of platforms and distros, you know the answer. ^_^

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 22, 2023

Copy link
Copy Markdown
Contributor Author

This prevents OpenSSL PEM_read_bio_PrivateKey from readi ng some private keys.

Is it possible to add a test for this? That feels necessary for a change like this (otherwise a future PR that undoes these changes with the goal of simplifying code probably also has a good chance of being approved).

Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 22, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

If you've ever tried to ship a dynamically linked binary across a multitude of platforms and distros, you know the answer. ^_^

I just wonder why statically linked Node.JS does support engines in crypto.createSign but not in tls.connect.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 22, 2023

Copy link
Copy Markdown
Member

It does. Not sure where you get that notion from but clientCertEngine etc. work in both statically and dynamically linked builds.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 22, 2023

Copy link
Copy Markdown
Contributor Author

Haha) tls.getCiphers() doesn't see additional ciphers until OpenSSL is dynamically linked, Looks like there will be another investigation and another issue))

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 22, 2023

Copy link
Copy Markdown
Member

Oh, is that what you mean. That's indeed a separate issue but the reason is simple: SSL_get_ciphers() is called once and the result is cached. If you call it before your engine is loaded, you won't see any of the new ciphers it adds.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 22, 2023

Copy link
Copy Markdown
Contributor Author

So do you need more of my help to approve this PL?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bnoordhuis
bnoordhuis reviewed Mar 22, 2023
View reviewed changes
Comment thread test/parallel/test-tls-secure-context-bio.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 22, 2023

Copy link
Copy Markdown
Member
/home/runner/work/node/node/test/parallel/test-tls-secure-context-bio.js
Error:    9:7   error  'assert' is assigned a value but never used    no-unused-vars
Error:   23:31  error  Newline required at end of file but not found  eol-last
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 22, 2023

Copy link
Copy Markdown
Contributor Author

Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 22, 2023

Copy link
Copy Markdown
Contributor Author

Ok, it looks like my test fails on some configurations. I'll investigate further and rewrite it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@quickdevel

quickdevel commented Mar 23, 2023

Copy link
Copy Markdown

Test failed because specified key cannot be processed without gost-engine.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 23, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Test failed because specified key cannot be processed without gost-engine.

Yep) I understood it, that's why now I'm rewriting the test. The trick was that Node.js with statically linked OpenSSL loads engine even without "crypto.setEngine" so I was sure that engine would be needed later to create connection but not to load a .pem. That's another oddity, I wrote about it in issue #43653 .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 24, 2023

Copy link
Copy Markdown
Contributor Author

OK, I've rewritten test. It's rather low-level but works.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

Hi! Could you re-run workflows please?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented Mar 29, 2023

Copy link
Copy Markdown
Contributor Author

@bnoordhuis Should I fix anything else?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 17, 2023
@nodejs-github-bot

nodejs-github-bot commented May 17, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/51849/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GauriSpears

GauriSpears commented May 18, 2023

Copy link
Copy Markdown
Contributor Author

I've added the commit-queue label but I'm not 100% sure if the bot will merge it when the CI run failed. Let's see.

It looks like the new CI is successful. Should you add the "commit-queue" label again?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label May 18, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 18, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 10b21e5 into nodejs:main May 18, 2023
@nodejs-github-bot

nodejs-github-bot commented May 18, 2023

Copy link
Copy Markdown
Collaborator

Landed in 10b21e5

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request May 30, 2023
@GauriSpears @targos
crypto: use openssl's own memory BIOs in crypto_context.cc
f564b03
NodeBIO's memory buffer structure does not support BIO_C_FILE_SEEK and B
IO_C_FILE_TELL. This prevents OpenSSL PEM_read_bio_PrivateKey from readi
ng some private keys. So I switched to OpenSSL'w own protected memory bu
ffers.

Fixes: #47008
PR-URL: #47160
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@targos targos mentioned this pull request Jun 4, 2023
v20.3.0 release proposal #48332
Merged
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
@GauriSpears @danielleadams
crypto: use openssl's own memory BIOs in crypto_context.cc
dcf9ae7
NodeBIO's memory buffer structure does not support BIO_C_FILE_SEEK and B
IO_C_FILE_TELL. This prevents OpenSSL PEM_read_bio_PrivateKey from readi
ng some private keys. So I switched to OpenSSL'w own protected memory bu
ffers.

Fixes: #47008
PR-URL: #47160
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
@GauriSpears @MoLow
crypto: use openssl's own memory BIOs in crypto_context.cc
7617772
NodeBIO's memory buffer structure does not support BIO_C_FILE_SEEK and B
IO_C_FILE_TELL. This prevents OpenSSL PEM_read_bio_PrivateKey from readi
ng some private keys. So I switched to OpenSSL'w own protected memory bu
ffers.

Fixes: nodejs#47008
PR-URL: nodejs#47160
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@danielleadams danielleadams mentioned this pull request Jul 10, 2023
v18.17.0 release proposal #48694
Merged
ckerr added a commit to electron/electron that referenced this pull request Jul 19, 2023
@ckerr
chore: update fix_crypto_tests_to_run_with_bssl.patch
274c94c
Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309
ckerr added a commit to electron/electron that referenced this pull request Jul 19, 2023
@ckerr
chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch
7e7061e
Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309
ckerr added a commit to electron/electron that referenced this pull request Jul 25, 2023
@ckerr
chore: update fix_crypto_tests_to_run_with_bssl.patch
3e22f0c
Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309
ckerr added a commit to electron/electron that referenced this pull request Jul 25, 2023
@ckerr
chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch
341b455
Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309
ckerr added a commit to electron/electron that referenced this pull request Aug 7, 2023
@ckerr
chore: update fix_crypto_tests_to_run_with_bssl.patch
15d3519
Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309
ckerr added a commit to electron/electron that referenced this pull request Aug 7, 2023
@ckerr
chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch
84ba54f
Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309
ckerr added a commit to electron/electron that referenced this pull request Aug 8, 2023
@electron-roller @ckerr
chore: bump node to v18.17.0 (main) (#39154)
ab08803
* chore: bump node in DEPS to v18.17.0

* chore: update build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

Xref: nodejs/node#46930

manually sync patch to minor upstream code shear

* chore: update build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Xref: nodejs/node#48248

manually sync patch to minor upstream code shear

* chore: update fix_expose_the_built-in_electron_module_via_the_esm_loader.patch

Xref: nodejs/node#47824

chore: upstream func throwIfUnsupportedURLProtocol() has been removed, so no need to patch it

* chore: update api_pass_oomdetails_to_oomerrorcallback.patch

Xref: nodejs/node#47695

manually sync patch to minor upstream code shear

* chore: remove fix_prevent_changing_functiontemplateinfo_after_publish.patch

Xref: nodejs/node#46979 (upstreamed patch)

Xref: https://chromium-review.googlesource.com/c/v8/v8/+/2718147 (related)

* chore: update fix_adapt_debugger_tests_for_upstream_v8_changes.patch

Xref: nodejs/node#47274

manually sync patch to minor upstream code shear

some tests moved from sequential to parallel

* chore: remove fix_libc_buffer_overflow_in_string_view_ctor.patch

Xref: fix_libc_buffer_overflow_in_string_view_ctor.patch

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: remove fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch

Xref: nodejs/node#47339

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: rebuild filenames.json

several files removed/added/changed upstream

* chore: update build_add_gn_build_files.patch

upstream dep histogram 0.11.7 moved its include path from src/ to include/

Xref: nodejs/node#47742

* chore: update fix_crypto_tests_to_run_with_bssl.patch

Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: ftbfs in node dep ada

* fix: ftbfs in node dep uvwasi

* chore: rebuild patches

* chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch

Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: work around Node 18 isURL() regression

* chore: sort script/node-disabled-tests.json alphabetically

* test: add parallel/test-snapshot-argv1 to disabled list

test: add parallel/test-snapshot-namespaced-builtin to disabled list

We don't support that type of snapshotting at the moment.

* chore: disable flaky node test parallel/test-dgram-send-cb-quelches-error

fails upstream in v18.x on my box as well

* ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

* fixup! fix: work around Node 18 isURL() regression

fix: infinite loop regression

* fixup! fix: work around Node 18 isURL() regression

* chore: patch fixtures/errors/force_colors.snapshot

The line numbers in the stacktrace from our v8 build don't match what
Node's tests are expecting, so update the stacktrace to match our build.

The specific numbers probably aren't t needed for the force_colors test,
which is trying to see whether or not the lines are greyed out. One option
is to upstream a test change to stop hardcoding the stacktrace.

* fixup! fix: work around Node 18 isURL() regression

fix; pull in upstream bugfix

* fixup! ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

chore: do not inject ELECTRON_RUN_AS_NODE in test-assert-colors.js

* chore: disable flaky node test parallel/test-debugger-random-port-with-inspect-port

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
tniessen added a commit to tniessen/node that referenced this pull request Aug 16, 2023
@tniessen
test: fix compiler warning in NodeCryptoEnv
5d79fb2
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: nodejs#47160
@tniessen tniessen mentioned this pull request Aug 16, 2023
test: fix compiler warning in NodeCryptoEnv #49206
Merged
nodejs-github-bot pushed a commit that referenced this pull request Aug 24, 2023
@tniessen
test: fix compiler warning in NodeCryptoEnv
6117cc3
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: #47160
PR-URL: #49206
Reviewed-By: Michael Dawson <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
@tniessen @UlisesGascon
test: fix compiler warning in NodeCryptoEnv
a11e64e
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: #47160
PR-URL: #49206
Reviewed-By: Michael Dawson <[email protected]>
win32ss pushed a commit to win32ss/supermium-electron that referenced this pull request Sep 24, 2023
@electron-roller @ckerr win32ss
chore: bump node to v18.17.0 (main) (electron#39154)
5dc5801
* chore: bump node in DEPS to v18.17.0

* chore: update build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

Xref: nodejs/node#46930

manually sync patch to minor upstream code shear

* chore: update build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Xref: nodejs/node#48248

manually sync patch to minor upstream code shear

* chore: update fix_expose_the_built-in_electron_module_via_the_esm_loader.patch

Xref: nodejs/node#47824

chore: upstream func throwIfUnsupportedURLProtocol() has been removed, so no need to patch it

* chore: update api_pass_oomdetails_to_oomerrorcallback.patch

Xref: nodejs/node#47695

manually sync patch to minor upstream code shear

* chore: remove fix_prevent_changing_functiontemplateinfo_after_publish.patch

Xref: nodejs/node#46979 (upstreamed patch)

Xref: https://chromium-review.googlesource.com/c/v8/v8/+/2718147 (related)

* chore: update fix_adapt_debugger_tests_for_upstream_v8_changes.patch

Xref: nodejs/node#47274

manually sync patch to minor upstream code shear

some tests moved from sequential to parallel

* chore: remove fix_libc_buffer_overflow_in_string_view_ctor.patch

Xref: fix_libc_buffer_overflow_in_string_view_ctor.patch

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: remove fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch

Xref: nodejs/node#47339

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: rebuild filenames.json

several files removed/added/changed upstream

* chore: update build_add_gn_build_files.patch

upstream dep histogram 0.11.7 moved its include path from src/ to include/

Xref: nodejs/node#47742

* chore: update fix_crypto_tests_to_run_with_bssl.patch

Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: ftbfs in node dep ada

* fix: ftbfs in node dep uvwasi

* chore: rebuild patches

* chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch

Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: work around Node 18 isURL() regression

* chore: sort script/node-disabled-tests.json alphabetically

* test: add parallel/test-snapshot-argv1 to disabled list

test: add parallel/test-snapshot-namespaced-builtin to disabled list

We don't support that type of snapshotting at the moment.

* chore: disable flaky node test parallel/test-dgram-send-cb-quelches-error

fails upstream in v18.x on my box as well

* ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

* fixup! fix: work around Node 18 isURL() regression

fix: infinite loop regression

* fixup! fix: work around Node 18 isURL() regression

* chore: patch fixtures/errors/force_colors.snapshot

The line numbers in the stacktrace from our v8 build don't match what
Node's tests are expecting, so update the stacktrace to match our build.

The specific numbers probably aren't t needed for the force_colors test,
which is trying to see whether or not the lines are greyed out. One option
is to upstream a test change to stop hardcoding the stacktrace.

* fixup! fix: work around Node 18 isURL() regression

fix; pull in upstream bugfix

* fixup! ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

chore: do not inject ELECTRON_RUN_AS_NODE in test-assert-colors.js

* chore: disable flaky node test parallel/test-debugger-random-port-with-inspect-port

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
targos pushed a commit that referenced this pull request Nov 27, 2023
@tniessen @targos
test: fix compiler warning in NodeCryptoEnv
ddebd29
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: #47160
PR-URL: #49206
Reviewed-By: Michael Dawson <[email protected]>
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
@electron-roller @ckerr MrHuangJser
chore: bump node to v18.17.0 (main) (electron#39154)
b98c7b8
* chore: bump node in DEPS to v18.17.0

* chore: update build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

Xref: nodejs/node#46930

manually sync patch to minor upstream code shear

* chore: update build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Xref: nodejs/node#48248

manually sync patch to minor upstream code shear

* chore: update fix_expose_the_built-in_electron_module_via_the_esm_loader.patch

Xref: nodejs/node#47824

chore: upstream func throwIfUnsupportedURLProtocol() has been removed, so no need to patch it

* chore: update api_pass_oomdetails_to_oomerrorcallback.patch

Xref: nodejs/node#47695

manually sync patch to minor upstream code shear

* chore: remove fix_prevent_changing_functiontemplateinfo_after_publish.patch

Xref: nodejs/node#46979 (upstreamed patch)

Xref: https://chromium-review.googlesource.com/c/v8/v8/+/2718147 (related)

* chore: update fix_adapt_debugger_tests_for_upstream_v8_changes.patch

Xref: nodejs/node#47274

manually sync patch to minor upstream code shear

some tests moved from sequential to parallel

* chore: remove fix_libc_buffer_overflow_in_string_view_ctor.patch

Xref: fix_libc_buffer_overflow_in_string_view_ctor.patch

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: remove fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch

Xref: nodejs/node#47339

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: rebuild filenames.json

several files removed/added/changed upstream

* chore: update build_add_gn_build_files.patch

upstream dep histogram 0.11.7 moved its include path from src/ to include/

Xref: nodejs/node#47742

* chore: update fix_crypto_tests_to_run_with_bssl.patch

Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: ftbfs in node dep ada

* fix: ftbfs in node dep uvwasi

* chore: rebuild patches

* chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch

Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: work around Node 18 isURL() regression

* chore: sort script/node-disabled-tests.json alphabetically

* test: add parallel/test-snapshot-argv1 to disabled list

test: add parallel/test-snapshot-namespaced-builtin to disabled list

We don't support that type of snapshotting at the moment.

* chore: disable flaky node test parallel/test-dgram-send-cb-quelches-error

fails upstream in v18.x on my box as well

* ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

* fixup! fix: work around Node 18 isURL() regression

fix: infinite loop regression

* fixup! fix: work around Node 18 isURL() regression

* chore: patch fixtures/errors/force_colors.snapshot

The line numbers in the stacktrace from our v8 build don't match what
Node's tests are expecting, so update the stacktrace to match our build.

The specific numbers probably aren't t needed for the force_colors test,
which is trying to see whether or not the lines are greyed out. One option
is to upstream a test change to stop hardcoding the stacktrace.

* fixup! fix: work around Node 18 isURL() regression

fix; pull in upstream bugfix

* fixup! ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

chore: do not inject ELECTRON_RUN_AS_NODE in test-assert-colors.js

* chore: disable flaky node test parallel/test-debugger-random-port-with-inspect-port

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
@sercher
test: fix compiler warning in NodeCryptoEnv
4308c16
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: nodejs/node#47160
PR-URL: nodejs/node#49206
Reviewed-By: Michael Dawson <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
@sercher
test: fix compiler warning in NodeCryptoEnv
b78535c
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: nodejs/node#47160
PR-URL: nodejs/node#49206
Reviewed-By: Michael Dawson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bnoordhuis bnoordhuis bnoordhuis approved these changes
@jasnell jasnell jasnell approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

tls.createSecureContext SetKey doesn't respect OpenSSL engine set by crypto.setEngine

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@GauriSpears @nodejs-github-bot @addaleax @bnoordhuis @quickdevel @jasnell @panva
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.