Skip to content

Instantly share code, notes, and snippets.

@redzumi
Created March 2, 2019 23:44
Show Gist options
  • Save redzumi/8f518d6bf9ff7ed6d79efd133e536c44 to your computer and use it in GitHub Desktop.
Save redzumi/8f518d6bf9ff7ed6d79efd133e536c44 to your computer and use it in GitHub Desktop.
TLS Certificates
# Notice: app port should be correct, ex. 587
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls_cert.crt -keyout tls_key.key
openssl rsa -in tls_key.key -text > tls_key.pem
openssl x509 -inform PEM -in tls_cert.crt > tls_cert.pem
# and dont forget about chmod
# chmod 400 /root/certs/tls_key.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment