Install own CA-Certificate in Ubuntu

  • Ubuntu 10.04 LTS (Server)
  • openssl
  • Custom CA-Cert available as DER file (*.cer)
# Step 0: Convert the Certificate to PEM format
$ openssl x509 -inform der -in certificate.cer -out certificate.pem

# Step 0.5: Make sure there is only 1 Certificate in the File
$ grep 'BEGIN.* CERTIFICATE' ProxyCA.pem | wc -l # should output `1`

# Step 1: Verify it's the correct Certificate
$ openssl x509 -noout -fingerprint -in certificate.pem

# Step 2: Copy the File to /etc/ssl/certs
$ # Do I really have to explain that? If you can't do that on your own you probably shouldn't be installing CA-Certificates...

# Step 3: Find out the Hash of your Cert
$ openssl x509 -noout -hash -in certificate.pem

# Step 4: Inside /etc/ssl/certs, link your certificate to "hash.0"
$ ln -s certificate.crt `openssl x509 -hash -noout -in certificate.crt`.0