Skip to content

Instantly share code, notes, and snippets.

@GoranLilja
Last active February 2, 2018 07:02
Show Gist options
  • Save GoranLilja/b62756e3637cec6f2fc1125031cf8863 to your computer and use it in GitHub Desktop.
Save GoranLilja/b62756e3637cec6f2fc1125031cf8863 to your computer and use it in GitHub Desktop.
Generate self-signed certificate

Steps

Generate a Private Key

openssl genrsa -des3 -out server.key 1024

Generate a CSR (Certificate Signing Request)

openssl req -new -key server.key -out server.csr

Remove Passphrase from Key

cp server.key server.key.org

openssl rsa -in server.key.org -out server.key

Generating a Self-Signed Certificate

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Link

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