Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix backport
  • Loading branch information
solracsf authored May 16, 2022
commit 5effc7320ec45bb7f04593caac54b05d90e914bc
16 changes: 10 additions & 6 deletions lib/private/Security/CertificateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,19 @@ public function getCertificateBundle(): string {
* @return string
*/
public function getAbsoluteBundlePath(): string {
if (!$this->hasCertificates()) {
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
}
if (!$this->bundlePath) {
if (!$this->hasCertificates()) {
$this->bundlePath = \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
}

if ($this->needsRebundling()) {
$this->createCertificateBundle();
if ($this->needsRebundling()) {
$this->createCertificateBundle();
}

$this->bundlePath = $this->view->getLocalFile($this->getCertificateBundle());
}

return $this->view->getLocalFile($this->getCertificateBundle());
return $this->bundlePath;
}

/**
Expand Down