php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52938 CURLOPT_CERTINFO not documented, available since 5.3.2
Submitted: 2010-09-28 00:10 UTC Modified: 2010-10-19 06:29 UTC
From: blacklight332 at aol dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.3 OS: Linux/Ubuntu 10.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: blacklight332 at aol dot com
New email:
PHP Version: OS:

 

 [2010-09-28 00:10 UTC] blacklight332 at aol dot com
Description:
------------
I went to 
http://us.php.net/manual/en/function.curl-setopt.php
and did a search for CURLOPT_CERTINFO
and did not find anything.

Yet I went to
http://php.net/ChangeLog-5.php
and did a search for CURLOPT_CERTINFO
and found the option had been available since 5.3.2.






Test script:
---------------
<?php
if($fp = tmpfile())
{
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,"https://www.digicert.com/");
	curl_setopt($ch, CURLOPT_STDERR, $fp);
	curl_setopt($ch, CURLOPT_CERTINFO, 1);
	curl_setopt($ch, CURLOPT_VERBOSE, 1);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,  2);
	curl_setopt($ch, CURLOPT_SSLVERSION,3);
	$result = curl_exec($ch);
	curl_errno($ch)==0 or die("Error:" . curl_errno($ch) . " Message:" . curl_error($ch));
	fseek($fp, 0);//rewind
	$str='';
	while(strlen($str.=fread($fp,8192))==8192);
	echo $str;
	fclose($fp);
}
?>


Expected result:
----------------
echo $str; 
produce the debug output of the certificate, similar to linux command line:
openssl x509 -in my_website_com.crt -noout -text

I played with it and built some sample code that works.  Also, CURLOPT_CERTINFO outputs data to CURLOPT_STDERR.  CURLOPT_CERTINFO seems to only work when CURLOPT_VERBOSE is 1.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-28 22:20 UTC] blacklight332 at aol dot com
-: jonesmw@gmail.com +: blacklight332 at aol dot com
 [2010-09-28 22:20 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-19 06:29 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=304496
Log: Fixed bug #52938 (CURLOPT_CERTINFO not documented, available since 5.3.2)
 [2010-10-19 06:29 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-10-19 06:29 UTC] kalle@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.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=8c46e662ef74de005406353079febe5bbd07601f
Log: Fixed bug #52938 (CURLOPT_CERTINFO not documented, available since 5.3.2)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 18:00:02 2026 UTC