Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2017 21:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to generate a self-signed TLS (SSL) certificate on Amazon Linux

Execute the following commands from the folder in which the certificate files need to be stored.

  1. openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
  2. openssl rsa -passin pass:x -in server.pass.key -out server.key
  3. rm server.pass.key
  4. openssl req -new -key server.key -out server.csr
  5. openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment