diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 4e1a3f9405f319..222f4089d8c304 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3458,7 +3458,6 @@ bool Hash::HashInit(const char* hash_type) { mdctx_.reset(); return false; } - finalized_ = false; return true; } @@ -3512,7 +3511,6 @@ void Hash::HashDigest(const FunctionCallbackInfo& args) { unsigned int md_len; EVP_DigestFinal_ex(hash->mdctx_.get(), md_value, &md_len); - hash->finalized_ = true; Local error; MaybeLocal rc = diff --git a/src/node_crypto.h b/src/node_crypto.h index 5f98af754ea727..0ee45cf9ea2c02 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -476,14 +476,12 @@ class Hash : public BaseObject { Hash(Environment* env, v8::Local wrap) : BaseObject(env, wrap), - mdctx_(nullptr), - finalized_(false) { + mdctx_(nullptr) { MakeWeak(); } private: EVPMDPointer mdctx_; - bool finalized_; }; class SignBase : public BaseObject {