mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
crypto: use CHECK_NE instead of ABORT or abort
Use of abort() was added in34febfbf4, and changed to ABORT() in21826ef21a, but conditional+ABORT() is better expressesed using a CHECK_xxx() macro. See: https://github.com/nodejs/node/pull/9409#discussion_r93575328 PR-URL: https://github.com/nodejs/node/pull/10413 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
3d290d2b68
commit
d9ac34cb79
1 file changed
+2
-5
+2
-5
@@ -701,11 +701,8 @@ static X509_STORE* NewRootCertStore() {
|
||||
X509 *x509 = PEM_read_bio_X509(bp, nullptr, CryptoPemCallback, nullptr);
|
||||
BIO_free(bp);
|
||||
|
||||
if (x509 == nullptr) {
|
||||
// Parse errors from the built-in roots are fatal.
|
||||
ABORT();
|
||||
return nullptr;
|
||||
}
|
||||
// Parse errors from the built-in roots are fatal.
|
||||
CHECK_NE(x509, nullptr);
|
||||
|
||||
root_certs_vector->push_back(x509);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user