Skip to content

Instantly share code, notes, and snippets.

@jaircuevajunior
Created March 26, 2019 16:22
Show Gist options
  • Save jaircuevajunior/73f9ca8606c30324a7fc9159ff66fc43 to your computer and use it in GitHub Desktop.
Save jaircuevajunior/73f9ca8606c30324a7fc9159ff66fc43 to your computer and use it in GitHub Desktop.
Generate CSR and Private Key for SSL Certificate Request
#!/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