diff options
author | Tobias Nießen <tniessen@tnie.de> | 2019-01-18 10:56:44 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-01-18 14:55:29 +0100 |
commit | 9315daaf02bb53b51760a8b15ad86a8be147db19 (patch) | |
tree | a7340e9e6e66c78cf9aa01513ca2901dc92dd1c8 /lib/internal | |
parent | d3f8f905b33347fc95057af01b72efc2966bd7c8 (diff) | |
download | android-node-v8-9315daaf02bb53b51760a8b15ad86a8be147db19.tar.gz android-node-v8-9315daaf02bb53b51760a8b15ad86a8be147db19.tar.bz2 android-node-v8-9315daaf02bb53b51760a8b15ad86a8be147db19.zip |
crypto: fix key handle extraction
PR-URL: https://github.com/nodejs/node/pull/25562
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib/internal')
-rw-r--r-- | lib/internal/crypto/keys.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/crypto/keys.js b/lib/internal/crypto/keys.js index db7be824ac..ecd747d947 100644 --- a/lib/internal/crypto/keys.js +++ b/lib/internal/crypto/keys.js @@ -215,7 +215,7 @@ function parsePrivateKeyEncoding(enc, keyType, objName) { function getKeyObjectHandle(key, isPublic, allowKeyObject) { if (!allowKeyObject) { - return new ERR_INVALID_ARG_TYPE( + throw new ERR_INVALID_ARG_TYPE( 'key', ['string', 'Buffer', 'TypedArray', 'DataView'], key |