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
diff options
context:
space:
mode:
authorGit'Fellow <carlos@reendex.com>2022-05-16 13:30:44 +0300
committerGitHub <noreply@github.com>2022-05-16 13:30:44 +0300
commitf6b1d50a61fa3deedee311935d17de695a3d0779 (patch)
tree1542efb30d3c22c4d6a5cb0c1c4edfdb6420383a /lib/private
parent5effc7320ec45bb7f04593caac54b05d90e914bc (diff)
Fix backport
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Security/CertificateManager.php23
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;
}
/**