virtualization

SSL Certificate

MacOS

  • add

    $ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/new-root-certificate.crt
  • remove

    $ sudo security delete-certificate -c "<name of existing certificate>"

Ubuntu

  • add

    $ cp ca.crt /usr/local/share/ca-certificates/
    $ sudo cp foo.crt /usr/local/share/ca-certificates/foo.crt
    $ sudo update-ca-certificates
  • remove

    $ sudo rm -rf /usr/local/share/ca-certificates/ca.crt
    $ sudo rm -rf /usr/local/share/ca-certificates/foo.crt
    $ sudo update-ca-certificates --fresh

CentOS 6

  • add

    $ sudo yum install -y ca-certificates
    $ sudo update-ca-trust force-enable
    $ sudo cp foo.crt /etc/pki/ca-trust/source/anchors/
    $ update-ca-trust extract

CentOS 5

  • add

    $ cat foo.crt >>/etc/pki/tls/certs/ca-bundle.crt

Windows

  • add

    $ certutil -addstore -f "ROOT" new-root-certificate.crt
  • remove

    $ certutil -delstore "ROOT" serial-number-hex

Last updated