Skip to content

Commit ac60007

Browse files
committed
Clear errors after SSL_CTX_load_verify_locations()
We report our own errors here. Make sure these don't clog up the error queue.
1 parent 2e02579 commit ac60007

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/openssl/xp_ssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ static int php_openssl_enable_peer_verification(SSL_CTX *ctx, php_stream *stream
871871

872872
if (cafile || capath) {
873873
if (!SSL_CTX_load_verify_locations(ctx, cafile, capath)) {
874+
ERR_clear_error();
874875
if (cafile && !php_openssl_load_stream_cafile(SSL_CTX_get_cert_store(ctx), cafile)) {
875876
return FAILURE;
876877
}

0 commit comments

Comments
 (0)