php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38384 Asynchronous Connections
Submitted: 2006-08-08 16:25 UTC Modified: 2007-01-08 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ctm at etheon dot net Assigned:
Status: No Feedback Package: Streams related
PHP Version: 5.1.4 OS: Windows NT
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ctm at etheon dot net
New email:
PHP Version: OS:

 

 [2006-08-08 16:25 UTC] ctm at etheon dot net
Description:
------------
I'm not entirely sure if this is a bug or not, but when using the capture_peer_cert SSL context with a normal socket based stream connection (as opposed to it being asynchronous), I obtain the peer_certificate easily in the stream's context options.

When using it an asynchronous connection though, even after using stream select and the likes, I can't seem to capture the peer's certificate, even though I have the same context as used in the "normal" connections.

Reproduce code:
---------------
$ctx = stream_context_create ( array ( 'ssl' => array ( 'verify_peer'	    => false, 'capture_peer_cert' => true ) ) ) ; 

    $socket = stream_socket_client ( $host, $errno, $errstr, $timeout, STREAM_CLIENT_ASYNC_CONNECT|STREAM_CLIENT_CONNECT, $ctx ) ;

$info = stream_context_get_options ( $socket ) ;

print_r ( $info ) ;

Expected result:
----------------
Array
{
   [ssl] => Array
            {
               verify_peer => ,
               capture_peer_cert => 1,
               peer_certificate => Resource id #6
            }
}

Actual result:
--------------
Array
{
   [ssl] => Array
            {
               verify_peer => ,
               capture_peer_cert => 1,
            }
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-31 21:00 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-01-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC