diff --git a/test/simple/test-crypto.js b/test/simple/test-crypto.js index de8c1a9d63..535af760fa 100644 --- a/test/simple/test-crypto.js +++ b/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' +