Skip to content

add SSL connection check option#1107

Open
TatevikGr wants to merge 2 commits into
release-3.7.0from
ssl_mysql_connection
Open

add SSL connection check option#1107
TatevikGr wants to merge 2 commits into
release-3.7.0from
ssl_mysql_connection

Conversation

@TatevikGr
Copy link
Copy Markdown

@TatevikGr TatevikGr commented May 6, 2026

Description

This PR:

  • preserves the existing SSL behavior by default
  • adds option to connect using MYSQLI_CLIENT_SSL
  • adds option to set SSL cert for MySql user
$database_connection_ssl_force = true;
$database_connection_ssl_ca = '/path/to/ca.pem';

Related Issue

issue

Screenshots (if appropriate):

@TatevikGr TatevikGr force-pushed the ssl_mysql_connection branch 2 times, most recently from ddea17a to 24ff6bb Compare May 13, 2026 11:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configurable MySQL SSL/TLS connection behavior for phpList’s mysqli database connection layer while documenting the new settings in the extended config.

Changes:

  • Adds $database_connection_ssl_force to use MYSQLI_CLIENT_SSL.
  • Adds $database_connection_ssl_ca handling via mysqli_ssl_set().
  • Updates extended configuration comments for SSL/TLS database settings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
public_html/lists/admin/mysqli.inc Applies new SSL flags and optional CA configuration during mysqli connection setup.
public_html/lists/config/config_extended.php Documents the new SSL force and CA configuration options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// If the database user requires SSL, set this to the path
// of the CA certificate used to verify the MySQL server certificate.
$database_connection_ssl_ca = '/path/to/ca.pem';
Comment on lines +34 to +43
if (!empty($database_connection_ssl_ca)) {
mysqli_ssl_set(
$db,
null,
null,
realpath($database_connection_ssl_ca),
null,
null
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants