Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3458,7 +3458,6 @@ bool Hash::HashInit(const char* hash_type) {
mdctx_.reset();
return false;
}
finalized_ = false;
return true;
}

Expand Down Expand Up @@ -3512,7 +3511,6 @@ void Hash::HashDigest(const FunctionCallbackInfo<Value>& args) {
unsigned int md_len;

EVP_DigestFinal_ex(hash->mdctx_.get(), md_value, &md_len);
hash->finalized_ = true;

Local<Value> error;
MaybeLocal<Value> rc =
Expand Down
4 changes: 1 addition & 3 deletions src/node_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,12 @@ class Hash : public BaseObject {

Hash(Environment* env, v8::Local<v8::Object> wrap)
: BaseObject(env, wrap),
mdctx_(nullptr),
finalized_(false) {
mdctx_(nullptr) {
MakeWeak();
}

private:
EVPMDPointer mdctx_;
bool finalized_;
};

class SignBase : public BaseObject {
Expand Down