test,crypto: fix conditional SHA3-* skip on BoringSSL

PR-URL: https://github.com/nodejs/node/pull/60379
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Filip Skokan 2025-10-25 17:13:30 +02:00 committed by GitHub
parent 7bc76d9895
commit 790489c5a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,13 +241,13 @@ async function testSaltLength(keyLength, hash, hLen) {
['SHA-256', 32], ['SHA-256', 32],
['SHA-384', 48], ['SHA-384', 48],
['SHA-512', 64], ['SHA-512', 64],
['SHA3-256', 32], ...(!process.features.openssl_is_boringssl ? [
['SHA3-384', 48], ['SHA3-256', 32],
['SHA3-512', 64], ['SHA3-384', 48],
['SHA3-512', 64],
] : []),
]) { ]) {
if (hash.startsWith('SHA-3') && !process.features.openssl_is_boringssl) { variations.push(testSaltLength(keyLength, hash, hLen));
variations.push(testSaltLength(keyLength, hash, hLen));
}
} }
} }