Browse Source

test: add diffie-hellman regression test

Exercises the error path in DiffieHellman::ComputeSecret() in src/node_crypto.cc
v0.8.13-release
Ben Noordhuis 12 years ago
parent
commit
82df345fbb
  1. 4
      test/simple/test-crypto.js

4
test/simple/test-crypto.js

@ -530,6 +530,10 @@ var secret3 = dh3.computeSecret(key2, 'hex', 'base64');
assert.equal(secret1, secret3);
assert.throws(function() {
dh3.computeSecret('');
}, /key is too small/i);
// https://github.com/joyent/node/issues/2338
assert.throws(function() {
var p = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74' +

Loading…
Cancel
Save