summaryrefslogtreecommitdiff
path: root/src/node_crypto.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2017-07-10 12:56:37 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2017-07-17 23:09:22 +0200
commit61c49c37b7f14905f093fcb803c1e39ea81fed3f (patch)
tree079fd87a9809a9a8018183bf4b76974ed41532b1 /src/node_crypto.h
parent92f3e4d4873cf96ed2e5cc2b716a92bf7d23a9af (diff)
downloadandroid-node-v8-61c49c37b7f14905f093fcb803c1e39ea81fed3f.tar.gz
android-node-v8-61c49c37b7f14905f093fcb803c1e39ea81fed3f.tar.bz2
android-node-v8-61c49c37b7f14905f093fcb803c1e39ea81fed3f.zip
src: remove superfluous cipher_ data member
The EVP_CIPHER can be reconstructed from the EVP_CIPHER_CTX instance, no need to store it separately. This brought to light the somewhat dubious practice of accessing the EVP_CIPHER after the EVP_CIPHER_CTX instance had been destroyed. It's mostly harmless due to the static nature of built-in EVP_CIPHER instances but it segfaults when the cipher is provided by an ENGINE and the ENGINE is unloaded because its reference count drops to zero. PR-URL: https://github.com/nodejs/node/pull/14122 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_crypto.h')
-rw-r--r--src/node_crypto.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h
index db7a97920b..f46e77d6bc 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -467,7 +467,6 @@ class CipherBase : public BaseObject {
v8::Local<v8::Object> wrap,
CipherKind kind)
: BaseObject(env, wrap),
- cipher_(nullptr),
initialised_(false),
kind_(kind),
auth_tag_len_(0) {
@@ -476,7 +475,6 @@ class CipherBase : public BaseObject {
private:
EVP_CIPHER_CTX ctx_; /* coverity[member_decl] */
- const EVP_CIPHER* cipher_; /* coverity[member_decl] */
bool initialised_;
CipherKind kind_;
unsigned int auth_tag_len_;