Created
September 19, 2022 10:32
-
-
Save sefacan/9044a4f2c72edd993ad551f2f7314e8a to your computer and use it in GitHub Desktop.
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/sh | |
openssl genrsa -out key.pem 2048 | |
openssl req -new -sha256 -key key.pem -out csr.csr | |
openssl req -x509 -sha256 -days 365 -key key.pem -in csr.csr -out certificate.pem | |
openssl req -in csr.csr -text -noout | grep -i "Signature.*SHA256" && echo "All is well" || echo "This certificate will stop working in 2017! You must update OpenSSL to generate a widely-compatible certificate" | |
mv key.pem ./ssl/cert.key | |
mv certificate.pem ./ssl/cert.pem | |
mv csr.csr ./ssl/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment