From a031dc06d9b903705c7dd433d1361ba265ee4dfa Mon Sep 17 00:00:00 2001 From: Daniel Lowrey Date: Mon, 24 Feb 2014 13:55:55 -0700 Subject: [PATCH] Add openssl.cafile ini check when loading cainfo --- ext/curl/interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.50.1