php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52945 ssl stream context options misdocument capture_peer_chain
Submitted: 2010-09-28 22:02 UTC Modified: 2010-10-01 12:14 UTC
From: blacklight332 at aol dot com Assigned: cataphract
Status: Closed Package: Documentation problem
PHP Version: 5.3.3 OS: Ubuntu Linux 10.10
Private report: No CVE-ID:
 [2010-09-28 22:02 UTC] 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)
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-28 22:03 UTC] jonesmw at gmail dot com
-Summary: ssl stream context options misdocument capture_peer_chain then segfault +Summary: ssl stream context options misdocument capture_peer_chain
 [2010-09-28 22:03 UTC] 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:21 UTC] blacklight332 at aol dot com
-: jonesmw@gmail.com +: blacklight332 at aol dot com
 [2010-09-28 22:21 UTC] blacklight332 at aol dot com
Updated email address to an email that I don't care if it gets spammed, cause this page is publicly accessible.
 [2010-10-01 12:14 UTC] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=303915
Log: - SSL context option capture_peer_chain is actually named capture_peer_cert_chain (fixes bug #52945).
 [2010-10-01 12:14 UTC] cataphract@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract
 [2010-10-01 12:14 UTC] cataphract@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 04:02:11 2014 UTC