Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2018-12-23 17:13:32 +0300
committerTobias Nießen <tniessen@tnie.de>2019-03-30 12:31:43 +0300
commit2e2c015422dce973f15acb42571486e4003efddb (patch)
tree8e40aee5afd38fb10a5ebe64447256689b7e288b /src/node_errors.h
parent61ef9df958f98bed5159d9d4553ea5b2f894272f (diff)
crypto: decode missing passphrase errors
When a user attempts to load an encrypted key without supplying a passphrase, a cryptic OpenSSL error is thrown. This change intercepts the OpenSSL error and throws a nice error code instead. PR-URL: https://github.com/nodejs/node/pull/25208 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'src/node_errors.h')
-rw-r--r--src/node_errors.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_errors.h b/src/node_errors.h
index 9d3f2ead712..61d9b882212 100644
--- a/src/node_errors.h
+++ b/src/node_errors.h
@@ -51,6 +51,7 @@ void FatalException(v8::Isolate* isolate,
V(ERR_MEMORY_ALLOCATION_FAILED, Error) \
V(ERR_MISSING_ARGS, TypeError) \
V(ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST, TypeError) \
+ V(ERR_MISSING_PASSPHRASE, TypeError) \
V(ERR_MISSING_PLATFORM_FOR_WORKER, Error) \
V(ERR_MODULE_NOT_FOUND, Error) \
V(ERR_OUT_OF_RANGE, RangeError) \