Skip to content

Commit

Permalink
test: use newish OpenSSL feature in test-tls-dhe
Browse files Browse the repository at this point in the history
According to the comment that is being replaced here, this was not
possible with the current version of OpenSSL 1.0.2 at the time the test
was written. New OpenSSL versions appear to always print the length of
the temporary key.

Refs: nodejs/node-v0.x-archive#8272
PR-URL: #46708
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
tniessen authored and danielleadams committed Apr 5, 2023
1 parent 594bb9d commit 9311116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-tls-dhe.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function test(keylen, expectedCipher, cb) {
out += d;
});
client.stdout.on('end', function() {
// DHE key length can be checked -brief option in s_client but it
// is only supported in openssl 1.0.2 so we cannot check it.
assert(keylen === 'error' ||
out.includes(`Server Temp Key: DH, ${keylen} bits`));
const reg = new RegExp(`Cipher : ${expectedCipher}`);
if (reg.test(out)) {
nsuccess++;
Expand Down

0 comments on commit 9311116

Please sign in to comment.