Skip to content

Instantly share code, notes, and snippets.

@barser
Forked from hamburghammer/add_CA_on_linux.md
Created January 16, 2022 19:40
Show Gist options
  • Save barser/518c3cc44c383aec18de5da3601ed591 to your computer and use it in GitHub Desktop.
Save barser/518c3cc44c383aec18de5da3601ed591 to your computer and use it in GitHub Desktop.
Add CA cert to local trust store on CentOS, Manjaro, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://example.com

On Manjaro (arch) the location for the certificates is: /usr/share/ca-certificates/trust-source/anchors (low priority) or /etc/ca-certificates/trust-source/anchors/ (high priority) and the command to update is update-ca-trust extract.

On debian and ubuntu the directory is /usr/local/share/ca-certificates/ and the command to update is update-ca-certificates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment