]> granicus.if.org Git - php/commitdiff
Add openssl.cafile ini check when loading cainfo
authorDaniel Lowrey <rdlowrey@php.net>
Mon, 24 Feb 2014 20:55:55 +0000 (13:55 -0700)
committerDaniel Lowrey <rdlowrey@php.net>
Tue, 25 Feb 2014 16:59:13 +0000 (09:59 -0700)
ext/curl/interface.c

index 921929aa52d13d0b6dcf2f2291566ed644faf738..a9282ec95aed413cba66aad8224d137a6565a199 100644 (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);
        }