|  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
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
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.
Block user comment
Status: Assign to:
Bug Type:
From: ctm at etheon dot net
New email:
PHP Version: OS:


 [2006-08-08 16:25 UTC] ctm at etheon dot net
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:
   [ssl] => Array
               verify_peer => ,
               capture_peer_cert => 1,
               peer_certificate => Resource id #6

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-31 21:00 UTC]
Please try using this CVS snapshot:
For Windows:

 [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: Tue Apr 23 08:01:30 2024 UTC