aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/CertificateManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Security/CertificateManager.php')
-rw-r--r--lib/private/Security/CertificateManager.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index 0c6791163c2..6f3b01e23b9 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -240,15 +240,19 @@ class CertificateManager implements ICertificateManager {
* @return string
*/
public function getAbsoluteBundlePath(): string {
- if (!$this->hasCertificates()) {
- return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
- }
+ try {
+ if (!$this->hasCertificates()) {
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ }
- if ($this->needsRebundling()) {
- $this->createCertificateBundle();
- }
+ if ($this->needsRebundling()) {
+ $this->createCertificateBundle();
+ }
- return $this->view->getLocalFile($this->getCertificateBundle());
+ return $this->view->getLocalFile($this->getCertificateBundle());
+ } catch (\Exception $e) {
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ }
}
/**