diff --git a/src/http_client.c b/src/http_client.c index 92a4ed6dd..88375e954 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -1274,10 +1274,7 @@ struct proxy *httpclient_create_proxy(const char *id) /* if the verify is required, try to load the system CA */ if (httpclient_ssl_verify == SSL_SOCK_VERIFY_REQUIRED) { - if (!httpclient_ssl_ca_file) - httpclient_ssl_ca_file = strdup("@system-ca"); - - srv_ssl->ssl_ctx.ca_file = httpclient_ssl_ca_file; + srv_ssl->ssl_ctx.ca_file = strdup(httpclient_ssl_ca_file ? httpclient_ssl_ca_file : "@system-ca"); if (!ssl_store_load_locations_file(srv_ssl->ssl_ctx.ca_file, 1, CAFILE_CERT)) { /* if we failed to load the ca-file, only quits in * error with hard_error, otherwise just disable the