From:
Operating system:
PHP version: Irrelevant
Package: MySQLi related
Bug Type: Bug
Bug description:wrong behavior with non existent certificate
Description:
------------
Maybe this is a bug in MySQLnd and not MySQLi, so feel free to change the
affected package. With libmysql this is working as expected.
Test script:
---------------
<?php
error_reporting(E_ALL);
$con1 = mysqli_init();
mysqli_ssl_set($con1,
"nonexistent",
"nonexistent",
"nonexistent",
null, null
);
if (!mysqli_real_connect($con1, 'localhost', 'foo', '')){
printf("Connect Error: %s\n", mysqli_connect_error());
exit;
}
printf("Connected.\n");
$res = mysqli_query($con1, "SHOW STATUS LIKE 'Ssl_cipher'");
printf("SSL-Connection: %d\n", (bool) end(mysqli_fetch_row($res)));
?>
Expected result:
----------------
SSL error: Unable to get certificate from 'nonexistent'
Warning: mysqli_real_connect(): (HY000/2026): SSL connection error in
C:\Users\Public\Documents\htdocs\test.php on line 21
Connect Error: SSL connection error
Actual result:
--------------
Connected.
SSL-Connection: 1
--
Edit bug report at http://bugs.php.net/bug.php?id=54194&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54194&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54194&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=54194&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54194&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=54194&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54194&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=54194&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=54194&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=54194&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=54194&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=54194&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=54194&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=54194&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54194&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54194&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54194&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=54194&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=54194&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=54194&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=54194&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=54194&r=mysqlcfg