From 2cbf7f704d4afcb1121e0af084c7ae36895ed215 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Fri, 12 Feb 2021 23:49:47 +0900 Subject: Check empty string conditions for ssl_ca_file and ssl_ca_path --- url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'url.c') diff --git a/url.c b/url.c index e6cb437..a91ef91 100644 --- a/url.c +++ b/url.c @@ -444,7 +444,8 @@ openSSLHandle(int sock, char *hostname, char **p_cert) goto eend; } } - if ((!ssl_ca_file && !ssl_ca_path) + if ((!ssl_ca_file || *ssl_ca_file == '\0') + && (!ssl_ca_path || *ssl_ca_path == '\0') || !SSL_CTX_load_verify_locations(ssl_ctx, ssl_ca_file, ssl_ca_path)) #endif /* defined(USE_SSL_VERIFY) */ SSL_CTX_set_default_verify_paths(ssl_ctx); -- cgit v1.2.3