CodeIgniter Forums
Correct syntax for encrypted database using ssl - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Correct syntax for encrypted database using ssl (/showthread.php?tid=78994)



Correct syntax for encrypted database using ssl - fedeburo - 04-06-2021

Hi, i am having problems to connect to a database that is encrypted with ssl. I am not sure what the correct syntax it would be for connecting, and also, the neccesarry files or path to include. Only with ssl_ca is enough? or i need all of them?

Link to the explanation of the values: https://codeigniter.com/user_guide/database/configuration.html#explanation-of-values


RE: Correct syntax for encrypted database using ssl - InsiteFX - 04-06-2021

We need to know which database driver you are using, each driver has different settings.

These may point you into the right direction.

MySQLi SSL verify

CodeIgniter – Google Cloud MySQL connect with SSL


RE: Correct syntax for encrypted database using ssl - fedeburo - 04-06-2021

(04-06-2021, 01:24 AM)InsiteFX Wrote: We need to know which database driver you are using, each driver has different settings.

These may point you into the right direction.

MySQLi SSL verify

CodeIgniter – Google Cloud MySQL connect with SSL

Sorry, the database driver that i am using is MySQLi.
I had made changes in the Database.php class, letting the encrypt false the empty strings:
// 'encrypt' => array(
// 'ssl_key' =>'',
// 'ssl_cert' =>'',
// 'ssl_ca' =>'',
// 'ssl_capath' =>'',
// 'ssl_cipher' => '',
// 'ssl_verify' =>FALSE),
And in the .env, i only have the ssl_ca with the path /etc/....