I am trying to enable CURLOPT_SSL_VERIFYPEER
in PHP, but when I call curl_exec()
it is returning false
with no other error message or indication of why its breaking. Here is what I have:
$curl_object = curl_init();
curl_setopt($curl_object, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_object, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_object, CURLOPT_CAINFO, "/srv/assets/ssl/ca-bundle.pem");
curl_setopt($curl_object, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl_object, CURLOPT_URL, $url);
$response = curl_exec($curl_object);
As soon as I set CURLOPT_SSL_VERIFYPEER
to false
it works. The CURLOPT_CAINFO
file is th offical ca-cert.pem from http://curl.haxx.se/docs/caextract.html.
Any ideas?
Maybe this can help to debug the issue: