SSL certificate problem: unable to get local issuer certificate

SSL certificate problem: unable to get local issuer certificate
SSL certificate problem: unable to get local issuer certificate

It is safe to say that you are fraught with the message “SSL certificate problem: unable to get local issuer certificate” during the execution of a cURL request for a protected HTTPS goal. Indeed, at that point, there’s no compelling reason to stress, however, it’s not normal, now and then this issue happens. To begin with, we should perceive what the fundamental driver for this issue is to happen and later on we will perceive how to overcome it.

The principle explanation behind this issue to happen is the point at which you are utilizing client SSL and you attempt to request verified HTTPS source, for which you need to share an SSL/TLS Certificate for the confirmation of your identity. While this is happening, if the root certificate doesn’t function appropriately, at that point it might cause this issue.

To fix this SSL Certificate Problem: Unable to get Local Issuer Certificate, three distinct solutions are accessible, from which one will work with most users. Before we put forward the solutions, here we briefly explain about SSL certificate.

What is SSL certificate?

An SSL Certificate, also known as a Digital Certificate, makes a secure connection between a site and a guest’s browser. By guaranteeing that all information between the two stays private and secure, SSL encryption keeps hackers from taking private data, for example, charge card numbers, names, and addresses.

If you sell items or services on your site and acknowledge Mastercards on the web, you need an SSL Certificate for site security. In case you don’t offer on the web but need to put in credibility to your site, a Site Confirm Seal might be adequate.

Root cause of SSL certificate problem: unable to get local issuer certificate

Now and again, if you are utilizing client SSL certificates, when you request a protected HTTPS source, you need to share an SSL certificate to confirm your identity. All things considered if you go over the “SSL certificate issue: unable to get local issuer certificate” issue, it’s a sign that the root certificates on the system are not working effectively. This issue happens when a self-marked certificate can’t be checked.

Continue reading to discover how to overcome “SSL certificate problem: unable to get local issuer certificate”.

Solutions to SSL certificate problem: unable to get local issuer certificate

We have put forward three major solutions for the “SSL certificate problem: unable to get local issuer certificate” issue.

1. Change php.ini (maintain SSL)

  • Open http://curl.haxx.se/ca/cacert.pem to download cacert.pem.
  • Copy cacert.pem to your version of openssl/zend like ‘/usr/local/openssl-0.9.8/certs/cacert.pem’.
  • In your php.ini file, modify the CURL configuration after adding “cainfo = ‘/usr/local/openssl-0.9.8/certs/cacert.pem’”
  • Then restart PHP now to see if CURL can read HTTPS URL.

2. Do not change php.ini (maintain SSL)

Enter this code:

$ch = curl_init();
$certificate_location = ‘/usr/local/openssl-0.9.8/certs/cacert.pem’; 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $certificate_location); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $certificate_location); 

3. Disable SSL

Enter this code:

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 

One of the solutions mentioned above will surely be functioning for you, after that you will no longer be fraught this message “SSL certificate problem: unable to get local issuer certificate”.

This entry was posted in Tips & Tricks. Bookmark the permalink.
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments