LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2012, 04:19 PM   #1
conflicker
Member
 
Registered: Sep 2011
Posts: 89

Rep: Reputation: Disabled
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

Quote:
$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);
curl_close($ch);
And it gave me this error:
Quote:
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?
 
Old 06-14-2012, 06:33 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Download and use this cert for your ca cert:

curl.haxx.se/ca/cacert.pem
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Verify return code: 19 (self signed certificate in certificate chain) tikit Linux - Server 1 04-10-2012 06:21 PM
RHEL x86_64 yum, Error: certificate verify failed forrie Linux - Server 6 12-02-2010 01:40 AM
openssl ssl error code 14090086 verify the CA cert is ok / certificate verify failed acummings Slackware 14 02-27-2009 02:51 AM
apache/php not working after failed curl install steve51184 Linux - Server 2 04-26-2008 07:21 AM
curl error setting certificate verify locations polo76 Linux - Newbie 3 02-12-2008 07:08 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration