Fix backport

This commit is contained in:
Git'Fellow 2022-05-16 12:30:44 +02:00 committed by GitHub
parent 5effc7320e
commit f6b1d50a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
/**