Browse Source
Merge pull request #45877 from nextcloud/fix-default-cert-bundle-path
fix: don't use custom certificate bundle if no customer certificates are configured
pull/45876/head
Robin Appelman
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
9 additions and
9 deletions
-
lib/private/Security/CertificateManager.php
|
|
|
@ -204,8 +204,7 @@ class CertificateManager implements ICertificateManager { |
|
|
|
if ($this->bundlePath === null) { |
|
|
|
if (!$this->hasCertificates()) { |
|
|
|
$this->bundlePath = \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
if ($this->needsRebundling()) { |
|
|
|
$this->createCertificateBundle(); |
|
|
|
} |
|
|
|
@ -217,6 +216,7 @@ class CertificateManager implements ICertificateManager { |
|
|
|
throw new \RuntimeException('Unable to get certificate bundle "' . $certificateBundle . '".'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->bundlePath; |
|
|
|
} catch (\Exception $e) { |
|
|
|
$this->logger->error('Failed to get absolute bundle path. Fallback to default ca-bundle.crt', ['exception' => $e]); |
|
|
|
|