Browse Source

crypto: use CHECK_NE instead of ABORT or abort

Use of abort() was added in 34febfbf4, and changed to ABORT()
in 21826ef21a, 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>
v6.x
Sam Roberts 8 years ago
committed by Myles Borins
parent
commit
1f44922e34
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 7
      src/node_crypto.cc

7
src/node_crypto.cc

@ -698,11 +698,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);
}

Loading…
Cancel
Save