summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-key-objects.js
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-03-27 12:10:21 -0700
committerSam Roberts <vieuxtech@gmail.com>2019-03-28 14:03:18 -0700
commitbcbd35a48d00c915690682b546e6c282bd15150b (patch)
treea19f2dd6196b88399443762f63668f90c0c322c2 /test/parallel/test-crypto-key-objects.js
parent805e614ba7401a04330d8f2878d61213268d6e8b (diff)
downloadandroid-node-v8-bcbd35a48d00c915690682b546e6c282bd15150b.tar.gz
android-node-v8-bcbd35a48d00c915690682b546e6c282bd15150b.tar.bz2
android-node-v8-bcbd35a48d00c915690682b546e6c282bd15150b.zip
crypto: add openssl specific error properties
Don't force the user to parse the long-style OpenSSL error message, decorate the error with the library, reason, code, function. PR-URL: https://github.com/nodejs/node/pull/26868 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test/parallel/test-crypto-key-objects.js')
-rw-r--r--test/parallel/test-crypto-key-objects.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js
index fb1c3de1d7..c9cb90d408 100644
--- a/test/parallel/test-crypto-key-objects.js
+++ b/test/parallel/test-crypto-key-objects.js
@@ -165,7 +165,13 @@ const privatePem = fixtures.readSync('test_rsa_privkey.pem', 'ascii');
// This should not cause a crash: https://github.com/nodejs/node/issues/25247
assert.throws(() => {
createPrivateKey({ key: '' });
- }, /null/);
+ }, {
+ message: 'error:2007E073:BIO routines:BIO_new_mem_buf:null parameter',
+ code: 'ERR_OSSL_BIO_NULL_PARAMETER',
+ reason: 'null parameter',
+ library: 'BIO routines',
+ function: 'BIO_new_mem_buf',
+ });
}
[