Created
July 2, 2020 10:35
-
-
Save virtualstaticvoid/987cf41520bcd7d978370661e1e9da53 to your computer and use it in GitHub Desktop.
Install Custom CA Certificate (with name check)
This file contains hidden or 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
#!/bin/bash | |
cert=${1:-ca.pem} | |
name=$2 | |
sudo mkdir -p /usr/local/share/ca-certificates | |
sudo cp $cert /usr/local/share/ca-certificates/ | |
sudo update-ca-certificates | |
# check | |
openssl crl2pkcs7 -nocrl -certfile /etc/ssl/certs/ca-certificates.crt | openssl pkcs7 -print_certs -text -noout | grep -i $name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment