#38384 [Opn->Fbk]: Asynchronous Connections
| From: | iliaa@php.net | Date: | Sun, 31 Dec 2006 21:00:02 +0000 |
| Subject: | #38384 [Opn->Fbk]: Asynchronous Connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107070@lists.php.net to get a copy of this message | ||
ID: 38384
Updated by: iliaa@php.net
Reported By: ctm at etheon dot net
-Status: Open
+Status: Feedback
Bug Type: Streams related
Operating System: Windows NT
PHP Version: 5.1.4
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2006-08-08 16:25:10] 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,
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38384&edit=1