Skip to content

crypto,tls: update BoringSSL, wire up SHA-3 and TLS 1.3 ciphers - #66922

Open
panva wants to merge 4 commits into
nodejs:mainfrom
panva:boringssl-refresh
Open

panva wants to merge 4 commits into
nodejs:mainfrom
panva:boringssl-refresh

Conversation

@panva

@panva panva commented Oct 22, 2026

Copy link
Copy Markdown
Member

Update the BoringSSL pin used by shared-library CI to 0.20261020.0, adjust TLS certificate error expectations and the system CA hint, and remove the obsolete temporary-key compatibility shim.

Wire up SHA-3 to node:crypto and subtle.digest() when built with/linked to BoringSSL. Limit WebCrypto SHA-3 support to digest operations when using BoringSSL (because it's not universally supported as a hash member of all algorithms).

Wire up TLS 1.3 cipher configuration and honorCipherOrder with BoringSSL, using native backend defaults for legacy-only cipher lists. Remove obsolete test exclusions and narrow broad skips to recover supported crypto and TLS coverage.

@panva panva added tls Issues and PRs related to the tls subsystem. crypto Issues and PRs related to the crypto subsystem. tools Issues and PRs related to the tools directory. webcrypto Issues and PRs related to the Web Crypto API. commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. labels Oct 22, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/net
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 22, 2026
@panva
panva requested a review from jasnell October 22, 2026 10:18
@github-actions

This comment was marked as outdated.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.17647% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.57%. Comparing base (727e0ca) to head (c76790a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/crypto/util.js 27.27% 7 Missing and 1 partial ⚠️
lib/internal/crypto/webidl.js 66.66% 1 Missing ⚠️
lib/internal/tls/wrap.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66922      +/-   ##
==========================================
+ Coverage   89.96%   90.57%   +0.61%     
==========================================
  Files         797      797              
  Lines      278494   278505      +11     
  Branches    53411    53538     +127     
==========================================
+ Hits       250540   252262    +1722     
+ Misses      18184    16579    -1605     
+ Partials     9770     9664     -106     
Files with missing lines Coverage Δ
src/crypto/crypto_common.cc 78.46% <ø> (ø)
src/crypto/crypto_hash.cc 69.01% <ø> (-0.39%) ⬇️
lib/internal/crypto/webidl.js 95.74% <66.66%> (+<0.01%) ⬆️
lib/internal/tls/wrap.js 95.62% <66.66%> (+<0.01%) ⬆️
lib/internal/crypto/util.js 97.81% <27.27%> (-0.37%) ⬇️

... and 115 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

panva added 4 commits October 22, 2026 14:58
Use BoringSSL 0.20261020.0 for shared-library builds and expose the
package wrapper's version to the matrix updater.

The new verifier no longer emits UNABLE_TO_VERIFY_LEAF_SIGNATURE
after Node's verification callback accepts a missing-issuer error.
Expect UNABLE_TO_GET_ISSUER_CERT_LOCALLY for the affected leaf
certificates and suggest --use-system-ca for that error.

Drop the SSL_get_server_tmp_key() fallback now that BoringSSL supplies
SSL_get_peer_tmp_key() as a compatibility stub.

Refs: https://boringssl-review.googlesource.com/c/boringssl/+/103849
Refs: electron/electron@b457e70
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
Add SHA3-256, SHA3-384, and SHA3-512 to name lookup and getHashes().
BoringSSL exposes EVP_sha3_* descriptors but omits them from its
digest registry. Map the names directly to those descriptors so
node:crypto can use them too.

When using BoringSSL, limit WebCrypto SHA-3 support to digest
operations.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
Translate cipher-suite names into protocol IDs for BoringSSL's TLS 1.3
configuration API. Handle duplicates and unknown names, reject nonempty
lists without a supported suite, and implement honorCipherOrder through
preference flags.

Cover suite restrictions, explicit preference ordering, legacy-only
lists, runtime defaults, and command-line overrides.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
Run supported DH, ECDH, legacy TLS, TLS 1.2 PSK, cipher metadata,
raw key, and X.509 date cases with BoringSSL. Assert its DH flags,
curve format errors, and name-constraint behavior. Narrow key/cert
array exclusions to the failing multi-identity cases.

Use modp5 for the DH group setter checks and remove the unused legacy
protocol fallback helper.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
@panva
panva force-pushed the boringssl-refresh branch from f699212 to c76790a Compare October 22, 2026 12:59
@github-actions

Copy link
Copy Markdown
Contributor
Platform Number of requisites Proportion of new derivations
x86_64-linux 544 -> 544 => no changes 4 / 544 = 0.7%
aarch64-linux 545 -> 545 => no changes 4 / 545 = 0.7%
x86_64-darwin 457 -> 457 => no changes 0 / 457 = 0.0%
aarch64-darwin 470 -> 470 => no changes 4 / 470 = 0.8%
Total 2016 -> 2016 => no changes 12 / 2016 = 0.5%
Changelog
@@ -107,12 +107,12 @@
-/nix/store/1kz13kf8hpvib8py2bwk9cz4rww084pj-boringssl-0.20260929.0 (aarch64-darwin)
-/nix/store/9qnmqyy3a96cxixkh5012vmdx7mmj8mn-boringssl-0.20260929.0 (aarch64-darwin)
-/nix/store/2vs0ylgshc4r3wvg9r4mdc1vzvj657a3-boringssl-0.20260929.0 (aarch64-linux)
-/nix/store/dqa82pf6zpbya2q5j5y27vqqrw79433a-boringssl-0.20260929.0 (aarch64-linux)
-/nix/store/50qpspny60wkd3n1s34mjj9hphp8lznj-boringssl-0.20260929.0 (x86_64-linux)
-/nix/store/ddvwnb04q65yd67zbv2n9983iir5yjwy-boringssl-0.20260929.0 (x86_64-linux)
-/nix/store/ripv3j3z8rq4nwzjp5avrdgr0h98dq4f-boringssl-0.20260929.0-bin (aarch64-darwin)
-/nix/store/8l13y89lh31qh05k4svx36kga52qpahr-boringssl-0.20260929.0-bin (aarch64-linux)
-/nix/store/l7l8zk0fgvcgciy0hdr6f4bxxn5gqhsx-boringssl-0.20260929.0-bin (x86_64-linux)
-/nix/store/vf8mvwr778rk7a8ii5ykjjbybmq8v8xq-boringssl-0.20260929.0-dev (aarch64-darwin)
-/nix/store/lhg2ws49qminj9ib132airsyb27ybl85-boringssl-0.20260929.0-dev (aarch64-linux)
-/nix/store/qfkyfg83vrhrhdlhw68z3rh3qzspva68-boringssl-0.20260929.0-dev (x86_64-linux)
+/nix/store/la0w0vyk0wpzyv3i2c0wiqdggjqx1vby-boringssl-0.20261020.0 (aarch64-darwin)
+/nix/store/w7nxxrjnypjbb64va1hfhdxn7b1y2x18-boringssl-0.20261020.0 (aarch64-darwin)
+/nix/store/cxzbln2ank856srbqbdpbdljjxyjjmd8-boringssl-0.20261020.0 (aarch64-linux)
+/nix/store/pcd93bv8a8sggy48pnj44hwn2938x685-boringssl-0.20261020.0 (aarch64-linux)
+/nix/store/52zl4z8025h6dij4wsx49896kw1clckz-boringssl-0.20261020.0 (x86_64-linux)
+/nix/store/q0ayjr9fwdf23wkzcbjdn1h6km11jgjm-boringssl-0.20261020.0 (x86_64-linux)
+/nix/store/nk67q3idl5vh4m1wnyb5mykr24s6787h-boringssl-0.20261020.0-bin (aarch64-darwin)
+/nix/store/92clk0vn1xy8m746m5sl7gpv81kq1yfj-boringssl-0.20261020.0-bin (aarch64-linux)
+/nix/store/qvc37vwnpm7jql42awzx3xb1akckg482-boringssl-0.20261020.0-bin (x86_64-linux)
+/nix/store/hcb9grrnc45kk19c7j4p42n6lm5r2gk4-boringssl-0.20261020.0-dev (aarch64-darwin)
+/nix/store/ay5w1l4svy28yz4cc3k7y17jwmqqn4hx-boringssl-0.20261020.0-dev (aarch64-linux)
+/nix/store/p92scpq9586m4h866vj8wh9vkicd61b0-boringssl-0.20261020.0-dev (x86_64-linux)

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nix changes LGTM, the rest RSLGTM

@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Oct 22, 2026
@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 Oct 22, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. crypto Issues and PRs related to the crypto subsystem. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem. tools Issues and PRs related to the tools directory. webcrypto Issues and PRs related to the Web Crypto API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants