Skip to content

Instantly share code, notes, and snippets.

@mundry
Last active December 31, 2015 19:27
Show Gist options
  • Save mundry/9a6f983f9bd9d759d511 to your computer and use it in GitHub Desktop.
Save mundry/9a6f983f9bd9d759d511 to your computer and use it in GitHub Desktop.
Self-signed SSL Certificate one-liner

Self-signed SSL Certificate one-liner

$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout domain.key -out domain.crt
  • openssl req - generate a certificate
  • -x509 - use x509 specification
  • -nodes - no DES, don't encrypt the private key
  • -days 365 - valid for 1 year
  • rsa:2048 - use a 2048 bit private key
  • -keyout - output location of the private key
  • -out - output location of the certificate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment