projectsend icon indicating copy to clipboard operation
projectsend copied to clipboard

Add configuration for MySQL SSL

Open chylex opened this issue 2 years ago • 0 comments

Hi, I would like to set a path to the CA certificate for a self-signed SSL connection to the MySQL server.

Currently it requires a change in includes/database.php which won't survive updates, so I would like to potentially PR a new property in the config file, for ex. DB_MYSQL_SSL_CA. If this property is set, it would add to the existing PDO settings for MySQL these two additional properties:

PDO::MYSQL_ATTR_SSL_CA                 => DB_MYSQL_SSL_CA,
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => true

I'm not sure how you would do the same for MSSQL, so that's why I'd explicitly call the property DB_MYSQL_... so it's clear it's only supported there.

Would a PR with this change be okay?


Side note: the current database.php specifies PDO::MYSQL_ATTR_INIT_COMMAND for MSSQL, which I'm pretty sure won't work there.

chylex avatar Apr 08 '23 00:04 chylex