Repository navigation
tls: test the SPKI blocklist with a fixture key - #66949
Merged
nodejs-github-bot merged 1 commit intoOct 30, 2026
Merged
nodejs-github-bot merged 1 commit into
nodejs-github-bot merged 1 commit into
Conversation
Replace the test-only hooks on the crypto binding, and the process-wide list and mutex they required on every handshake, with a fixture CA whose public key is a permanent entry on the compiled-in blocklist. The test now exercises the real list through full handshakes, without --expose-internals, and the production path is a comparison against a constant array. The new fixtures provide two chains that contain the blocked key: a server certificate issued by blocked-ca, and one issued by ca1 that reuses the blocked key itself. The private key is checked in like every other fixture key, so blocking it costs nothing. It is pinned in the fixtures Makefile, since its digest is compiled in. Refs: nodejs#66871 (comment) Assisted-by: Claude, Codex Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
Collaborator
|
Review requested:
|
UlisesGascon
marked this pull request as ready for review
October 23, 2026 09:47
UlisesGascon
commented
Oct 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66949 +/- ##
==========================================
- Coverage 92.93% 90.59% -2.34%
==========================================
Files 428 797 +369
Lines 195236 278292 +83056
Branches 30189 53509 +23320
==========================================
+ Hits 181438 252115 +70677
- Misses 13471 16555 +3084
- Partials 327 9622 +9295
🚀 New features to boost your workflow:
|
Collaborator
Collaborator
|
Landed in a7d819a |
aduh95
pushed a commit
that referenced
this pull request
Nov 11, 2026
Replace the test-only hooks on the crypto binding, and the process-wide list and mutex they required on every handshake, with a fixture CA whose public key is a permanent entry on the compiled-in blocklist. The test now exercises the real list through full handshakes, without --expose-internals, and the production path is a comparison against a constant array. The new fixtures provide two chains that contain the blocked key: a server certificate issued by blocked-ca, and one issued by ca1 that reuses the blocked key itself. The private key is checked in like every other fixture key, so blocking it costs nothing. It is pinned in the fixtures Makefile, since its digest is compiled in. Refs: #66871 (comment) Assisted-by: Claude, Codex Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com> PR-URL: #66949 Reviewed-By: Tim Perry <pimterry@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Nov 12, 2026
Replace the test-only hooks on the crypto binding, and the process-wide list and mutex they required on every handshake, with a fixture CA whose public key is a permanent entry on the compiled-in blocklist. The test now exercises the real list through full handshakes, without --expose-internals, and the production path is a comparison against a constant array. The new fixtures provide two chains that contain the blocked key: a server certificate issued by blocked-ca, and one issued by ca1 that reuses the blocked key itself. The private key is checked in like every other fixture key, so blocking it costs nothing. It is pinned in the fixtures Makefile, since its digest is compiled in. Refs: #66871 (comment) Assisted-by: Claude, Codex Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com> PR-URL: #66949 Reviewed-By: Tim Perry <pimterry@gmail.com>
gabylb
pushed a commit
to gabylb/node
that referenced
this pull request
Nov 27, 2026
Replace the test-only hooks on the crypto binding, and the process-wide list and mutex they required on every handshake, with a fixture CA whose public key is a permanent entry on the compiled-in blocklist. The test now exercises the real list through full handshakes, without --expose-internals, and the production path is a comparison against a constant array. The new fixtures provide two chains that contain the blocked key: a server certificate issued by blocked-ca, and one issued by ca1 that reuses the blocked key itself. The private key is checked in like every other fixture key, so blocking it costs nothing. It is pinned in the fixtures Makefile, since its digest is compiled in. Refs: nodejs#66871 (comment) Assisted-by: Claude, Codex Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com> PR-URL: nodejs#66949 Reviewed-By: Tim Perry <pimterry@gmail.com>
electron-claude Bot
added a commit
to electron/electron
that referenced
this pull request
Dec 1, 2026
Upstream dropped the test-only extension of the SPKI blocklist, and the process-wide list and mutex behind it, in favour of a fixture CA whose key is a permanent blocklist entry. Electron's cert-revocation spec extends the list at runtime through the testing binding, so the patch now carries the list and mutex alongside the C++ hooks. The OPENSSL_SIZE_T loop in CheckSPKIs() is upstream and dropped here. Ref: nodejs/node#66949 Ref: nodejs/node#66889 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
electron-claude Bot
added a commit
to electron/electron
that referenced
this pull request
Dec 1, 2026
Upstream replaced the test-only runtime extension of the SPKI blocklist with a fixture CA key compiled into the list, removing the process-wide list, its mutex and the crypto binding hooks. Electron's cert-revocation spec still extends the list at runtime through the testing binding, so the patch now re-adds the list and mutex behind the exported C++ hooks. The OPENSSL_SIZE_T loop in CheckSPKIs() is upstream now and no longer part of the patch. Ref: nodejs/node#66949 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
jkleinsc
added a commit
to electron/electron
that referenced
this pull request
Dec 1, 2026
Node.js v26.14.0 removed the test-only runtime extension of the SPKI blocklist, and the process-wide list and mutex consulted on every certificate check, in favour of a fixture CA whose public key is a permanent compiled-in entry (nodejs/node#66949). Restoring that list only for Electron's spec would put the mutex back on every TLS handshake in production. Trim the patch to the eMudhra G2B/G2C entries that are not yet upstream, remove the addNodeBlockedSPKI/clearNodeBlockedSPKIs testing binding hooks, and point spec/cert-revocation.spec.ts at Node's blocked-ca, blocked-key-leaf and agent6 fixtures in third_party/electron_node, so it exercises the real list. The unaffected-chain case no longer uses spec/fixtures/certificates/server.pem, which expired in April 2026. Ref: nodejs/node#66949 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jkleinsc
added a commit
to electron/electron
that referenced
this pull request
Dec 1, 2026
Node.js v26.14.0 removed the test-only runtime extension of the SPKI blocklist, and the process-wide list and mutex consulted on every certificate check, in favour of a fixture CA whose public key is a permanent compiled-in entry (nodejs/node#66949). Restoring that list only for Electron's spec would put the mutex back on every TLS handshake in production. Trim the patch to the eMudhra G2B/G2C entries that are not yet upstream, remove the addNodeBlockedSPKI/clearNodeBlockedSPKIs testing binding hooks, and point spec/cert-revocation.spec.ts at Node's blocked-ca, blocked-key-leaf and agent6 fixtures in third_party/electron_node, so it exercises the real list. The unaffected-chain case no longer uses spec/fixtures/certificates/server.pem, which expired in April 2026. Ref: nodejs/node#66949 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ckerr
pushed a commit
to electron/electron
that referenced
this pull request
Dec 1, 2026
* chore: bump node in DEPS to v26.14.0 * chore: remove upstreamed patches Node.js v26.14.0 carries all of these: - fix_handle_boringssl_and_openssl_incompatibilities.patch nodejs/node#66752 - test_skip_rmsync_permission_error_test_when_running_as_root.patch nodejs/node#66666 - test_skip_openssl_config_test_under_boringssl.patch nodejs/node#66780 - test_expect_unable_to_get_issuer_cert_locally_under_boringssl.patch nodejs/node#66922 - build_fix_overriding_node_path_in_gn_build.patch nodejs/node#66805 - test_wait_for_inspector_restart_before_exit.patch nodejs/node#66722 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(patch): tls: test the SPKI blocklist with a fixture key Upstream replaced the test-only runtime extension of the SPKI blocklist with a fixture CA key compiled into the list, removing the process-wide list, its mutex and the crypto binding hooks. Electron's cert-revocation spec still extends the list at runtime through the testing binding, so the patch now re-adds the list and mutex behind the exported C++ hooks. The OPENSSL_SIZE_T loop in CheckSPKIs() is upstream now and no longer part of the patch. Ref: nodejs/node#66949 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(patch): ffi: fix handle leak in fast buffer arguments Ref: nodejs/node#66867 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches (trivial only) * fix(patch): crypto: reject immutable random fill buffers Ref: nodejs/node#66944 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test: disable test-buffer-bytelength-gc in the Node.js spec runner The test, new in Node.js v26.14.0, runs under --gc-global --gc-interval=500. Chromium's V8 segfaults in MarkCompactCollector::ClearFullMapTransitions() whenever Electron runs as Node with --gc-interval, even for a trivial script, so the test crashes before it exercises Buffer.byteLength() at all. The sibling tests added alongside it (test-buffer-bytelength-safe-fast and test-buffer-bytelength-strings) pass. test-domain-error-types is already disabled for the same --gc-interval crash. Ref: nodejs/node#67136 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(patch): tls: drop the runtime SPKI blocklist test hooks Node.js v26.14.0 removed the test-only runtime extension of the SPKI blocklist, and the process-wide list and mutex consulted on every certificate check, in favour of a fixture CA whose public key is a permanent compiled-in entry (nodejs/node#66949). Restoring that list only for Electron's spec would put the mutex back on every TLS handshake in production. Trim the patch to the eMudhra G2B/G2C entries that are not yet upstream, remove the addNodeBlockedSPKI/clearNodeBlockedSPKIs testing binding hooks, and point spec/cert-revocation.spec.ts at Node's blocked-ca, blocked-key-leaf and agent6 fixtures in third_party/electron_node, so it exercises the real list. The unaffected-chain case no longer uses spec/fixtures/certificates/server.pem, which expired in April 2026. Ref: nodejs/node#66949 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
ckerr
pushed a commit
to electron/electron
that referenced
this pull request
Dec 1, 2026
* chore: bump node in DEPS to v26.14.0 * chore: remove upstreamed patches Node.js v26.14.0 carries all of these: - fix_handle_boringssl_and_openssl_incompatibilities.patch Ref: nodejs/node#66752 - test_skip_rmsync_permission_error_test_when_running_as_root.patch Ref: nodejs/node#66666 - test_skip_openssl_config_test_under_boringssl.patch - test_expect_unable_to_get_issuer_cert_locally_under_boringssl.patch Ref: nodejs/node#66922 - build_fix_overriding_node_path_in_gn_build.patch Ref: nodejs/node#66805 - test_wait_for_inspector_restart_before_exit.patch Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(patch): tls: test the SPKI blocklist with a fixture key Upstream dropped the test-only extension of the SPKI blocklist, and the process-wide list and mutex behind it, in favour of a fixture CA whose key is a permanent blocklist entry. Electron's cert-revocation spec extends the list at runtime through the testing binding, so the patch now carries the list and mutex alongside the C++ hooks. The OPENSSL_SIZE_T loop in CheckSPKIs() is upstream and dropped here. Ref: nodejs/node#66949 Ref: nodejs/node#66889 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(patch): ffi: fix handle leak in fast buffer arguments Ref: nodejs/node#66867 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches (trivial only) * fix(patch): crypto: reject immutable random fill buffers Ref: nodejs/node#66944 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test: disable test-buffer-bytelength-gc The test runs with --gc-interval=500. Any --gc-interval value crashes Electron as Node during deserialization of the Node.js startup snapshot: the forced mark-compact reads a Map whose descriptors have not been deserialized yet (ClearFullMapTransitions). The only other upstream test using that flag, test-domain-error-types, is disabled for the same reason. The underlying byteLength fix is covered by test-buffer-bytelength-safe-fast and test-buffer-bytelength-strings, which pass. Ref: nodejs/node#67136 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(patch): tls: drop the runtime SPKI blocklist test hooks Node.js v26.14.0 removed the test-only runtime extension of the SPKI blocklist, and the process-wide list and mutex consulted on every certificate check, in favour of a fixture CA whose public key is a permanent compiled-in entry (nodejs/node#66949). Restoring that list only for Electron's spec would put the mutex back on every TLS handshake in production. Trim the patch to the eMudhra G2B/G2C entries that are not yet upstream, remove the addNodeBlockedSPKI/clearNodeBlockedSPKIs testing binding hooks, and point spec/cert-revocation.spec.ts at Node's blocked-ca, blocked-key-leaf and agent6 fixtures in third_party/electron_node, so it exercises the real list. The unaffected-chain case no longer uses spec/fixtures/certificates/server.pem, which expired in April 2026. Ref: nodejs/node#66949 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace the test-only hooks on the crypto binding, and the process-wide list and mutex they required on every handshake, with a fixture CA whose public key is a permanent entry on the compiled-in blocklist. The test now exercises the real list through full handshakes, without --expose-internals, and the production path is a comparison against a constant array.
The new fixtures provide two chains that contain the blocked key: a server certificate issued by blocked-ca, and one issued by ca1 that reuses the blocked key itself. The private key is checked in like every other fixture key, so blocking it costs nothing. It is pinned in the fixtures Makefile, since its digest is compiled in.
Refs: #66871 (comment)
Assisted-by: Claude, Codex