diff options
-rw-r--r-- | lib/vtls/openssl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 90e4c2b32..8600c6184 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2644,8 +2644,10 @@ static CURLcode servercert(struct connectdata *conn, connssl->server_cert = SSL_get_peer_certificate(connssl->handle); if(!connssl->server_cert) { - if(strict) - failf(data, "SSL: couldn't get peer certificate!"); + if(!strict) + return CURLE_OK; + + failf(data, "SSL: couldn't get peer certificate!"); return CURLE_PEER_FAILED_VERIFICATION; } |