From 1ecada175c0ea342e03488cc18722afdc44a17f6 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Fri, 28 Feb 2020 14:30:40 +0000 Subject: [PATCH] and support whether we verify ssl certs; default to true --- functions.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.inc.php b/functions.inc.php index ee1f5fa5..70c6c49e 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -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'";