diff options
author | Git'Fellow <carlos@reendex.com> | 2022-05-16 13:30:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 13:30:44 +0300 |
commit | f6b1d50a61fa3deedee311935d17de695a3d0779 (patch) | |
tree | 1542efb30d3c22c4d6a5cb0c1c4edfdb6420383a /lib/private | |
parent | 5effc7320ec45bb7f04593caac54b05d90e914bc (diff) |
Fix backport
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Security/CertificateManager.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php index 410c2832956..74ea59c3792 100644 --- a/lib/private/Security/CertificateManager.php +++ b/lib/private/Security/CertificateManager.php @@ -245,19 +245,22 @@ class CertificateManager implements ICertificateManager { * @return string */ public function getAbsoluteBundlePath(): string { - if (!$this->bundlePath) { - if (!$this->hasCertificates()) { - $this->bundlePath = \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; - } + try { + 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()); + $this->bundlePath = $this->view->getLocalFile($this->getCertificateBundle()); + } + return $this->bundlePath; + } catch (\Exception $e) { + return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; } - - return $this->bundlePath; } /** |