diff options
author | Tobias Nießen <tniessen@tnie.de> | 2019-03-30 00:19:39 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-04 16:09:11 +0200 |
commit | 73bca57988c847a4b17b923686eee8e04e4fa13c (patch) | |
tree | 826a7cf8cce84fe8e974f68314f81bb109468425 /doc | |
parent | 608878c95692e12a42d97f2b7cfd839453bc815d (diff) | |
download | android-node-v8-73bca57988c847a4b17b923686eee8e04e4fa13c.tar.gz android-node-v8-73bca57988c847a4b17b923686eee8e04e4fa13c.tar.bz2 android-node-v8-73bca57988c847a4b17b923686eee8e04e4fa13c.zip |
crypto: fail early if passphrase is too long
This causes OpenSSL to fail early if the decryption passphrase is too
long, and produces a somewhat helpful error message.
PR-URL: https://github.com/nodejs/node/pull/27010
Refs: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/crypto.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 480930898e..4cacde0d8e 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1826,6 +1826,9 @@ Creates and returns a new key object containing a private key. If `key` is a string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. +If the private key is encrypted, a `passphrase` must be specified. The length +of the passphrase is limited to 1024 bytes. + ### crypto.createPublicKey(key) <!-- YAML added: v11.6.0 |