Commit a7eb74ea authored by Felix Sokoliuk's avatar Felix Sokoliuk

Add missing SSL parameters to pdo_pgsql driver

parent 50bf6234
...@@ -266,6 +266,14 @@ pdo\_pgsql ...@@ -266,6 +266,14 @@ pdo\_pgsql
the server's certificate will be verified to be signed by one of these the server's certificate will be verified to be signed by one of these
authorities. authorities.
See http://www.postgresql.org/docs/9.0/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT See http://www.postgresql.org/docs/9.0/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
- ``sslcert`` (string): specifies the file name of the client SSL certificate.
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT`
- ``sslkey`` (string): specifies the location for the secret key used for the
client certificate.
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY`
- ``sslcrl`` (string): specifies the file name of the SSL certificate
revocation list (CRL).
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
- ``application_name`` (string): Name of the application that is - ``application_name`` (string): Name of the application that is
connecting to database. Optional. It will be displayed at ``pg_stat_activity``. connecting to database. Optional. It will be displayed at ``pg_stat_activity``.
......
...@@ -105,6 +105,18 @@ class Driver extends AbstractPostgreSQLDriver ...@@ -105,6 +105,18 @@ class Driver extends AbstractPostgreSQLDriver
$dsn .= 'sslrootcert=' . $params['sslrootcert'] . ';'; $dsn .= 'sslrootcert=' . $params['sslrootcert'] . ';';
} }
if (isset($params['sslcert'])) {
$dsn .= 'sslcert=' . $params['sslcert'] . ';';
}
if (isset($params['sslkey'])) {
$dsn .= 'sslkey=' . $params['sslkey'] . ';';
}
if (isset($params['sslcrl'])) {
$dsn .= 'sslcrl=' . $params['sslcrl'] . ';';
}
if (isset($params['application_name'])) { if (isset($params['application_name'])) {
$dsn .= 'application_name=' . $params['application_name'] . ';'; $dsn .= 'application_name=' . $params['application_name'] . ';';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment