diff --git a/public_html/lists/admin/mysqli.inc b/public_html/lists/admin/mysqli.inc index 29c900890..274ac76e8 100644 --- a/public_html/lists/admin/mysqli.inc +++ b/public_html/lists/admin/mysqli.inc @@ -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