From c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 22 Dec 2015 17:42:28 +0100 Subject: Allow admins to add system wide root certificates --- lib/private/http/client/client.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/private/http') diff --git a/lib/private/http/client/client.php b/lib/private/http/client/client.php index 5f298e1acd7..8cddfc3ae03 100644 --- a/lib/private/http/client/client.php +++ b/lib/private/http/client/client.php @@ -58,12 +58,11 @@ class Client implements IClient { * Sets the default options to the client */ private function setDefaultOptions() { - // Either use default bundle or the user bundle if nothing is specified - if($this->certificateManager->listCertificates() !== []) { - $dataDir = $this->config->getSystemValue('datadirectory'); - $this->client->setDefaultOption('verify', $dataDir.'/'.$this->certificateManager->getCertificateBundle()); + // Either use user bundle or the system bundle if nothing is specified + if ($this->certificateManager->listCertificates() !== []) { + $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath()); } else { - $this->client->setDefaultOption('verify', \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'); + $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null)); } $this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler'); -- cgit v1.2.3