New isConnectionEncryptionSupported method#183
New isConnectionEncryptionSupported method#183wilsonge merged 3 commits intojoomla-framework:2.0-devfrom
Conversation
|
@andrepereiradasilva I'm also no PostgreSQL expert. I just have one for testing purpose. My database knowledge is based on Oracle. |
|
my is the first time installing postgresql, used official yum repository https://yum.postgresql.org/repopackages.php#pg11 (centos 7 - version 11 ) the tests failing is not related to this PR, someone please restart the tests, if possible |
|
From code review and reading MySQL and PostgreSQL docs it looks good. Will find time for test latest on weekend. |
|
Test with PostgreSQL 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1) successful. When is switched off on db server, value is false, when it is switched on, value is true. Will test soon on MySQL. |
|
Test with MySQL 5.7.27-0ubuntu0.18.04.1 using MySQLi driver is also successful. |
|
Finally test with MySQL 5.7.27-0ubuntu0.18.04.1 using MySQL (PDO) driver is also successful. |
|
Thanks! |
Summary of Changes
Continuing #177.
To check if the there is server side support to TLS connection to the database this PR adds a new method
isConnectionEncryptionSupportedin MySQLi/PDO MySQL/PDO PostgreSQL driversTesting Instructions
For MySQLi / PDO MySQL
- Add in /etc/my.cnf (replace for instance, with your public https certificates/private key)systemctl restart mariadb(orsystemctl restart mysqld)For PostgreSQL
- Add in/var/lib/pgsql/data/postgresql.conf (or /var/lib/pgsql/[VERSION]/data/postgresql.conf) (replace for instance, with your public https certificates/private key)systemctl restart postgresql(orsystemctl restart postgresql-[VERSION])echo $db->isConnectionEncryptionSupported();Documentation Changes Required
None.
@richard67 this time i have setup a postgresql database to test, but still no expert in this.