diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index d7e143090..6ee8401f7 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -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 {