[Solved] Can’t validate SSL certificate. either it is self-signed (which will cause browser warnings) or it is invalid.

In some cases when a user tries to share a website link on Facebook, the post image doesn’t appear. Since post-image sharing is associated with the open graph-structured metadata it needed to be debugged with a Facebook sharing debugger.

In this article, we will how to fix the SSL_CACERT error by creating and installing a full chain SSL certificate on the website.

When the webpage URL is debugged with the Facebook sharing debugger, the following SSL-related error message is generated. The error message screenshot is as follows,

Curl Error 60
Facebook Sharing Debugger

The Facebook sharing debugger clearly tells that the error is related to the SSL certificate. And Error code is ” Curl error:60(SSL_CACERT)”.

Error: “Can’t validate SSL Certificate. Either it is self-signed (which will cause browser warnings) or it is invalid.” and Curl Error: “Curl error: 60 (SSL_CACERT)

The problem is with SSL certificate installation. The server’s certificate chain is incomplete. That’s why Facebook debugger is considering post links unsafe to display the post images. Furthermore to investigate, if we analyze/test SSL certificates at SSL Labs we get a B grade rating.

The reason to rate with a “B” grade is also mentioned in the report. As you can check the following sample test report. The reason is highlighted with a red-colored square with the message ” This server’s certificate is incomplete. Grade capped to B.”. And the same is causing “Curl error: 60 (SSL_CACERT)” at the Facebook debugger.

Curl error: 60 (SSL_CACERT).
SSL Certificate Test at SSL Labs

Failure to install the correct chain can cause certificate errors in browsers, driving visitors away from your site. To complicate matters, some browsers cache intermediate certificates, or download missing intermediates on-demand, meaning that an improperly-configured chain could work in some browsers but not others, making this an annoying problem to debug.

Fix the ” SSL_CACERT” error by installing full chain SSL Certificate

To solve this problem you have to install a full chain SSL certificate. You will get a full chain certificate by combining your site Certificate (CRT) and Certificate Authority Bundle (CABUNDLE).

Go to your SSL installation page, Initiate SSL installation

  1. Install Private key: (KEY)
  2. Then Install “CRT + CABUNDLE ” in single file.

If you are still confused about how to generate a chain certificate you can use Whats My Chain Cert tool.

After installing the chain certificate Curl Error: “Curl error: 60 (SSL_CACERT)” should be solved. And post image should appear when it is shared on Facebook.

Leave a Comment

Related Posts