diff options
author | himself65 <himself65@outlook.com> | 2020-05-13 08:44:41 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-05-15 20:39:13 +0300 |
commit | 21b5c5f9e0e8d80f23fa258031e9da68e2c25d34 (patch) | |
tree | 4425b9adbb58ba8867caa07e53b2cc3bcbabd6bd /src/node_crypto.cc | |
parent | e65d189e508056e9ce16377bcc42dc02a64e46c6 (diff) |
src: replace to CHECK_NOT_NULL in node_crypto
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'src/node_crypto.cc')
-rw-r--r-- | src/node_crypto.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index d53a6d2f232..d2f67808ce9 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 |