4/11/2017 - 9:17 AM

trusted certificates system update-ca-certificates

trusted certificates system update-ca-certificates

Adding trusted root certificates to the server

Mac OS X

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/new-root-certificate.crt
sudo security delete-certificate -c "<name of existing certificate>"


certutil -addstore -f "ROOT" new-root-certificate.crt
certutil -delstore "ROOT" serial-number-hex

Linux (Ubuntu, Debian)

apt install ca-certificates
# Copy your CA to dir /usr/local/share/ca-certificates/
sudo cp foo.crt /usr/local/share/ca-certificates/foo.crt
sudo update-ca-certificates
# To remove/rebuild
sudo update-ca-certificates --fresh

Linux (CentOs 6)

yum install ca-certificates
#Enable the dynamic CA configuration feature:
update-ca-trust force-enable

#Add it as a new file to /etc/pki/ca-trust/source/anchors/:
cp foo.crt /etc/pki/ca-trust/source/anchors/

update-ca-trust extract

Linux (CentOs 5)

#Append your trusted certificate to file /etc/pki/tls/certs/ca-bundle.crt
cat foo.crt >> /etc/pki/tls/certs/ca-bundle.crt