interrobang Posted December 16, 2009 Share Posted December 16, 2009 I'm trying to use curl to connect to a PKI-required site. For testing purposes, running command line cURL passing in the path to my PKI, its password, and the flag to disable peer validation, I get a successful result. The target site is a RESTful web service (my work's intranet, I have no public URL to offer) Yet from PHP, I continually get an Internal Server Error returned. At a minimum, I've got this: $ch = curl_init($myurl); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSLCERT, "/path/to/my/cert.pem"); curl_setopt($ch, CURLOPT_SSLCERTPASSWD, "mypassword"); $result = curl_exec($ch); curl_close($ch); I have not tried setting the CURLOPT_CAINFO option since I had the VERIFY* options set to 0, and since it worked from the command line without any CA info. I've tried different toggles for various other options to no avail. I've verified from phpinfo() that curl is set up correctly and includes https. Anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/185412-php-curl-and-pki/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.