Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Dellwing <f.dellwing@netfutura.de>2019-05-06 01:58:01 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-05-06 01:58:01 +0300
commit0e045629582a500ad4eb70df22fb04eed841f14a (patch)
tree3b496eefa66dfc97c7b25ee63dbebd2ff6f841f9 /core/Http.php
parent7d97f5db7280626c40be64f8e452d248f959a294 (diff)
Add config option to use own cacert.pem file (#14113)
* fixes #13742 * add explaining text * minor tweak as in past we had sometimes trouble accessing Config::getInstance()->General['custom_cacert_pem'] directly on some systems shouldn't be an issue anymore, but better be safe.
Diffstat (limited to 'core/Http.php')
-rw-r--r--core/Http.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/Http.php b/core/Http.php
index 608a4c2f51..dcca126444 100644
--- a/core/Http.php
+++ b/core/Http.php
@@ -802,7 +802,13 @@ class Http
*/
public static function configCurlCertificate(&$ch)
{
- @curl_setopt($ch, CURLOPT_CAINFO, PIWIK_INCLUDE_PATH . '/core/DataFiles/cacert.pem');
+ $general = Config::getInstance()->General;
+ if (!empty($general['custom_cacert_pem'])) {
+ $cacertPath = $general['custom_cacert_pem'];
+ } else {
+ $cacertPath = PIWIK_INCLUDE_PATH . '/core/DataFiles/cacert.pem';
+ }
+ @curl_setopt($ch, CURLOPT_CAINFO, $cacertPath);
}
public static function getUserAgent()