aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-06-14 13:35:32 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2024-06-14 16:27:41 +0200
commite140907123a3975aed19caf644627dd2b953971c (patch)
tree7270c556857a134fa5b218e4ed10b45c61a7dcc1 /lib/private/Security
parent54bf26ae50138606085cdaec50a8443bdf0b7b50 (diff)
downloadnextcloud-server-e140907123a3975aed19caf644627dd2b953971c.tar.gz
nextcloud-server-e140907123a3975aed19caf644627dd2b953971c.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/private/Security')
-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;