aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-30 12:07:42 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-30 12:07:42 +0000
commit56c43604d085d50567a222670c4d24e25150647e (patch)
treee0597950dc5843e751b690814d726e458480413e /lib
parent7438c378bef220a335e03df28c7596a49fdda980 (diff)
if verifypeer is enabled but nether CAfile nor CApath is, then don't try
to load "verify_locations"
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 5a002f01c..019c78bfd 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -739,7 +739,8 @@ Curl_SSLConnect(struct connectdata *conn)
SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT|
SSL_VERIFY_CLIENT_ONCE,
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.CApath)) {
failf(data,"error setting cerficate verify locations");