Skip to content

Commit 85ffc2f

Browse files
davidbenevanlucas
authored andcommitted
test: remove sha from test expectations
"sha" in OpenSSL refers to SHA-0 which was removed from OpenSSL 1.1.0 and is insecure. Replace it with SHA-256 which is present in both 1.0.2 and 1.1.0. Short of shipping a reimplementation in Node, this is an unavoidable behavior change with 1.1.0. PR-URL: #16130 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent bec0421 commit 85ffc2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-crypto.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ const noCapitals = /^[^A-Z]+$/;
132132
assert(tlsCiphers.every((value) => noCapitals.test(value)));
133133
validateList(tlsCiphers);
134134

135-
// Assert that we have sha and sha1 but not SHA and SHA1.
135+
// Assert that we have sha1 and sha256 but not SHA1 and SHA256.
136136
assert.notStrictEqual(0, crypto.getHashes().length);
137137
assert(crypto.getHashes().includes('sha1'));
138-
assert(crypto.getHashes().includes('sha'));
138+
assert(crypto.getHashes().includes('sha256'));
139139
assert(!crypto.getHashes().includes('SHA1'));
140-
assert(!crypto.getHashes().includes('SHA'));
140+
assert(!crypto.getHashes().includes('SHA256'));
141141
assert(crypto.getHashes().includes('RSA-SHA1'));
142142
assert(!crypto.getHashes().includes('rsa-sha1'));
143143
validateList(crypto.getHashes());

0 commit comments

Comments
 (0)