Skip to content

Instantly share code, notes, and snippets.

@dcaponi
Last active June 22, 2021 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcaponi/4163f9ec4169be5d59fbec3c3bd02212 to your computer and use it in GitHub Desktop.
Save dcaponi/4163f9ec4169be5d59fbec3c3bd02212 to your computer and use it in GitHub Desktop.
Self Signed Certs on Mac
  1. Create a private key openssl genrsa -out server.key 2048

  2. make a new x509 cert good for 10 years for that private key openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650

  3. Follow the prompts entering CY code, State/Region name, and localhost for everything else

  4. open keychain (cmd + space keychain access.app)

  5. Drag the .crt file into system certificates

  6. Double click the certificate, expand the "trust" section

  7. Where it says "Using this Certificate" Select "Always Trust" from the dropdown

  8. Confirm the change with your mac password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment