diff options
author | Fedor Indutny <fedor@indutny.com> | 2016-01-14 04:35:04 -0500 |
---|---|---|
committer | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2016-01-15 10:31:44 +0900 |
commit | ebd9addcd11034b7415e937c1c49857a1f61395b (patch) | |
tree | 46dd808249d2622b3aefc15bc480c34472389278 /src | |
parent | 310530b7ec8136e73288cc8784799a66fcf1d6a7 (diff) | |
download | node-new-ebd9addcd11034b7415e937c1c49857a1f61395b.tar.gz |
crypto: clear error stack in ECDH::Initialize
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.
Fix: #4686
PR-URL: https://github.com/nodejs/node/pull/4689
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_crypto.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 35a0687b9f..700e658417 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4678,6 +4678,8 @@ void ECDH::Initialize(Environment* env, Local<Object> target) { void ECDH::New(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); + MarkPopErrorOnReturn mark_pop_error_on_return; + // TODO(indutny): Support raw curves? CHECK(args[0]->IsString()); node::Utf8Value curve(env->isolate(), args[0]); |