Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGit'Fellow <carlos@reendex.com>2022-05-16 13:28:50 +0300
committerGitHub <noreply@github.com>2022-05-16 13:28:50 +0300
commit5effc7320ec45bb7f04593caac54b05d90e914bc (patch)
tree0f038c56df8bf396416c097ee58b8b56b4012e4b /lib
parenteafa64d5a5f92668f28a3a8950a908d0c1f8ab4a (diff)
Fix backport
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Security/CertificateManager.php16
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;
}
/**