Bug #54194 [Opn->Fbk]: wrong behavior with non existent certificate
Edit report at https://bugs.php.net/bug.php?id=54194&edit=1
ID: 54194
Updated by: fjanisze@php.net
Reported by: carsten_sttgt at gmx dot de
Summary: wrong behavior with non existent certificate
-Status: Open
+Status: Feedback
Type: Bug
Package: MySQLi related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
With the latest mysqlnd builds the test script provided is failing due to raised warnings:
Warning: mysqli_real_connect(): this stream does not support SSL/crypto in
/home/fjanisze/Oracle/repo/connector-php/test2.phpt on line 14
Warning: mysqli_real_connect(): Cannot connect to MySQL by using SSL in
/home/fjanisze/Oracle/repo/connector-php/test2.phpt on line 14
Warning: mysqli_real_connect(): [2002] (trying to connect via (null)) in
/home/fjanisze/Oracle/repo/connector-php/test2.phpt on line 14
If a nonexistent SSL options are given. Might we consid this ticket closed?
Previous Comments:
------------------------------------------------------------------------
[2011-03-08 15:25:08] carsten_sttgt at gmx dot de
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 this bug report at https://bugs.php.net/bug.php?id=54194&edit=1
Thread (3 messages)