Skip to content

Commit

Permalink
MySQL: Respect ssl_do_not_verify_server_cert config option
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd authored and nilmerg committed Jun 24, 2021
1 parent 1e31bf0 commit e3370ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Adapter/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ public function getOptions(Config $config)
if (isset($config->ssl_cipher)) {
$options[PDO::MYSQL_ATTR_SSL_CIPHER] = $config->ssl_cipher;
}

if (
defined('PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT')
&& isset($config->ssl_do_not_verify_server_cert)
) {
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = (bool) $config->ssl_do_not_verify_server_cert;
}
}

return $options;
Expand Down

0 comments on commit e3370ed

Please sign in to comment.