PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_Curl » Bug #2887

Certificate Handling, curl_setopt() and curl_getinfo()

Details

Request #2887Certificate Handling, curl_setopt() and curl_getinfo()
Submitted2004-12-04 14:25 UTC
Fromspam at batz dot org
StatusClosed
PackageNet_Curl
PHP VersionIrrelevant
OSAll
Roadmaps(Not assigned)

Comments

[2004-12-04 14:25 UTC] spam at batz dot org

Description:
------------
Net_Curl isnt able to validate Certificate Authorities using curl_cainfo or curl_capath. And you cant turn off validation using curl_ssl_verifypeer. curl_ssl_verifyhost is needed then as well. so https websites dont work with Net_Curl, because curl_ssl_verifypeer is TRUE by default.
it would be also nice to have a method for curl_setopt() to set predefined constants not supported by Net_Curl yet. Net_Curl::setopt() for example.
curl_getinfo() could be useful to get information about the last transfer. Net_Curl::getinfo() for example. (related to bug #1941 for Net_Curl, but not only used to get HTTP error handling)

Reproduce code:
---------------
http://www.batz.org/pear-dev/view_curl.php
Added check for Curl being avaible and trying to load it dynamically if not

Added new properties for certificate handling
$verifyPeer, $verifyHost, $cainfo, $capath

Added new methods:
- setopt() to set any curl predefined constant not avaible through a property by Net_Curl
- getinfo() to get information regarding a specific transfer

Expected result:
----------------
https requests work + additional features

[2005-07-13 21:57 UTC] joe at joestump dot net

Fixed in my patches:

http://zebulon.miester.org/~jstump/pear/Net_Curl/

Thanks for submitting your code. Though, next time it would be
great to get it as a diff :)