From 2e2c015422dce973f15acb42571486e4003efddb Mon Sep 17 00:00:00 2001 From: Tobias Nießen Date: Sun, 23 Dec 2018 15:13:32 +0100 Subject: 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 Reviewed-By: Matteo Collina Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts --- doc/api/errors.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/api/errors.md') diff --git a/doc/api/errors.md b/doc/api/errors.md index 44ec5548ae..2ad0bead8e 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1486,6 +1486,11 @@ a `dynamicInstantiate` hook. A `MessagePort` was found in the object passed to a `postMessage()` call, but not provided in the `transferList` for that call. + +### ERR_MISSING_PASSPHRASE + +An attempt was made to read an encrypted key without specifying a passphrase. + ### ERR_MISSING_PLATFORM_FOR_WORKER -- cgit v1.2.3