0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/crypto
Jose M. Palacios Diaz 845633a7c6
crypto: better docs for cases where peer's public key is invalid
changes in c++ are in the computeSecret function, but the thrown
exception that was moved to JS land was in BufferToPoint
function, here i let the allocation error be thrown so the only value
returned is the nullptr that i use later to catch the error in
computeSecret, to then construct the exception in JS land.

an ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY error was added to errors.js
and with that, subsequent changes to docs and tests were made.

PR-URL: https://github.com/nodejs/node/pull/16849
Refs: https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf
Fixes: https://github.com/nodejs/node/issues/16625
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-01 21:18:11 +01:00
..
certificate.js crypto: migrate Certificate to internal/errors 2017-10-15 15:34:06 -07:00
cipher.js crypto: migrate CipherBase to internal/errors 2017-10-30 07:56:27 -07:00
diffiehellman.js crypto: better docs for cases where peer's public key is invalid 2017-12-01 21:18:11 +01:00
hash.js lib: faster type checks for some types 2017-10-01 23:58:59 -03:00
pbkdf2.js crypto: refactor argument validation for pbkdf2 2017-10-23 15:52:11 -07:00
random.js crypto: migrate crypto.randomBytes to internal/errors 2017-10-26 08:09:00 -07:00
sig.js crypto: migrate crypto sign to internal/errors 2017-10-23 20:54:39 -07:00
util.js crypto: migrate timingSafeEqual to internal/errors 2017-10-26 07:47:16 -07:00