?
Solved

SSL Error - cURL

Posted on 2006-04-07
4
Medium Priority
?
2,686 Views
Last Modified: 2013-11-29
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
0
Comment
Question by:mark_06
2 Comments
 
LVL 9

Accepted Solution

by:
gruntar earned 2000 total points
ID: 16399213
Just set these two options.

curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
0
 
LVL 1

Expert Comment

by:sunnylowe
ID: 32952832
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Original post  on Monitis Blog. Web performance monitoring is broken into two camps: passive and active. Passive monitoring is defined as looking at real-world historical performance by monitoring actual log-ins, site hits, clicks, requests for …
The online market is growing at an unprecedented rate and retail eCommerce sales are expected to reach $4 trillion by 2020. Yet, the profit is not just there for the taking because you have to set yourself apart from the competition.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question