summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2019-02-16 20:26:26 +0100
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-02-21 05:51:32 +0100
commit042e2640e68832554733377245a3d6d4f76a7002 (patch)
treefc761bb219326a182ee27527033267108e6f7527 /src
parentf17f4675440270d03b138d8ce55c1345230f6d2a (diff)
downloadandroid-node-v8-042e2640e68832554733377245a3d6d4f76a7002.tar.gz
android-node-v8-042e2640e68832554733377245a3d6d4f76a7002.tar.bz2
android-node-v8-042e2640e68832554733377245a3d6d4f76a7002.zip
crypto: make ConvertKey clear openssl error stack
Failed ConvertKey() operations should not leave errors on OpenSSL's error stack because that's observable by subsequent cryptographic operations. More to the point, it makes said operations fail with an unrelated error. PR-URL: https://github.com/nodejs/node/pull/26153 Fixes: https://github.com/nodejs/node/issues/26133 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_crypto.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index aaba05b984..fcc35ce63f 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -6122,6 +6122,7 @@ void ExportChallenge(const FunctionCallbackInfo<Value>& args) {
// Convert the input public key to compressed, uncompressed, or hybrid formats.
void ConvertKey(const FunctionCallbackInfo<Value>& args) {
+ MarkPopErrorOnReturn mark_pop_error_on_return;
Environment* env = Environment::GetCurrent(args);
CHECK_EQ(args.Length(), 3);