summaryrefslogtreecommitdiffstats
path: root/lib/private/http
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-12-22 17:42:28 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-12 12:50:59 +0100
commitc15cab7ed6bf2d3ce9009ca09c7c5f33b252860f (patch)
tree08d3aefd146ce159b23073958f2fb7e96ace4143 /lib/private/http
parent0c0829fbc73ce10ea1a951989c20973b6b5faa16 (diff)
downloadnextcloud-server-c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f.tar.gz
nextcloud-server-c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f.zip
Allow admins to add system wide root certificates
Diffstat (limited to 'lib/private/http')
-rw-r--r--lib/private/http/client/client.php9
1 files changed, 4 insertions, 5 deletions
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');