mirror of
https://github.com/nextcloud/server.git
synced 2026-06-07 07:43:18 -04:00
fix: don't use custom certificate bundle if no customer certificates are configured
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
9c018a3a5c
commit
b86392691e
1 changed files with 9 additions and 9 deletions
|
|
@ -228,17 +228,17 @@ 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();
|
||||
}
|
||||
|
||||
if ($this->needsRebundling()) {
|
||||
$this->createCertificateBundle();
|
||||
}
|
||||
$certificateBundle = $this->getCertificateBundle();
|
||||
$this->bundlePath = $this->view->getLocalFile($certificateBundle) ?: null;
|
||||
|
||||
$certificateBundle = $this->getCertificateBundle();
|
||||
$this->bundlePath = $this->view->getLocalFile($certificateBundle) ?: null;
|
||||
|
||||
if ($this->bundlePath === null) {
|
||||
throw new \RuntimeException('Unable to get certificate bundle "' . $certificateBundle . '".');
|
||||
if ($this->bundlePath === null) {
|
||||
throw new \RuntimeException('Unable to get certificate bundle "' . $certificateBundle . '".');
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->bundlePath;
|
||||
|
|
|
|||
Loading…
Reference in a new issue