Importing a CA Certificate in RHEL/CentOS
Copy the Certificate:
sudo cp your-ca-certificate.crt /etc/pki/ca-trust/source/anchors/
Update the CA Trust:
sudo update-ca-trust extract
Importing a CA Certificate in Ubuntu/Debian
Copy the Certificate:
sudo cp your-ca-certificate.crt /usr/local/share/ca-certificates/
Update the CA Trust:
sudo update-ca-certificates
Importing a CA Certificate in Fedora
Copy the Certificate:
sudo cp your-ca-certificate.crt /etc/pki/ca-trust/source/anchors/
Update the CA Trust:
sudo update-ca-trust
Importing a CA Certificate in SUSE/OpenSUSE
Copy the Certificate:
sudo cp your-ca-certificate.crt /etc/pki/trust/anchors/
Update the CA Trust:
sudo update-ca-certificates
Importing a CA Certificate in Arch Linux
Copy the Certificate:
sudo cp your-ca-certificate.crt /etc/ca-certificates/trust-source/anchors/
Update the CA Trust:
sudo trust extract-compat
Importing a CA Certificate in Alpine Linux
Install the
ca-certificates
package:sudo apk add ca-certificates
Copy the Certificate:
sudo cp your-ca-certificate.crt /usr/local/share/ca-certificates/
Update the CA Trust:
sudo update-ca-certificates
Verification
To verify that the CA certificate has been correctly imported and trusted, you can use the OpenSSL tool. Run the following command:
openssl s_client -connect some-secure-site.com:443 -CApath /etc/ssl/certs
Replace /etc/ssl/certs
with the appropriate directory if necessary. This command helps ensure that your system recognizes the new certificate and includes it in its list of trusted CAs.