Skip to content
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

test: make test-crypto-hash compatible with OpenSSL > 3.4.0 #56160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jelly
Copy link

@jelly jelly commented Dec 6, 2024

OpenSSL 3.4 has a breaking change where the outputLength is now mandatory for shake* hash algorithms.

openssl/openssl@b911fef


This only fixes one of the tree issues with OpenSSL 3.4. and it doesn't fix crypto.createHash() which likely should be adjusted to be compatible with the new OpenSSL behaviour but I am unsure how that is done. I assume it should raise an InvalidArgumentError now.

Refs: #56159

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Dec 6, 2024
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x labels Dec 6, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 6, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.54%. Comparing base (ca96c8d) to head (4f8bc73).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56160      +/-   ##
==========================================
+ Coverage   88.53%   88.54%   +0.01%     
==========================================
  Files         657      657              
  Lines      190285   190285              
  Branches    36535    36534       -1     
==========================================
+ Hits       168470   168490      +20     
+ Misses      14991    14983       -8     
+ Partials     6824     6812      -12     

see 24 files with indirect coverage changes

Comment on lines 1062 to 1064
get hasOpenSSL34() {
return hasOpenSSL(3, 4);
},
Copy link
Member

@richardlau richardlau Dec 6, 2024

Choose a reason for hiding this comment

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

When I added hasOpenSSL() in #53456, the idea was to stop adding new functions for every OpenSSL version to common, and instead directly call, e.g.hasOpenSSL(3, 4) in the test.

@aduh95
Copy link
Contributor

aduh95 commented Dec 10, 2024

Can you please rebase to fix the conflict and address Richard's review? Let me know if you'd prefer me to do it instead

OpenSSL 3.4 has a breaking change where the outputLength is now
mandatory for shake* hash algorithms.

Refs: openssl/openssl@b911fef
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 17, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 17, 2024
@nodejs-github-bot
Copy link
Collaborator

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. lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants