segfault when ssl stream option capture_peer_cert_chain used
| Bug #52947 | segfault when ssl stream option capture_peer_cert_chain used | ||||
|---|---|---|---|---|---|
| Submitted: | 2010-09-28 22:42 UTC | Modified: | 2010-09-29 03:26 UTC | ||
| From: | blacklight332 at aol dot com | Assigned: | felipe (profile) | ||
| Status: | Closed | Package: | Streams related | ||
| PHP Version: | 5.3.3 | OS: | Ubuntu Linux 10.10 beta | ||
| Private report: | No | CVE-ID: | None | ||
[2010-09-28 22:42 UTC] blacklight332 at aol dot com
Description: ------------ Bug http://bugs.php.net/bug.php?id=52945 says that the ssl stream context option capture_peer_chain (http://www.php.net/manual/en/context.ssl.php) was really implemented as capture_peer_cert_chain in the php project source code. Once this fact is realized, then I tried to use the option capture_peer_cert_chain in an ssl stream context connection, and it segfaults when I do a var_dump. Test script: --------------- $o = array("capture_peer_cert" => true,"capture_peer_cert_chain" => true,); $g = stream_context_create (array("ssl" => $o)); $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(4) { ["capture_peer_cert"]=> bool(true) ["capture_peer_cert_chain"]=> bool(true) ["peer_certificate"]=> resource(6) of type (OpenSSL X.509) ["peer_certificate_chain"] -something other than a segfault- } -------------------- I hope the "peer_certificate_chain" would be an array of "resource(6) of type (OpenSSL X.509)" but I'm not sure if that is the intended behavior or not. Actual result: -------------- array(4) { ["capture_peer_cert"]=> bool(true) ["capture_peer_cert_chain"]=> bool(true) ["peer_certificate"]=> resource(6) of type (OpenSSL X.509) ["peer_certificate_chain"] Segmentation fault (core dumped)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2010-09-29 03:26 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
[2010-09-29 03:26 UTC] felipe@php.net