Skip to content

Instantly share code, notes, and snippets.

@SamvitJ
Last active April 29, 2016 04:18
Show Gist options
  • Save SamvitJ/bdd70aac1c3b9770772a0ba295569d32 to your computer and use it in GitHub Desktop.
Save SamvitJ/bdd70aac1c3b9770772a0ba295569d32 to your computer and use it in GitHub Desktop.
Scripts for importing/installing self-signed certificate on OS X
# Cert signed by a root CA
scp [email protected]:~/scripted/root-CA/{server.crt,rootCA.pem} .
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "./rootCA.pem"
sudo security add-trusted-cert -r trustRoot -k "/Library/Keychains/System.keychain" "./server.crt"
# Self-signed cert
scp [email protected]:~/scripted/server-only/server.crt .
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "./server.crt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment