Summary: SSL_CTX_load_verify_locations interally end up using X509_load_cert_crt_file, which has an unchecked call to X509_STORE_add_cert. This can fail and add an error to the error stack without causing SSL_CTX_load_verify_locations to return an error.
Reviewed By: siyengar
Differential Revision:
D4442017
fbshipit-source-id:
a4cf7f5ee2c18d90d5d61baf3acb99ffca6b8af0
if (SSL_CTX_load_verify_locations(ctx_, path, nullptr) == 0) {
throw std::runtime_error("SSL_CTX_load_verify_locations: " + getErrors());
}
+ ERR_clear_error();
}
void SSLContext::loadTrustedCertificates(X509_STORE* store) {