Getting error in Curl – Peer certificate cannot be authenticated with known CA certificates

I am getting the below error while making ssl connection with self signed certificate. “Peer certificate cannot be authenticated with known CA certificates” It is working fine with CA signed certificate. I am setting the below using curl_easy_setopt(). curl_easy_setopt(MyContext, CURLOPT_CAPATH, CA_CERTIFICATE_PATH) curl_easy_setopt(MyContext, CURLOPT_SSL_VERIFYPEER,TRUE); The curl versionlibcurl-7.19.7-26 Openssl version is 0_9_8u. Please let me know how … Read more

How to disable cURL SSL certificate verification

Simply add the -k switch somewhere before the url. Disclaimer: Use this at your own risk. -k, –insecure (TLS) By default, every SSL connection curl makes is verified to be secure. This option allows curl to proceed and operate even for server connections otherwise considered insecure. The server connection is verified by making sure the server’s certificate … Read more

Setting Curl’s Timeout in PHP

See documentation: http://www.php.net/manual/en/function.curl-setopt.php CURLOPT_CONNECTTIMEOUT – The number of seconds to wait while trying to connect. Use 0 to wait indefinitely.CURLOPT_TIMEOUT – The maximum number of seconds to allow cURL functions to execute. also don’t forget to enlarge time execution of php script self:

Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

this code working on localhost but when i am testing on my live server it will give me this error Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure then i tried this github.com/paypal/TLS-update/tree/master/php this will again work on localhost and on live it gives me this my server have these certificates Server Key and Certificate #1 #2 #3 … Read more

file_get_contents( ) not working

Login to your server via ssh and type in the file, simply press “ctrl + w” and type “allow_url_fopen” and Return, most probably you will come to the explanation first, so repeat the search a couple of times. Now you can change the entry from allow_url_fopen=0 to allow_url_fopen=1 press “ctrl + x” and confirm the … Read more

Curl : connection refused

I got the following error while running curl: curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused. It seems that it is easy to debug, but, I didnt find how to solve it. The adress 127.0.0.1 is mentioned in the file etc/hosts. I am using curl version 7.47 on Ubuntu system. Anyone has … Read more