Skip to content

crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4 #58942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2025

Conversation

panva
Copy link
Member

@panva panva commented Jul 3, 2025

Background:

This PR:

After this lands a semver-major PRs that contain breaking changes and should be released in the next major version. will follow with a runtime deprecation.

This will need backporting all the way back to 20.x

Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121

Note: FWIW #56160 should not have landed. Any OpenSSL version-related test changes should only accomodate changes in codes, not behaviour.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@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 Jul 3, 2025
@nodejs-github-bot
Copy link
Collaborator

@panva panva marked this pull request as ready for review July 3, 2025 10:18
@panva panva added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jul 3, 2025
@panva panva requested review from jasnell, tniessen and aduh95 July 3, 2025 10:26
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

Attention: Patch coverage is 75.55556% with 11 lines in your changes missing coverage. Please review.

Project coverage is 90.08%. Comparing base (ec41686) to head (68fb47c).
Report is 87 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_hash.cc 0.00% 9 Missing and 1 partial ⚠️
lib/internal/crypto/hash.js 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58942      +/-   ##
==========================================
+ Coverage   90.07%   90.08%   +0.01%     
==========================================
  Files         640      640              
  Lines      188473   188516      +43     
  Branches    36972    36986      +14     
==========================================
+ Hits       169763   169830      +67     
+ Misses      11427    11392      -35     
- Partials     7283     7294      +11     
Files with missing lines Coverage Δ
lib/internal/util.js 96.75% <100.00%> (-0.10%) ⬇️
lib/internal/crypto/hash.js 98.43% <96.77%> (-0.23%) ⬇️
src/crypto/crypto_hash.cc 70.56% <0.00%> (-2.45%) ⬇️

... and 30 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 panva added lts-watch-v20.x PRs that may need to be released in v20.x lts-watch-v22.x PRs that may need to be released in v22.x labels Jul 3, 2025
@nodejs-github-bot
Copy link
Collaborator

@panva
Copy link
Member Author

panva commented Jul 3, 2025

@panva panva added the blocked PRs that are blocked by other issues or PRs. label Jul 4, 2025
@panva
Copy link
Member Author

panva commented Jul 4, 2025

Actually, this PR is backportable to 20.x as a fix, #58121 is a new feature in a Stability: 1.2 - Release candidate API that we don't have to backport to maintenance LTS.

I'll land this and update #58121 with the deprecation when this lands.

@panva panva added commit-queue Add this label to land a pull request using GitHub Actions. and removed blocked PRs that are blocked by other issues or PRs. labels Jul 4, 2025
@joyeecheung joyeecheung added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jul 4, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 5, 2025
@nodejs-github-bot nodejs-github-bot merged commit f5da8f8 into nodejs:main Jul 5, 2025
72 of 74 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in f5da8f8

@panva panva added the backport-open-v22.x Indicate that the PR has an open backport label Jul 5, 2025
panva added a commit to panva/node that referenced this pull request Jul 5, 2025
Reverts: nodejs#56160
Fixes: nodejs#56159
Fixes: nodejs#58913
Refs: nodejs#58121
PR-URL: nodejs#58942
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@panva panva deleted the xof-openssl34 branch July 5, 2025 11:59
panva added a commit to panva/node that referenced this pull request Jul 5, 2025
Reverts: nodejs#56160
Fixes: nodejs#56159
Fixes: nodejs#58913
Refs: nodejs#58121
PR-URL: nodejs#58942
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@panva panva added the backport-open-v20.x Indicate that the PR has an open backport label Jul 5, 2025
RafaelGSS pushed a commit that referenced this pull request Jul 8, 2025
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
aduh95 pushed a commit to panva/node that referenced this pull request Jul 21, 2025
Reverts: nodejs#56160
Fixes: nodejs#56159
Fixes: nodejs#58913
Refs: nodejs#58121
PR-URL: nodejs#58942
Backport-PR-URL: nodejs#58960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@aduh95 aduh95 added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed backport-open-v22.x Indicate that the PR has an open backport lts-watch-v22.x PRs that may need to be released in v22.x labels Jul 21, 2025
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 4, 2025
* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
codebytere added a commit to electron/electron that referenced this pull request Aug 5, 2025
* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
codebytere added a commit to electron/electron that referenced this pull request Aug 5, 2025
chore: bump node to v22.18.0 (main) (#47937)

* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Aug 14, 2025
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Backport-PR-URL: #58961
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-open-v20.x Indicate that the PR has an open backport backported-to-v22.x PRs backported to the v22.x-staging branch. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. crypto Issues and PRs related to the crypto subsystem. lts-watch-v20.x PRs that may need to be released in v20.x needs-ci PRs that need a full CI run.
Projects
None yet
6 participants