Skip to content

Commit 80e798e

Browse files
sam-githubevanlucas
authored andcommitted
crypto: use CHECK_NE instead of ABORT or abort
Use of abort() was added in 34febfb, and changed to ABORT() in 21826ef, but conditional+ABORT() is better expressesed using a CHECK_xxx() macro. See: #9409 (comment) PR-URL: #10413 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0a0c190 commit 80e798e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/node_crypto.cc

+2-5
Original file line numberDiff line numberDiff line change
@@ -701,11 +701,8 @@ static X509_STORE* NewRootCertStore() {
701701
X509 *x509 = PEM_read_bio_X509(bp, nullptr, CryptoPemCallback, nullptr);
702702
BIO_free(bp);
703703

704-
if (x509 == nullptr) {
705-
// Parse errors from the built-in roots are fatal.
706-
ABORT();
707-
return nullptr;
708-
}
704+
// Parse errors from the built-in roots are fatal.
705+
CHECK_NE(x509, nullptr);
709706

710707
root_certs_vector->push_back(x509);
711708
}

0 commit comments

Comments
 (0)