Created
March 26, 2019 16:22
-
-
Save jaircuevajunior/73f9ca8606c30324a7fc9159ff66fc43 to your computer and use it in GitHub Desktop.
Generate CSR and Private Key for SSL Certificate Request
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 | |
DOMAIN=$1 | |
if [ -z "$DOMAIN" ] | |
then | |
echo "Favor digitar o domínio como primeiro parâmetro após o comando" | |
exit 1 | |
else | |
echo "Utilizando domínio $DOMAIN" | |
fi | |
openssl genrsa -out $DOMAIN.key 2048 &&\ | |
openssl req -new -sha256 -key $DOMAIN.key -out $DOMAIN.csr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment