Check for SSL_CTX_set_default_verify_paths return code.
GitOrigin-RevId: 9f282b9c8ea7290588d45e310e667c05742041e9
This commit is contained in:
parent
8079285e5c
commit
cb165adf7c
@ -267,9 +267,15 @@ class SslStreamImpl {
|
||||
} else {
|
||||
LOG(ERROR) << "Failed to open system certificate store";
|
||||
}
|
||||
|
||||
#else
|
||||
SSL_CTX_set_default_verify_paths(ssl_ctx);
|
||||
if (SSL_CTX_set_default_verify_paths(ssl_ctx) == 0) {
|
||||
auto error = create_openssl_error(-8, "Failed to load default verify paths");
|
||||
if (verify_peer == VerifyPeer::On) {
|
||||
return error;
|
||||
} else {
|
||||
LOG(ERROR) << error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if (SSL_CTX_load_verify_locations(ssl_ctx, cert_file.c_str(), nullptr) == 0) {
|
||||
|
Reference in New Issue
Block a user