mirror of
https://github.com/curl/curl.git
synced 2026-05-15 02:16:20 +03:00
openssl: return CURLE_PEER_FAILED_VERIFICATION on failure to parse issuer
Failure to extract the issuer name from the server certificate should return a more specific error code like on other TLS backends.
This commit is contained in:
parent
5a3efb1dba
commit
59dc83379a
1 changed files with 2 additions and 2 deletions
|
|
@ -3210,7 +3210,7 @@ static CURLcode servercert(struct connectdata *conn,
|
|||
ossl_strerror(ERR_get_error(), error_buffer,
|
||||
sizeof(error_buffer)) );
|
||||
BIO_free(mem);
|
||||
return 0;
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
BACKEND->server_cert = SSL_get_peer_certificate(BACKEND->handle);
|
||||
|
|
@ -3257,7 +3257,7 @@ static CURLcode servercert(struct connectdata *conn,
|
|||
if(rc) {
|
||||
if(strict)
|
||||
failf(data, "SSL: couldn't get X509-issuer name!");
|
||||
result = CURLE_SSL_CONNECT_ERROR;
|
||||
result = CURLE_PEER_FAILED_VERIFICATION;
|
||||
}
|
||||
else {
|
||||
infof(data, " issuer: %s\n", buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue