Skip to content

Commit 1f44922

Browse files
sam-githubMylesBorins
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 38d63e4 commit 1f44922

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/node_crypto.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -698,11 +698,8 @@ static X509_STORE* NewRootCertStore() {
698698
X509 *x509 = PEM_read_bio_X509(bp, nullptr, CryptoPemCallback, nullptr);
699699
BIO_free(bp);
700700

701-
if (x509 == nullptr) {
702-
// Parse errors from the built-in roots are fatal.
703-
ABORT();
704-
return nullptr;
705-
}
701+
// Parse errors from the built-in roots are fatal.
702+
CHECK_NE(x509, nullptr);
706703

707704
root_certs_vector->push_back(x509);
708705
}

0 commit comments

Comments
 (0)