Skip to content

Commit 4b90576

Browse files
davidbengibfahn
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 Backport-PR-URL: #18622 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent de37b99 commit 4b90576

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-crypto.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ const noCapitals = /^[^A-Z]+$/;
129129
assert(tlsCiphers.every((value) => noCapitals.test(value)));
130130
validateList(tlsCiphers);
131131

132-
// Assert that we have sha and sha1 but not SHA and SHA1.
132+
// Assert that we have sha1 and sha256 but not SHA1 and SHA256.
133133
assert.notStrictEqual(0, crypto.getHashes().length);
134134
assert(crypto.getHashes().includes('sha1'));
135-
assert(crypto.getHashes().includes('sha'));
135+
assert(crypto.getHashes().includes('sha256'));
136136
assert(!crypto.getHashes().includes('SHA1'));
137-
assert(!crypto.getHashes().includes('SHA'));
137+
assert(!crypto.getHashes().includes('SHA256'));
138138
assert(crypto.getHashes().includes('RSA-SHA1'));
139139
assert(!crypto.getHashes().includes('rsa-sha1'));
140140
validateList(crypto.getHashes());

0 commit comments

Comments
 (0)