mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
don't try to get custom certs for s3 primary storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
a13ae6b64f
commit
5725e38328
2 changed files with 10 additions and 3 deletions
|
|
@ -30,6 +30,7 @@ class S3 implements IObjectStore {
|
|||
use S3ObjectTrait;
|
||||
|
||||
public function __construct($parameters) {
|
||||
$parameters['primary_storage'] = true;
|
||||
$this->parseParams($parameters);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,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',
|
||||
|
|
@ -134,7 +140,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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue