summaryrefslogtreecommitdiffstats
path: root/lib/private/http
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-12 15:01:46 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-12 15:01:46 +0100
commiteac5d9fb3a52932fafdb200a2cf5d50fe9f1c759 (patch)
treeb5ebb8da406d6d667632beb4b764568c8ff954a3 /lib/private/http
parent2493cfede92c472c29cffc098206b8cdb7a2ca30 (diff)
parent0d0377ebfb123e079822632ae4bc6855a11eb117 (diff)
downloadnextcloud-server-eac5d9fb3a52932fafdb200a2cf5d50fe9f1c759.tar.gz
nextcloud-server-eac5d9fb3a52932fafdb200a2cf5d50fe9f1c759.zip
Merge pull request #21336 from owncloud/system-root-certs
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');