Skip to content

Instantly share code, notes, and snippets.

@muratgozel
Last active August 4, 2017 18:28
Show Gist options
  • Save muratgozel/9104cad67353bee7b59a60ef385a71ad to your computer and use it in GitHub Desktop.
Save muratgozel/9104cad67353bee7b59a60ef385a71ad to your computer and use it in GitHub Desktop.
Generates private key - public certificate pair in a single command.
# Remove -nodes if you want to protect the cert with a password.
openssl req -x509 -newkey rsa:4096 -keyout sample-key.pem -out sample-cert.pem -days 365 -subj '/CN=sample.com/O=Sample Corp./C=US' -nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment