Revert "Do not read certificate bundle from data dir by default"
This reverts commit 18b0d753f2
.
This commit is contained in:
parent
a53871f629
commit
b1e9752169
|
@ -98,18 +98,18 @@ class Client implements IClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getCertBundle(): string {
|
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
|
// If the instance is not yet setup we need to use the static path as
|
||||||
// $this->certificateManager->getAbsoluteBundlePath() tries to instantiate
|
// $this->certificateManager->getAbsoluteBundlePath() tries to instantiate
|
||||||
// a view
|
// a view
|
||||||
if ($this->config->getSystemValue('installed', false) === false) {
|
if ($this->config->getSystemValue('installed', false)) {
|
||||||
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
|
return $this->certificateManager->getAbsoluteBundlePath(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->certificateManager->listCertificates() === []) {
|
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
|
||||||
return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->certificateManager->getAbsoluteBundlePath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -461,8 +461,9 @@ class ClientTest extends \Test\TestCase {
|
||||||
->with('installed', false)
|
->with('installed', false)
|
||||||
->willReturn(false);
|
->willReturn(false);
|
||||||
$this->certificateManager
|
$this->certificateManager
|
||||||
->expects($this->never())
|
->expects($this->once())
|
||||||
->method('listCertificates');
|
->method('listCertificates')
|
||||||
|
->willReturn([]);
|
||||||
|
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
'verify' => \OC::$SERVERROOT . '/resources/config/ca-bundle.crt',
|
'verify' => \OC::$SERVERROOT . '/resources/config/ca-bundle.crt',
|
||||||
|
|
Loading…
Reference in New Issue