php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54194 wrong behavior with non existent certificate
Submitted: 2011-03-08 15:25 UTC Modified: 2017-05-07 04:22 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: carsten_sttgt at gmx dot de Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: carsten_sttgt at gmx dot de
New email:
PHP Version: OS:

 

 [2011-03-08 15:25 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-25 13:09 UTC] fjanisze@php.net
-Status: Open +Status: Feedback
 [2017-04-25 13:09 UTC] fjanisze@php.net
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?
 [2017-05-07 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC