1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-31 10:04:20 +03:00

and support whether we verify ssl certs; default to true

This commit is contained in:
David Goodwin
2020-02-28 14:30:40 +00:00
parent 212415db56
commit 1ecada175c

View File

@ -1523,6 +1523,13 @@ function db_connect() {
$options[PDO::MYSQL_ATTR_SSL_CERT] = Config::read_string('database_ssl_cert');
$options[PDO::MYSQL_ATTR_SSL_CIPHER] = Config::read_string('database_ssl_cipher');
$options = array_filter($options); // remove empty settings.
$verify = Config::read('database_ssl_verify_server_cert');
if ($verify === null) { // undefined
$verify = true;
}
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = (bool)$verify;
}
$queries[] = 'SET CHARACTER SET utf8';
$queries[] = "SET COLLATION_CONNECTION='utf8_general_ci'";