-   Linux - Newbie (
-   -   php curl error: certificate verify failed (

conflicker 06-14-2012 04:19 PM

php curl error: certificate verify failed
Hi LQ,

I'm trying to submit POST request on some HTTPS link
and this is my curl setup


$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/CAcerts/developer.skipjackic.com1.crt");
$result = curl_exec($ch);
And it gave me this error:

Curl error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Is there another way to submit post request to https url using curl without specifying a certificate?

Kustom42 06-14-2012 06:33 PM

Download and use this cert for your ca cert:

All times are GMT -5. The time now is 02:18 AM.