From: Sebastian Andrzej Siewior Date: Tue, 31 Dec 2024 16:23:35 +0000 (+0100) Subject: [PATCH 2/2] test: Skip shake* tests on OpenSSL 3.4 X-Git-Tag: archive/raspbian/20.18.1+dfsg-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3c09ac2f95dd7eb47683f7fca5292bf95069f4c9;p=nodejs.git [PATCH 2/2] test: Skip shake* tests on OpenSSL 3.4 shake* requires a length to be set. Skip the tests for now. => https://github.com/nodejs/node/issues/56159 => https://github.com/openssl/openssl/commit/b911fef216d1386210ec24e201d54d709528abb4 Signed-off-by: Sebastian Andrzej Siewior Gbp-Pq: Topic build Gbp-Pq: Name openssl-3.4-skip-shake-tests.patch --- diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js index af2146982..aa29d8df2 100644 --- a/test/parallel/test-crypto-hash.js +++ b/test/parallel/test-crypto-hash.js @@ -182,6 +182,8 @@ assert.throws( // Test XOF hash functions and the outputLength option. { + // Skip shake XOF due to length requirement. + if (!common.hasOpenSSL34) { // Default outputLengths. assert.strictEqual(crypto.createHash('shake128').digest('hex'), '7f9c2ba4e88f827d616045507605853e'); @@ -195,6 +197,7 @@ assert.throws( .digest('hex'), '46b9dd2b0ba88d13233b3feb743eeb24' + '3fcd52ea62b81b82b50c27646ed5762f'); + } // Short outputLengths. assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 }) diff --git a/test/parallel/test-crypto-oneshot-hash.js b/test/parallel/test-crypto-oneshot-hash.js index 56b4c04a6..3a2571ae0 100644 --- a/test/parallel/test-crypto-oneshot-hash.js +++ b/test/parallel/test-crypto-oneshot-hash.js @@ -31,6 +31,9 @@ const methods = crypto.getHashes(); const input = fs.readFileSync(fixtures.path('utf8_test_text.txt')); for (const method of methods) { + // Skip shake XOF due to length requirement. + if (common.hasOpenSSL34 && (method === 'shake128') || (method === 'shake256')) + continue; for (const outputEncoding of ['buffer', 'hex', 'base64', undefined]) { const oldDigest = crypto.createHash(method).update(input).digest(outputEncoding || 'hex'); const digestFromBuffer = crypto.hash(method, input, outputEncoding);