summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-07-03 14:21:28 +0200
committerGitHub <noreply@github.com>2020-07-03 14:21:28 +0200
commitf3cb2a82089fcb82ee328e19e84e92b22287bde6 (patch)
treef1f9072d7b9d970042acfffe03fc54b11c46b0ad /lib/private
parent68fdcc03bfa5058d59773cbe006c60bc5b9fec01 (diff)
downloadnextcloud-server-f3cb2a82089fcb82ee328e19e84e92b22287bde6.tar.gz
nextcloud-server-f3cb2a82089fcb82ee328e19e84e92b22287bde6.zip
Revert "[stable18] 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 3e606caae19..c52d90ff8ec 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -81,18 +81,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) === false) {
- return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
- }
-
- if ($this->certificateManager->listCertificates() === []) {
- return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ if ($this->config->getSystemValue('installed', false)) {
+ return $this->certificateManager->getAbsoluteBundlePath(null);
}
- return $this->certificateManager->getAbsoluteBundlePath();
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
}
/**