openssl: fix CURLINFO_SSL_VERIFYRESULT
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 https://github.com/curl/curl/pull/995
This commit is contained in:
Родитель
022dbdb8ac
Коммит
8e176a7c79
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче