SSL Error - cURL

Hi,

I am having trouble with OpenSSL and cURL on my IIS 6 webserver (I cannot switch to apache as I have other sites running ASP.NET applications). When I try and link into my payment gateway I get the following message "Error occurred (1060): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"

I think it has something to do with the SSL Certificate im using, its a 'Rapid SSL' certificate. How do I disable cURL from checking for a valid SSL? I have tried the -k/--insecure command but I don't think I am entering it in correctly.

Thanks

Mark
LVL 6
mark_06Asked:
Who is Participating?
 
gruntarCommented:
Just set these two options.

curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
0
 
sunnyloweCommented:
It should be known that using the 0 option will cause curl to ignore the validity of all offered certificates, allowing a "man-in-the-middle" attack against your server. See http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/ 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.