Created
January 14, 2019 14:12
-
-
Save thajo/900c9b3bd42c0773adb197199928f14c 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/bash | |
echo "Generating self-signed certificates..." | |
mkdir -p ./config/sslcerts | |
openssl genrsa -out ./config/sslcerts/key.pem 4096 | |
openssl req -new -key ./config/sslcerts/key.pem -out ./config/sslcerts/csr.pem | |
openssl x509 -req -days 365 -in ./config/sslcerts/csr.pem -signkey ./config/sslcerts/key.pem -out ./config/sslcerts/cert.pem | |
rm ./config/sslcerts/csr.pem | |
chmod 600 ./config/sslcerts/key.pem ./config/sslcerts/cert.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment