Commit 972a0ad4 authored by Peter Mitchell's avatar Peter Mitchell

add sslrootcert connection option to pdo_pgsql driver

parent 2c789aa8
...@@ -254,6 +254,11 @@ pdo\_pgsql ...@@ -254,6 +254,11 @@ pdo\_pgsql
a SSL TCP/IP connection will be negotiated with the server. a SSL TCP/IP connection will be negotiated with the server.
See the list of available modes: See the list of available modes:
`http://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE` `http://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE`
- ``sslrootcert`` (string): specifies the name of a file containing
SSL certificate authority (CA) certificate(s). If the file exists,
the server's certificate will be verified to be signed by one of these
authorities.
See http://www.postgresql.org/docs/9.0/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
PostgreSQL behaves differently with regard to booleans when you use PostgreSQL behaves differently with regard to booleans when you use
``PDO::ATTR_EMULATE_PREPARES`` or not. To switch from using ``'true'`` ``PDO::ATTR_EMULATE_PREPARES`` or not. To switch from using ``'true'``
......
...@@ -99,6 +99,10 @@ class Driver extends AbstractPostgreSQLDriver ...@@ -99,6 +99,10 @@ class Driver extends AbstractPostgreSQLDriver
$dsn .= 'sslmode=' . $params['sslmode'] . ' '; $dsn .= 'sslmode=' . $params['sslmode'] . ' ';
} }
if (isset($params['sslrootcert'])) {
$dsn .= 'sslrootcert=' . $params['sslrootcert'] . ' ';
}
return $dsn; return $dsn;
} }
......
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