Skip to content
Draft
Changes from all commits
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
feat(pgsql_ssl): Allow to use global `default_certificates_bundle_pat…
…h` for pgsql

Signed-off-by: Simon L. <[email protected]>
  • Loading branch information
szaimen committed Dec 5, 2025
commit 3626bfd5f8652e7a2b6ff93e121b1c633d1b9eab
3 changes: 2 additions & 1 deletion lib/private/DB/ConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ public function createConnectionParams(string $configPrefix = '', array $additio
$pgsqlSsl = $this->config->getValue('pgsql_ssl', false);
if (is_array($pgsqlSsl)) {
$connectionParams['sslmode'] = $pgsqlSsl['mode'] ?? '';
$connectionParams['sslrootcert'] = $pgsqlSsl['rootcert'] ?? '';
$rootCertPath = $pgsqlSsl['rootcert'] ?? $this->config->getValue('default_certificates_bundle_path', null) ?? '';
Copy link
Member

@provokateurin provokateurin Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use \OCP\ICertificateManager::getAbsoluteBundlePath instead.

$connectionParams['sslrootcert'] = $rootCertPath;
$connectionParams['sslcert'] = $pgsqlSsl['cert'] ?? '';
$connectionParams['sslkey'] = $pgsqlSsl['key'] ?? '';
$connectionParams['sslcrl'] = $pgsqlSsl['crl'] ?? '';
Expand Down
Loading