Skip to content

Commit cbf0e5a

Browse files
committed
src: remove finalized_ member from Hash class
This commit removes the finalized_ member from the Hash class as it does not seem to be used in any valuable way. Commit c75f87c ("crypto: refactor the crypto module") removed the check where it was previously used. PR-URL: #24822 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 59b46a4 commit cbf0e5a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/node_crypto.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3458,7 +3458,6 @@ bool Hash::HashInit(const char* hash_type) {
34583458
mdctx_.reset();
34593459
return false;
34603460
}
3461-
finalized_ = false;
34623461
return true;
34633462
}
34643463

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

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

35173515
Local<Value> error;
35183516
MaybeLocal<Value> rc =

src/node_crypto.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,12 @@ class Hash : public BaseObject {
476476

477477
Hash(Environment* env, v8::Local<v8::Object> wrap)
478478
: BaseObject(env, wrap),
479-
mdctx_(nullptr),
480-
finalized_(false) {
479+
mdctx_(nullptr) {
481480
MakeWeak();
482481
}
483482

484483
private:
485484
EVPMDPointer mdctx_;
486-
bool finalized_;
487485
};
488486

489487
class SignBase : public BaseObject {

0 commit comments

Comments
 (0)