Add Trusted Certificate Authority into CentOS

When working with networks that require security, if we request to sites that use HTTPS, we will often encounter issues related to the SSL certificate, my example is as follows:

Add Trusted Certificate Authority into CentOS

To resolve this error, we need to download the certificate for that site and save it to the Trusted Certificate Authority of the operating system.

To do this, the first thing we will use is an OpenSSL command to save the certificate of the site, the syntax of this command is as follows:

Therein, HOST_NAME is the name of the website you are having problems with, FILE_NAME is the name of the file after we save the certificate.

In my case, I will run the following command:

Once the certificate has been saved, copy the file to /etc/pki/ca-trust/source/anchors/ of CentOS and run the following command to update the Trusted Certificate Authority:

Mine is as follows:

Results after updating the certificate:

Add Trusted Certificate Authority into CentOS

Add Comment