Doc #52945 [NEW]: ssl stream context options misdocument capture_peer_chain then segfault
| From: | jonesmw at gmail dot com | Date: | Tue, 28 Sep 2010 20:02:16 +0000 |
| Subject: | Doc #52945 [NEW]: ssl stream context options misdocument capture_peer_chain then segfault | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-5138@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu Linux 10.10
PHP version: 5.3.3
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:ssl stream context options misdocument capture_peer_chain then segfault
Description:
------------
http://www.php.net/manual/en/context.ssl.php
shows two options
capture_peer_cert and
capture_peer_chain
capture_peer_chain does nothing. I tried everything... then I grepped the
source code of php 5.3.3 and found it was actually named
capture_peer_cert_chain
solution: change the name in the documentation to capture_peer_cert_chain
instead of capture_peer_chain on
http://www.php.net/manual/en/context.ssl.php
Test script:
---------------
//$g = stream_context_create (array("ssl" => array("capture_peer_cert" =>
true,"capture_peer_cert_chain" => true,)));
$g = stream_context_create (array("ssl" => array("capture_peer_cert" =>
true,"capture_peer_chain" => true,)));
$r = stream_socket_client("ssl://www.digicert.com:443", $errno, $errstr,
30, STREAM_CLIENT_CONNECT, $g);
$cont = stream_context_get_params($r);
var_dump($cont['options']['ssl']);
Expected result:
----------------
array(3) {
["capture_peer_cert"]=>
bool(true)
["capture_peer_chain"]=>
bool(true)
["peer_certificate"]=>
resource(6) of type (OpenSSL X.509)
["peer_certificate_chain"]=>
[something here]
}
Actual result:
--------------
array(3) {
["capture_peer_cert"]=>
bool(true)
["capture_peer_chain"]=>
bool(true)
["peer_certificate"]=>
resource(6) of type (OpenSSL X.509)
}
--
Edit bug report at http://bugs.php.net/bug.php?id=52945&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52945&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52945&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52945&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52945&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52945&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52945&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52945&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52945&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52945&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52945&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52945&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52945&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52945&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52945&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52945&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52945&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52945&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52945&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52945&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52945&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52945&r=mysqlcfg