summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-06-14 13:35:32 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-06-24 10:54:05 +0000
commit36ba1d882508af2a3c6ce1e2aa807b4a2d0226f3 (patch)
tree212a1717a4d157f3c34af07d865e5e0bfed0b76d /lib
parent4b1050686dceec4e6054a8b853f023dc6b4bbdf4 (diff)
downloadnextcloud-server-36ba1d882508af2a3c6ce1e2aa807b4a2d0226f3.tar.gz
nextcloud-server-36ba1d882508af2a3c6ce1e2aa807b4a2d0226f3.zip
fix: don't use custom certificate bundle if no customer certificates are configured
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-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 cf5f0f41d56..fbe4a7ced52 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -228,17 +228,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;