Fix OpenSSL default always overrides ssl_ca_file and ssl_ca_path

This commit is contained in:
Tatsuya Kinoshita
2021-02-12 23:06:23 +09:00
parent bb1f22aacb
commit f0d17fecc4
+1 -1
View File
@@ -445,7 +445,7 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
} }
} }
if ((!ssl_ca_file && !ssl_ca_path) if ((!ssl_ca_file && !ssl_ca_path)
|| SSL_CTX_load_verify_locations(ssl_ctx, ssl_ca_file, ssl_ca_path)) || !SSL_CTX_load_verify_locations(ssl_ctx, ssl_ca_file, ssl_ca_path))
#endif /* defined(USE_SSL_VERIFY) */ #endif /* defined(USE_SSL_VERIFY) */
SSL_CTX_set_default_verify_paths(ssl_ctx); SSL_CTX_set_default_verify_paths(ssl_ctx);
#endif /* SSLEAY_VERSION_NUMBER >= 0x0800 */ #endif /* SSLEAY_VERSION_NUMBER >= 0x0800 */