cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

PHP CURL biding VERIFYPEER option not working

From: Kuberan Marimuthu <kuberanmarimuthu_at_gmail.com>
Date: Wed, 16 Mar 2011 12:10:27 +0530

Hi,

<?php
        $curl_handle = curl_init('https://www.somewebsite.com/');
        curl_setopt_array($curl_handle,array(
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_SSL_VERIFYHOST => false
        ));
        curl_exec($curl_handle);
?>

Symptoms:
I tried executing the above PHP code and I am getting the below mentioned error. I also tried running it using the curl command line with --insecure option and still got an error. I had been getting this error for few hours and later got rectified.In the same machine wget also did not work. The same website worked from some other machine with the same version of CURL.

Now I have 2 doubts

1) The VERIFYPEER => false or --insecure should not let the below mentioned error to happen rite ??
2) What probably could have happened in the few hours during which the verification failed ?

curl_errno() returns "60"
curl_error() returns "Peer certificate cannot be authenticated with known CA certificates"

From curl_getinfo()
ssl_verify_result -8179

curl --version

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/0.6.5 libssh2/1.2.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile SSL libz

regards,
Kuberan Marimuthu

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2011-03-16