diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 1f5411e1..b853fed9 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -1066,6 +1066,9 @@ squiz squizlabs srcset ssess +sslmode +sslkey +sslrootcert stardivision starrrrr starterkit diff --git a/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php b/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php index d228f350..e9882740 100644 --- a/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php +++ b/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php @@ -139,6 +139,18 @@ class Connection extends DatabaseConnection implements SupportsTemporaryTablesIn $connection_options['database'] = (!empty($connection_options['database']) ? $connection_options['database'] : 'template1'); $dsn = 'pgsql:host=' . $connection_options['host'] . ' dbname=' . $connection_options['database'] . ' port=' . $connection_options['port']; + if (!empty($connection_options['sslmode'])) { + $dsn .= ' sslmode=' . $connection_options['sslmode']; + } + if (!empty($connection_options['sslcert'])) { + $dsn .= ' sslcert=' . $connection_options['sslcert']; + } + if (!empty($connection_options['sslkey'])) { + $dsn .= ' sslkey=' . $connection_options['sslkey']; + } + if (!empty($connection_options['sslrootcert'])) { + $dsn .= ' sslrootcert=' . $connection_options['sslrootcert']; + } // Allow PDO options to be overridden. $connection_options += [