Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "don't try to get custom certs for s3 primary storage"
This reverts commit 1156214.

Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb committed Jun 20, 2022
commit c0d88cb07fff00999c6cc3777f8d2ff188d6a348
1 change: 0 additions & 1 deletion lib/private/Files/ObjectStore/S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class S3 implements IObjectStore {
use S3ObjectTrait;

public function __construct($parameters) {
$parameters['primary_storage'] = true;
$this->parseParams($parameters);
}

Expand Down
12 changes: 3 additions & 9 deletions lib/private/Files/ObjectStore/S3ConnectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,8 @@ public function getConnection() {
)
);

// 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';
}
/** @var ICertificateManager $certManager */
$certManager = \OC::$server->get(ICertificateManager::class);

$options = [
'version' => isset($this->params['version']) ? $this->params['version'] : 'latest',
Expand All @@ -139,7 +133,7 @@ public function getConnection() {
'signature_provider' => \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()),
'csm' => false,
'use_arn_region' => false,
'http' => ['verify' => $certPath],
'http' => ['verify' => $certManager->getAbsoluteBundlePath()],
];
if ($this->getProxy()) {
$options['http']['proxy'] = $this->getProxy();
Expand Down