Skip to content

Commit 935b977

Browse files
bnoordhuisrvagg
authored andcommitted
test: add regression test for 512 bits DH key
Check that trying to use a < 1024 bits DH key throws an exception. parallel/test-tls-dhe tests this as well but it feels incongruous not to do it here when both tests have similar logic for 1024/2048 bits keys. PR-URL: #3629 Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent e302c33 commit 935b977

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-tls-client-mindhsize.js

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ function testDHE2048() {
7575

7676
testDHE1024();
7777

78+
assert.throws(() => test(512, true, assert.fail),
79+
/DH parameter is less than 1024 bits/);
80+
7881
process.on('exit', function() {
7982
assert.equal(nsuccess, 1);
8083
assert.equal(nerror, 1);

0 commit comments

Comments
 (0)