#28100 [Asn->Csd]: mysql_ssl_set() broken
| From: | georg@php.net | Date: | Sat, 05 Jun 2004 18:32:52 +0000 |
| Subject: | #28100 [Asn->Csd]: mysql_ssl_set() broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60413@lists.php.net to get a copy of this message | ||
ID: 28100
Updated by: georg@php.net
Reported By: adam at trachtenberg dot com
-Status: Assigned
+Status: Closed
Bug Type: MySQL related
Operating System: *
PHP Version: 5CVS-2004-04-22 (dev)
Assigned To: georg
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-04-22 01:30:16] adam at trachtenberg dot com
Description:
------------
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()
wants.
This patch fixes this bug:
http://www.trachtenberg.com/patches/mysql_ssl_set.txt
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
error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28100&edit=1