Skip to content

Commit

Permalink
fix: don't use custom certificate bundle if no customer certificates …
Browse files Browse the repository at this point in the history
…are configured

Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and backportbot[bot] committed Jun 24, 2024
1 parent 4b10506 commit 36ba1d8
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 36ba1d8

Please sign in to comment.