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: openssl 3.4 compatibility #56294

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion test/parallel/test-crypto-oneshot-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ const fs = require('fs');
assert.throws(() => { crypto.hash('sha1', 'test', 'not an encoding'); }, { code: 'ERR_INVALID_ARG_VALUE' });

// Test that the output of crypto.hash() is the same as crypto.createHash().
const methods = crypto.getHashes();
const methods =
crypto.getHashes()
// OpenSSL 3.4 has stopped supporting shake128 and shake256 if the output
// length is not set explicitly as the a fixed output length doesn't make a
// lot of sense for them, and the default one in OpenSSL was too short and
// unexpectedly limiting the security strength
.filter(
common.hasOpenSSL(3, 4) ?
method => method !== 'shake128' && method !== 'shake256' :
() => true,
)
;

const input = fs.readFileSync(fixtures.path('utf8_test_text.txt'));

Expand Down