Doc #52945 [Opn]: ssl stream context options misdocument capture_peer_chain
| From: | blacklight332 at aol dot com | Date: | Tue, 28 Sep 2010 20:21:18 +0000 |
| Subject: | Doc #52945 [Opn]: ssl stream context options misdocument capture_peer_chain | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5141@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52945&edit=1
ID: 52945
User updated by: blacklight332 at aol dot com
Reported by: blacklight332 at aol dot com
Summary: ssl stream context options misdocument
capture_peer_chain
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Ubuntu Linux 10.10
PHP Version: 5.3.3
Block user comment: N
New Comment:
Updated email address to an email that I don't care if it gets spammed,
cause this page is publicly accessible.
Previous Comments:
------------------------------------------------------------------------
[2010-09-28 22:03:50] jonesmw at gmail dot com
documenting the segfault in a different php bug... this php bug is only
about the misdocumentation
------------------------------------------------------------------------
[2010-09-28 22:02:15] blacklight332 at aol dot com
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 this bug report at http://bugs.php.net/bug.php?id=52945&edit=1