return default bundle when there is an error getting the bundle

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-03-14 18:34:09 +01:00 committed by backportbot[bot]
parent 63dd72fda0
commit a13ae6b64f

View file

@ -240,15 +240,19 @@ class CertificateManager implements ICertificateManager {
* @return string
*/
public function getAbsoluteBundlePath(): string {
if (!$this->hasCertificates()) {
try {
if (!$this->hasCertificates()) {
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
}
if ($this->needsRebundling()) {
$this->createCertificateBundle();
}
return $this->view->getLocalFile($this->getCertificateBundle());
} catch (\Exception $e) {
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
}
if ($this->needsRebundling()) {
$this->createCertificateBundle();
}
return $this->view->getLocalFile($this->getCertificateBundle());
}
/**