Skip to content

Instantly share code, notes, and snippets.

@barryjburns
Last active November 22, 2021 12:44
Show Gist options
  • Save barryjburns/c5206c593bd9585916193a8dec803d44 to your computer and use it in GitHub Desktop.
Save barryjburns/c5206c593bd9585916193a8dec803d44 to your computer and use it in GitHub Desktop.
CLI cheat sheet

CLI cheat sheet

openssl

  • Self-signed global wildcard certificate1:

    openssl req -x509 -new -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -subj '/CN=*'

  • Convert PEM to PKCS12

    openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile more.crt

Footnotes

  1. This certificate will be accepted for any domain name or purpose. Then you can put 127.0.0.1 in your hosts file and develop with name-base vhosting.

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