Last active
August 29, 2015 14:03
-
-
Save mhutter/f39013a53e84de7de153 to your computer and use it in GitHub Desktop.
Install own CA-Certificate in Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' certificate.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 anyway... | |
# 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.pem `openssl x509 -hash -noout -in certificate.pem`.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment