File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,18 +93,18 @@ private function buildRequestOptions(array $options): array {
9393 }
9494
9595 private function getCertBundle (): string {
96- if ($ this ->certificateManager ->listCertificates () !== []) {
97- return $ this ->certificateManager ->getAbsoluteBundlePath ();
98- }
99-
10096 // If the instance is not yet setup we need to use the static path as
10197 // $this->certificateManager->getAbsoluteBundlePath() tries to instantiiate
10298 // a view
103- if ($ this ->config ->getSystemValue ('installed ' , false )) {
104- return $ this ->certificateManager ->getAbsoluteBundlePath (null );
99+ if ($ this ->config ->getSystemValue ('installed ' , false ) === false ) {
100+ return \OC ::$ SERVERROOT . '/resources/config/ca-bundle.crt ' ;
101+ }
102+
103+ if ($ this ->certificateManager ->listCertificates () === []) {
104+ return \OC ::$ SERVERROOT . '/resources/config/ca-bundle.crt ' ;
105105 }
106106
107- return \ OC :: $ SERVERROOT . ' /resources/config/ca-bundle.crt ' ;
107+ return $ this -> certificateManager -> getAbsoluteBundlePath () ;
108108 }
109109
110110 /**
Original file line number Diff line number Diff line change @@ -460,9 +460,8 @@ public function testSetDefaultOptionsWithNotInstalled(): void {
460460 ->with ('installed ' , false )
461461 ->willReturn (false );
462462 $ this ->certificateManager
463- ->expects ($ this ->once ())
464- ->method ('listCertificates ' )
465- ->willReturn ([]);
463+ ->expects ($ this ->never ())
464+ ->method ('listCertificates ' );
466465
467466 $ this ->assertEquals ([
468467 'verify ' => \OC ::$ SERVERROOT . '/resources/config/ca-bundle.crt ' ,
You can’t perform that action at this time.
0 commit comments