mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
test: add diffie-hellman regression test
Exercises the error path in DiffieHellman::ComputeSecret() in src/node_crypto.cc
This commit is contained in:
@@ -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' +
|
||||
|
||||
Reference in New Issue
Block a user