1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 23:23:03 +02:00

Add openssl.cafile ini check when loading cainfo

This commit is contained in:
Daniel Lowrey
2014-02-24 13:55:55 -07:00
parent 47b5873c5d
commit a031dc06d9

View File

@@ -1895,7 +1895,10 @@ static void _php_curl_set_default_options(php_curl *ch)
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
cainfo = INI_STR("curl.cainfo");
cainfo = INI_STR("openssl.cafile");
if (!(cainfo && strlen(cainfo) > 0)) {
cainfo = INI_STR("curl.cainfo");
}
if (cainfo && strlen(cainfo) > 0) {
curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo);
}