Skip to content

Commit

Permalink
Merge pull request #46069 from nextcloud/backport/45877/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: don't use custom certificate bundle if no customer certificates are configured
  • Loading branch information
AndyScherzinger authored Jul 10, 2024
2 parents 0f33283 + 36ba1d8 commit 650aec5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/private/Security/CertificateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,17 @@ public function getAbsoluteBundlePath(): string {
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;
Expand Down

0 comments on commit 650aec5

Please sign in to comment.