mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #21669 from nextcloud/revert-21097-backport/21090/stable17
Revert "[stable17] Do not read certificate bundle from data dir by de…
This commit is contained in:
commit
a6c1ef73c3
2 changed files with 10 additions and 9 deletions
|
|
@ -76,18 +76,18 @@ class Client implements IClient {
|
|||
}
|
||||
|
||||
private function getCertBundle(): string {
|
||||
if ($this->certificateManager->listCertificates() !== []) {
|
||||
return $this->certificateManager->getAbsoluteBundlePath();
|
||||
}
|
||||
|
||||
// If the instance is not yet setup we need to use the static path as
|
||||
// $this->certificateManager->getAbsoluteBundlePath() tries to instantiiate
|
||||
// a view
|
||||
if ($this->config->getSystemValue('installed', false) === false) {
|
||||
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
|
||||
if ($this->config->getSystemValue('installed', false)) {
|
||||
return $this->certificateManager->getAbsoluteBundlePath(null);
|
||||
}
|
||||
|
||||
if ($this->certificateManager->listCertificates() === []) {
|
||||
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
|
||||
}
|
||||
|
||||
return $this->certificateManager->getAbsoluteBundlePath();
|
||||
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -262,8 +262,9 @@ class ClientTest extends \Test\TestCase {
|
|||
->with('installed', false)
|
||||
->willReturn(false);
|
||||
$this->certificateManager
|
||||
->expects($this->never())
|
||||
->method('listCertificates');
|
||||
->expects($this->once())
|
||||
->method('listCertificates')
|
||||
->willReturn([]);
|
||||
|
||||
$this->assertEquals([
|
||||
'verify' => \OC::$SERVERROOT . '/resources/config/ca-bundle.crt',
|
||||
|
|
|
|||
Loading…
Reference in a new issue