Skip to content

Commit 37d14f4

Browse files
committed
Revert "test: make test-crypto-hash compatible with OpenSSL > 3.4.0"
This reverts commit e799722.
1 parent b5690e7 commit 37d14f4

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

test/parallel/test-crypto-hash.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const assert = require('assert');
88
const crypto = require('crypto');
99
const fs = require('fs');
1010

11-
const { hasOpenSSL } = require('../common/crypto');
1211
const fixtures = require('../common/fixtures');
1312

1413
let cryptoType;
@@ -184,21 +183,19 @@ assert.throws(
184183

185184
// Test XOF hash functions and the outputLength option.
186185
{
187-
// Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory
188-
if (!hasOpenSSL(3, 4)) {
189-
assert.strictEqual(crypto.createHash('shake128').digest('hex'),
190-
'7f9c2ba4e88f827d616045507605853e');
191-
assert.strictEqual(crypto.createHash('shake128', null).digest('hex'),
192-
'7f9c2ba4e88f827d616045507605853e');
193-
assert.strictEqual(crypto.createHash('shake256').digest('hex'),
194-
'46b9dd2b0ba88d13233b3feb743eeb24' +
195-
'3fcd52ea62b81b82b50c27646ed5762f');
196-
assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 })
197-
.copy() // Default outputLength.
198-
.digest('hex'),
199-
'46b9dd2b0ba88d13233b3feb743eeb24' +
200-
'3fcd52ea62b81b82b50c27646ed5762f');
201-
}
186+
// Default outputLengths.
187+
assert.strictEqual(crypto.createHash('shake128').digest('hex'),
188+
'7f9c2ba4e88f827d616045507605853e');
189+
assert.strictEqual(crypto.createHash('shake128', null).digest('hex'),
190+
'7f9c2ba4e88f827d616045507605853e');
191+
assert.strictEqual(crypto.createHash('shake256').digest('hex'),
192+
'46b9dd2b0ba88d13233b3feb743eeb24' +
193+
'3fcd52ea62b81b82b50c27646ed5762f');
194+
assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 })
195+
.copy() // Default outputLength.
196+
.digest('hex'),
197+
'46b9dd2b0ba88d13233b3feb743eeb24' +
198+
'3fcd52ea62b81b82b50c27646ed5762f');
202199

203200
// Short outputLengths.
204201
assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 })

0 commit comments

Comments
 (0)