Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pretorh/d5baa22dcdd4ff0b613f909c23e4bcc7 to your computer and use it in GitHub Desktop.
Save pretorh/d5baa22dcdd4ff0b613f909c23e4bcc7 to your computer and use it in GitHub Desktop.
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key
openssl req -new -key server.key -out server.csr -subj "/CN=localhost"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
rm server.pass.key server.csr

(use "/C=/ST=/L=/O=IT/CN=localhost" with country code, state|province name, location name for more details in the cert)

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