Browse Source

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: https://github.com/nodejs/node/pull/3629
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
process-exit-stdio-flushing
Ben Noordhuis 9 years ago
parent
commit
cddf358f68
  1. 3
      test/parallel/test-tls-client-mindhsize.js

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

@ -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);

Loading…
Cancel
Save