Skip to content

Instantly share code, notes, and snippets.

@virtualstaticvoid
Created July 2, 2020 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualstaticvoid/987cf41520bcd7d978370661e1e9da53 to your computer and use it in GitHub Desktop.
Save virtualstaticvoid/987cf41520bcd7d978370661e1e9da53 to your computer and use it in GitHub Desktop.
Install Custom CA Certificate (with name check)
#!/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