diff options
Diffstat (limited to 'lib/private/Files/ObjectStore/S3ConnectionTrait.php')
-rw-r--r-- | lib/private/Files/ObjectStore/S3ConnectionTrait.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index e4085676c18..d6f42c455b4 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -121,8 +121,14 @@ trait S3ConnectionTrait { ) ); - /** @var ICertificateManager $certManager */ - $certManager = \OC::$server->get(ICertificateManager::class); + // since we store the certificate bundles on the primary storage, we can't get the bundle while setting up the primary storage + if (!isset($this->params['primary_storage'])) { + /** @var ICertificateManager $certManager */ + $certManager = \OC::$server->get(ICertificateManager::class); + $certPath = $certManager->getAbsoluteBundlePath(); + } else { + $certPath = \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; + } $options = [ 'version' => isset($this->params['version']) ? $this->params['version'] : 'latest', @@ -133,7 +139,7 @@ trait S3ConnectionTrait { 'signature_provider' => \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()), 'csm' => false, 'use_arn_region' => false, - 'http' => ['verify' => $certManager->getAbsoluteBundlePath()], + 'http' => ['verify' => $certPath], ]; if ($this->getProxy()) { $options['http']['proxy'] = $this->getProxy(); |