diff --git a/src/node_crypto.cc b/src/node_crypto.cc index d53a6d2f2325fe..d2f67808ce9bde 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2923,7 +2923,7 @@ ByteSource ByteSource::NullTerminatedCopy(Environment* env, ByteSource ByteSource::FromSymmetricKeyObject(Local<Value> handle) { CHECK(handle->IsObject()); KeyObject* key = Unwrap<KeyObject>(handle.As<Object>()); - CHECK(key); + CHECK_NOT_NULL(key); return Foreign(key->GetSymmetricKey(), key->GetSymmetricKeySize()); } @@ -3129,7 +3129,7 @@ static ManagedEVPPKey GetPublicOrPrivateKeyFromJs( } else { CHECK(args[*offset]->IsObject()); KeyObject* key = Unwrap<KeyObject>(args[*offset].As<Object>()); - CHECK(key); + CHECK_NOT_NULL(key); CHECK_NE(key->GetKeyType(), kKeyTypeSecret); (*offset) += 4; return key->GetAsymmetricKey(); @@ -3271,7 +3271,7 @@ MaybeLocal<Object> KeyObject::Create(Environment* env, } KeyObject* key = Unwrap<KeyObject>(obj); - CHECK(key); + CHECK_NOT_NULL(key); if (key_type == kKeyTypePublic) key->InitPublic(pkey); else