aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Security/CertificateManager.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index 4e3ec96b87b..f9fd2b160b8 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -204,17 +204,17 @@ class CertificateManager implements ICertificateManager {
if ($this->bundlePath === null) {
if (!$this->hasCertificates()) {
$this->bundlePath = \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
- }
-
- if ($this->needsRebundling()) {
- $this->createCertificateBundle();
- }
+ } else {
+ if ($this->needsRebundling()) {
+ $this->createCertificateBundle();
+ }
- $certificateBundle = $this->getCertificateBundle();
- $this->bundlePath = $this->view->getLocalFile($certificateBundle) ?: null;
+ $certificateBundle = $this->getCertificateBundle();
+ $this->bundlePath = $this->view->getLocalFile($certificateBundle) ?: null;
- if ($this->bundlePath === null) {
- throw new \RuntimeException('Unable to get certificate bundle "' . $certificateBundle . '".');
+ if ($this->bundlePath === null) {
+ throw new \RuntimeException('Unable to get certificate bundle "' . $certificateBundle . '".');
+ }
}
}
return $this->bundlePath;