Skip to content

Instantly share code, notes, and snippets.

@caccialdo
Last active March 9, 2018 15:50
Show Gist options
  • Save caccialdo/29560fea36618236dc4de944f0fb1c5b to your computer and use it in GitHub Desktop.
Save caccialdo/29560fea36618236dc4de944f0fb1c5b to your computer and use it in GitHub Desktop.
Creating and registering a custom SSL certificate on OSX
# Prerequisite: openssl
openssl req -subj '/CN=example.com/O=Acme Inc/C=UK' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout sslCertificate.key -out sslCertificate.crt
sudo security add-trusted-cert -d -r trustRoot -p ssl -k /Library/Keychains/System.keychain sslCertificate.cer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment