summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/http/client/client.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/http/client/client.php b/lib/private/http/client/client.php
index 8cadeda0efd..bd9e82ddae7 100644
--- a/lib/private/http/client/client.php
+++ b/lib/private/http/client/client.php
@@ -62,7 +62,14 @@ class Client implements IClient {
if ($this->certificateManager->listCertificates() !== []) {
$this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath());
} else {
- $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null));
+ // If the instance is not yet setup we need to use the static path as
+ // $this->certificateManager->getAbsoluteBundlePath() tries to instantiiate
+ // a view
+ if($this->config->getSystemValue('installed', false)) {
+ $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null));
+ } else {
+ $this->client->setDefaultOption('verify', \OC::$SERVERROOT . '/resources/config/ca-bundle.crt');
+ }
}
$this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler');