SSL3_GET_SERVER_CERTIFICATE: certificate verify failed

Monday, a shopping cart solution that has worked for years started throwing this error when connecting to Authorize.net

Could not connect to the specified payment gateway SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed

Why was curl trying to connect over SSL3 anyway? Looked at the code, no SSL protocol was selected so I figured time to upgrade. It was an old server anyway, Ubuntu 10.04. Upgraded to 12.04. No change. So upgraded to Ubuntu 14.04 and now we get a new error message. It is progress.

 Could not connect to the specified payment gateway SSL certificate problem: unable to get local issuer certificate

So, we are closer. Googled on this message and found info on curl.cainfo= and so i downloaded and set cacert.pem in php.ini but it didn’t help.

Finally got info from authorize net. It seems the Entrust certificate did not get downloaded with the upgrade to 14.04.

Here is how to fix it!

sudo wget --no-check-certificate https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer -o /usr/local/share/ca-certificates/entrust_ssl_ca.crt 
sudo update-ca-certificates

This was a three hour ordeal. I have not found any other info about this on the web, so it seemed a worthy blog post.

This entry was posted in Linux, SSL. Bookmark the permalink.

Comments are closed.