#38384 [NEW]: Asynchronous Connections

From: Date: Tue, 08 Aug 2006 16:25:10 +0000
Subject: #38384 [NEW]: Asynchronous Connections
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100533@lists.php.net to get a copy of this message
From: ctm at etheon dot net Operating system: Windows NT PHP version: 5.1.4 PHP Bug Type: Streams related Bug description: Asynchronous Connections 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 bug report at http://bugs.php.net/?id=38384&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38384&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38384&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38384&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38384&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38384&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38384&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38384&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38384&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38384&r=support Expected behavior: http://bugs.php.net/fix.php?id=38384&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38384&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38384&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38384&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38384&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38384&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38384&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38384&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38384&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38384&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38384&r=mysqlcfg

« previous php.bugs (#100533) next »