Last active
May 9, 2020 00:31
-
-
Save amslezak/9a191a734dbd244a19f669a8bcc4f90a to your computer and use it in GitHub Desktop.
tl;dr of https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html Used for many generating self-signed certificates for backend services and uploading to AWS ACM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate private key to create certificate signing request | |
# privatekey.pem | |
openssl genrsa 2048 >private.pem | |
# create a certificate signing request (CSR) | |
# csr.pem | |
openssl req -new -key private.pem -out csr.pem | |
# sign the certificate (from CSR) | |
# public.crt | |
openssl x509 -req -days 9999 -in csr.pem -signkey private.pem -out public.crt | |
# for windows servers - generate PFX certificate | |
# public.pfx | |
openssl pkcs12 -export -out public.pfx -inkey private.pem -in public.crt | |
# Keep the private key and public certificate for later use. | |
# Delete the signing request | |
rm csr.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment