Skip to content

Commit

Permalink
openssl: fix CURLINFO_SSL_VERIFYRESULT
Browse files Browse the repository at this point in the history
CURLINFO_SSL_VERIFYRESULT does not get the certificate verification
result when SSL_connect fails because of a certificate verification
error.

This fix saves the result of SSL_get_verify_result so that it is
returned by CURLINFO_SSL_VERIFYRESULT.

Closes #995
  • Loading branch information
malhotrag authored and jay committed Sep 6, 2016
1 parent 022dbdb commit 8e176a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/vtls/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)

lerr = SSL_get_verify_result(connssl->handle);
if(lerr != X509_V_OK) {
data->set.ssl.certverifyresult = lerr;
snprintf(error_buffer, sizeof(error_buffer),
"SSL certificate problem: %s",
X509_verify_cert_error_string(lerr));
Expand Down

0 comments on commit 8e176a7

Please sign in to comment.