Doc #52938 [Opn]: CURLOPT_CERTINFO not documented, available since 5.3.2

From: Date: Tue, 28 Sep 2010 20:20:37 +0000
Subject: Doc #52938 [Opn]: CURLOPT_CERTINFO not documented, available since 5.3.2
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5140@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52938&edit=1 ID: 52938 User updated by: blacklight332 at aol dot com Reported by: blacklight332 at aol dot com Summary: CURLOPT_CERTINFO not documented, available since 5.3.2 Status: Open Type: Documentation Problem Package: Documentation problem Operating System: Linux/Ubuntu 10.04 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 00:10:11] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52938&edit=1

« previous php.doc.bugs (#5140) next »