summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-05-26 11:43:46 +0200
committerGitHub <noreply@github.com>2020-05-26 11:43:46 +0200
commit24e97c1a7c3805d0c724c36b70e7a41d4d30feb2 (patch)
treebabe86eada11559e5c382e26cfd2094c943fb045 /lib/private
parent3bf02858402a4520fb294eaef656b9863d1a2658 (diff)
parentebbdd2de33771751b4d0ff16743763e4804f5a03 (diff)
downloadnextcloud-server-24e97c1a7c3805d0c724c36b70e7a41d4d30feb2.tar.gz
nextcloud-server-24e97c1a7c3805d0c724c36b70e7a41d4d30feb2.zip
Merge pull request #21095 from nextcloud/backport/21090/stable19
[stable19] Do not read certificate bundle from data dir by default
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Http/Client/Client.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index d19f1124a23..c0b05c48b96 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -93,18 +93,18 @@ class Client implements IClient {
}
private function getCertBundle(): string {
- if ($this->certificateManager->listCertificates() !== []) {
- return $this->certificateManager->getAbsoluteBundlePath();
- }
-
// 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)) {
- return $this->certificateManager->getAbsoluteBundlePath(null);
+ if ($this->config->getSystemValue('installed', false) === false) {
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ }
+
+ if ($this->certificateManager->listCertificates() === []) {
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
}
- return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ return $this->certificateManager->getAbsoluteBundlePath();
}
/**