diff options
author | Daniel Lowrey <rdlowrey@php.net> | 2014-02-24 13:55:55 -0700 |
---|---|---|
committer | Daniel Lowrey <rdlowrey@php.net> | 2014-02-25 09:59:13 -0700 |
commit | a031dc06d9b903705c7dd433d1361ba265ee4dfa (patch) | |
tree | cd76262a3e882d2b39558c840a9f7f952dd5c5c4 | |
parent | 47b5873c5d0263e8e5feb4457df3594ddf3b4eda (diff) | |
download | php-git-a031dc06d9b903705c7dd433d1361ba265ee4dfa.tar.gz |
Add openssl.cafile ini check when loading cainfo
-rw-r--r-- | ext/curl/interface.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |