diff options
author | Robin Appelman <robin@icewind.nl> | 2024-06-24 11:28:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 11:28:19 +0200 |
commit | 2cf8ed905dc97b81877bbd124696f91c459a56d7 (patch) | |
tree | 471d7f71b13d705ca3fe9012d0c6d8e607bb5312 | |
parent | 02452712a20b9be2c638e9bea80102b9926d482b (diff) | |
parent | e140907123a3975aed19caf644627dd2b953971c (diff) | |
download | nextcloud-server-2cf8ed905dc97b81877bbd124696f91c459a56d7.tar.gz nextcloud-server-2cf8ed905dc97b81877bbd124696f91c459a56d7.zip |
Merge pull request #45877 from nextcloud/fix-default-cert-bundle-path
fix: don't use custom certificate bundle if no customer certificates are configured
-rw-r--r-- | lib/private/Security/CertificateManager.php | 18 |
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; |