Skip to content

Instantly share code, notes, and snippets.

@kuzmicheff
Created November 6, 2017 21:27
Show Gist options
  • Save kuzmicheff/26099c5e1863ee823b679e87f6ea4573 to your computer and use it in GitHub Desktop.
Save kuzmicheff/26099c5e1863ee823b679e87f6ea4573 to your computer and use it in GitHub Desktop.
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