Skip to content

Commit 800b959

Browse files
committed
feat(driverOptions): Allow to use global default_certificates_bundle_path as driverOptions
Signed-off-by: Simon L. <[email protected]>
1 parent 594d220 commit 800b959

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/private/DB/ConnectionFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ public function createConnectionParams(string $configPrefix = '', array $additio
189189
//additional driver options, eg. for mysql ssl
190190
$driverOptions = $this->config->getValue($configPrefix . 'dbdriveroptions', $this->config->getValue('dbdriveroptions', null));
191191
if ($driverOptions) {
192+
$rootCertPath = $driverOptions[PDO::MYSQL_ATTR_SSL_CA] ?? $this->config->getValue('default_certificates_bundle_path', null) ?? '';
193+
$driverOptions[PDO::MYSQL_ATTR_SSL_CA] = $rootCertPath;
192194
$connectionParams['driverOptions'] = $driverOptions;
193195
}
194196

0 commit comments

Comments
 (0)