Created
January 15, 2022 06:32
-
-
Save kevincantu/6cac1ec713cad346f15d266dca5a6706 to your computer and use it in GitHub Desktop.
Adding a TLS client certificate (PEM + PKCS#12) to your Keychain Access on macOS, from the CLI
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
# given files | |
# * kcantu-cert.pem | |
# * kcantu-key.pem | |
# * kcantu.p12 | |
# add the identity + certificate | |
security import kcantu.p12 | |
# trust the certificate (as if in GUI choosing "Always Trust" | |
sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain kcantu-cert.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment