Merge branch 'ssl_pdo_mysql' into 2.4

Merge pull request #1421 from mikescar/ssl_pdo_mysql

Fixes #556
This commit is contained in:
mark_story 2013-07-19 22:57:05 -04:00
commit 8913f4fc08

View file

@ -146,7 +146,13 @@ class Mysql extends DboSource {
if (!empty($config['encoding'])) {
$flags[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES ' . $config['encoding'];
}
if (!empty($config['ssl_key']) && !empty($config['ssl_cert'])) {
$flags[PDO::MYSQL_ATTR_SSL_KEY] = $config['ssl_key'];
$flags[PDO::MYSQL_ATTR_SSL_CERT] = $config['ssl_cert'];
}
if (!empty($config['ssl_ca'])) {
$flags[PDO::MYSQL_ATTR_SSL_CA] = $config['ssl_ca'];
}
if (empty($config['unix_socket'])) {
$dsn = "mysql:host={$config['host']};port={$config['port']};dbname={$config['database']}";
} else {