I recently lost about five hours time on this issue, so here is my fix:
If you get this error message when trying to validate cURL certificates on Windows machines:
Curl returned error 60: SSL certificate problem, verify that the CA cert is OK. Details:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- Be advised that
curl_setopt($handle, CURLOPT_CAPATH,...)command is NOT working on Windows machines, due to some issues with openssl.
- You must instead work with the
CURLOPT_CAINFOflag in above command.
- Get Mozilla’s certificate authority bundle file from here: https://curl.haxx.se/docs/caextract.html
- Point curl to it with above flag (2).
Working code should look like this:
curl_setopt($handle, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, TRUE);