diff --git a/public_html/lists/admin/mysqli.inc b/public_html/lists/admin/mysqli.inc
index 29c900890..07c83d7a7 100644
--- a/public_html/lists/admin/mysqli.inc
+++ b/public_html/lists/admin/mysqli.inc
@@ -11,7 +11,7 @@ if (!function_exists("mysqli_init")) {
function Sql_Connect($host, $user, $password, $database)
{
- global $database_port, $database_socket, $database_connection_compression, $database_connection_ssl;
+ global $database_port, $database_socket, $database_connection_compression, $database_connection_ssl, $database_connection_ssl_check;
if (!$host || !$user) {
header('HTTP/1.0 500 Cannot connect to database');
@@ -20,7 +20,12 @@ function Sql_Connect($host, $user, $password, $database)
}
$db = mysqli_init();
$compress = empty($database_connection_compression) ? 0 : MYSQLI_CLIENT_COMPRESS;
- $secure = empty($database_connection_ssl) ? 0 : MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
+ $secure = 0;
+ if (!empty($database_connection_ssl)) {
+ $secure = !empty($database_connection_ssl_check)
+ ? MYSQLI_CLIENT_SSL
+ : MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
+ }
mysqli_report(MYSQLI_REPORT_OFF);
diff --git a/public_html/lists/config/config_extended.php b/public_html/lists/config/config_extended.php
index b0ab027c4..53b1e867c 100644
--- a/public_html/lists/config/config_extended.php
+++ b/public_html/lists/config/config_extended.php
@@ -41,6 +41,9 @@
// force database connection to use SSL
$database_connection_ssl = false;
+// force to check SSL connection
+$database_connection_ssl_check = false;
+
// if you use multiple installations of phpList you can set this to
// something to identify this one. it will be prepended to email report
// subjects