|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28100 mysql_ssl_set() broken
Submitted: 2004-04-22 01:30 UTC Modified: 2004-06-05 20:32 UTC
From: adam at trachtenberg dot com Assigned: georg
Status: Closed Package: MySQL related
PHP Version: 5CVS-2004-04-22 (dev) OS: *
Private report: No CVE-ID:
 [2004-04-22 01:30 UTC] adam at trachtenberg dot com
The MySQLi mysqli_ssl_set() function is broken because 
it doesn't convert empty strings into NULLs, which is 
what the MySQL C client library function mysql_ssl_set() 

This patch fixes this bug:

Reproduce code:
$db = mysqli_init();
mysqli_ssl_set($db, 'client-key.pem', 'client-cert.pem', 'cacert.pem', NULL, NULL);

mysqli_real_connect($db, 'localhost', 'foo', 'bar', 'baz');

Expected result:
Sucessful connection.

Actual result:
PHP Warning:  mysqli_real_connect(): SSL connection 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-05 20:32 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 08:01:41 2015 UTC