Skip to content

Instantly share code, notes, and snippets.

@kevincantu
Created January 15, 2022 06:32
Show Gist options
  • Save kevincantu/6cac1ec713cad346f15d266dca5a6706 to your computer and use it in GitHub Desktop.
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
# 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