Permalink
Browse files

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 <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>
  • Loading branch information...
1 parent 0a0c190 commit 80e798e3243136d3b63c0243e8d66a40aca06257 @sam-github sam-github committed with evanlucas Dec 22, 2016
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/node_crypto.cc
View
@@ -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);
}

0 comments on commit 80e798e

Please sign in to comment.