Skip to content

Commit e4e0cf6

Browse files

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/node_crypto.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3922,7 +3922,6 @@ void Hmac::New(const FunctionCallbackInfo<Value>& args) {
39223922
void Hmac::HmacInit(const char* hash_type, const char* key, int key_len) {
39233923
HandleScope scope(env()->isolate());
39243924

3925-
CHECK_EQ(initialised_, false);
39263925
const EVP_MD* md = EVP_get_digestbyname(hash_type);
39273926
if (md == nullptr) {
39283927
return env()->ThrowError("Unknown message digest");
@@ -4070,7 +4069,6 @@ void Hash::New(const FunctionCallbackInfo<Value>& args) {
40704069

40714070

40724071
bool Hash::HashInit(const char* hash_type) {
4073-
CHECK_EQ(initialised_, false);
40744072
const EVP_MD* md = EVP_get_digestbyname(hash_type);
40754073
if (md == nullptr)
40764074
return false;
@@ -4102,9 +4100,6 @@ void Hash::HashUpdate(const FunctionCallbackInfo<Value>& args) {
41024100

41034101
THROW_AND_RETURN_IF_NOT_STRING_OR_BUFFER(args[0], "Data");
41044102

4105-
if (!hash->initialised_) {
4106-
return env->ThrowError("Not initialized");
4107-
}
41084103
if (hash->finalized_) {
41094104
return env->ThrowError("Digest already called");
41104105
}
@@ -4134,9 +4129,6 @@ void Hash::HashDigest(const FunctionCallbackInfo<Value>& args) {
41344129
Hash* hash;
41354130
ASSIGN_OR_RETURN_UNWRAP(&hash, args.Holder());
41364131

4137-
if (!hash->initialised_) {
4138-
return env->ThrowError("Not initialized");
4139-
}
41404132
if (hash->finalized_) {
41414133
return env->ThrowError("Digest already called");
41424134
}

0 commit comments

Comments
 (0)