mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
if verifypeer is enabled but nether CAfile nor CApath is, then don't try
to load "verify_locations"
This commit is contained in:
parent
7438c378be
commit
56c43604d0
@ -739,7 +739,8 @@ Curl_SSLConnect(struct connectdata *conn)
|
|||||||
SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT|
|
SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT|
|
||||||
SSL_VERIFY_CLIENT_ONCE,
|
SSL_VERIFY_CLIENT_ONCE,
|
||||||
cert_verify_callback);
|
cert_verify_callback);
|
||||||
if (!SSL_CTX_load_verify_locations(conn->ssl.ctx,
|
if ((data->set.ssl.CAfile || data->set.ssl.CApath) &&
|
||||||
|
!SSL_CTX_load_verify_locations(conn->ssl.ctx,
|
||||||
data->set.ssl.CAfile,
|
data->set.ssl.CAfile,
|
||||||
data->set.ssl.CApath)) {
|
data->set.ssl.CApath)) {
|
||||||
failf(data,"error setting cerficate verify locations");
|
failf(data,"error setting cerficate verify locations");
|
||||||
|
Loading…
Reference in New Issue
Block a user