summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
Diffstat (limited to 'vio')
-rw-r--r--vio/viosslfactories.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 55d3792365f..a12a45df648 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -301,6 +301,14 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
{
struct st_VioSSLFd *ssl_fd;
int verify= SSL_VERIFY_PEER;
+
+ /*
+ Turn off verification of servers certificate if both
+ ca_file and ca_path is set to NULL
+ */
+ if (ca_file == 0 && ca_path == 0)
+ verify= SSL_VERIFY_NONE;
+
if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
ca_path, cipher, TLSv1_client_method())))
{