Created
February 16, 2016 12:29
-
-
Save devopsmariocom/ffdd2b82a56e8d63d7df to your computer and use it in GitHub Desktop.
Simple script to install root cert from self signed server
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 | |
# Usage: $ install-root-cert.sh serve.name.local 8443 | |
openssl s_client -showcerts -connect $1:$2 </dev/null 2>/dev/null|openssl x509 -outform PEM > ./$1.pem | |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./$1.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment