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
#!/bin/bash | |
# Usage | |
# $ ./install-cert-macos.sh "/path/to/cert" | |
CERT_PATH="$1" | |
# First, grab the SHA-1 from the provided SSL cert. | |
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g") | |
# Next, grab the SHA-1s of any standard.dev certs in the keychain. | |
# Don't return an error code if nothing is found. |