diff options
author | Git'Fellow <carlos@reendex.com> | 2022-05-16 13:28:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 13:28:50 +0300 |
commit | 5effc7320ec45bb7f04593caac54b05d90e914bc (patch) | |
tree | 0f038c56df8bf396416c097ee58b8b56b4012e4b /lib | |
parent | eafa64d5a5f92668f28a3a8950a908d0c1f8ab4a (diff) |
Fix backport
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Security/CertificateManager.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php index 38218a721e0..410c2832956 100644 --- a/lib/private/Security/CertificateManager.php +++ b/lib/private/Security/CertificateManager.php @@ -245,15 +245,19 @@ class CertificateManager implements ICertificateManager { * @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; } /** |