Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Inconsistent crypto throws #5499

Closed
trevnorris opened this issue May 18, 2013 · 0 comments
Closed

Inconsistent crypto throws #5499

trevnorris opened this issue May 18, 2013 · 0 comments
Labels
Milestone

Comments

@trevnorris
Copy link

In test-crypto.js has the following:

(function() {
  var c = crypto.createDecipher('aes-128-ecb', '');
  assert.throws(function() { c.final('utf8') }, /invalid public key/);
})();

So in the test it fails with:

TypeError: error:05066066:Diffie-Hellman routines:COMPUTE_KEY:invalid public key

But when run from REPL it errors with:

TypeError: error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length

@isaacs let me know it has something to do with the earlier statement of dh3.computeSecret('');

/cc @indutny

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant