Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Request #21122 SSL connections using mysqlnd as client require server auth.
Submitted: 2016-10-05 22:26 UTC
From: smada Assigned:
Status: Open Package: MDB2_Driver_mysqli (version 1.5.0b4)
PHP Version: Irrelevant OS: Ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2016-10-05 22:26 UTC] smada (Rob Adams)
Description: ------------ According to the documentation here (http://us3.php.net/manual/en/mysqli.options.php), MySQLi allows a flag for not verifying the server certificate (MYSQLI_OPT_SSL_VERIFY_SERVER_CERT). However, I don't think that flag is being used by the mysqlnd client. Instead, according to the documentation (http://us3.php.net/manual/en/mysqli.real-connect.php), there is a new flag required to connect using SSL and to not verify the server certificate. The flag is passed as a parameter to mysqli_real_connect, which means the code in MDB2_Driver_mysqli needs to be changed, since it currently doesn't use that parameter at all. Test script: --------------- $dsn = 'mysqli://user:password@server/db?key=client-key.pem&cert=client-cert.pem'; $options = array('ssl' => true, 'dont_verify_cert' => true); $db = MDB2::connect($dsn, $options); Expected result: ---------------- Should connect using ssl. Actual result: -------------- Fails to connect.

Comments

 [2016-10-05 22:28 UTC] smada (Rob Adams)