Skip to content

Commit

Permalink
test: add regression test for 512 bits DH key
Browse files Browse the repository at this point in the history
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 <thechargingvolcano@gmail.com>
  • Loading branch information
bnoordhuis authored and rvagg committed Nov 6, 2015
1 parent e302c33 commit 935b977
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-tls-client-mindhsize.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ function testDHE2048() {

testDHE1024();

assert.throws(() => test(512, true, assert.fail),
/DH parameter is less than 1024 bits/);

process.on('exit', function() {
assert.equal(nsuccess, 1);
assert.equal(nerror, 1);
Expand Down

0 comments on commit 935b977

Please sign in to comment.