Skip to content
Permalink
Browse files
src: replace to CHECK_NOT_NULL in node_crypto
PR-URL: #33383
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
Himself65 authored and codebytere committed Jun 9, 2020
1 parent 5da7d52 commit a0bc2e3b64695a1eeb9d625a10e4dddbec7427b7
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/node_crypto.cc
@@ -2903,7 +2903,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());
}

@@ -3109,7 +3109,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();
@@ -3251,7 +3251,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

0 comments on commit a0bc2e3

Please sign in to comment.