From: Daniel Lowrey Date: Mon, 24 Feb 2014 20:55:55 +0000 (-0700) Subject: Add openssl.cafile ini check when loading cainfo X-Git-Tag: php-5.6.0alpha3~1^2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a031dc06d9b903705c7dd433d1361ba265ee4dfa;p=php Add openssl.cafile ini check when loading cainfo --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 921929aa52..a9282ec95a 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -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); }