Created
July 22, 2020 00:56
-
-
Save fceruti/507d1e988d40ac44735356aa80bf7c38 to your computer and use it in GitHub Desktop.
Script que generar certificados para transbank
This file contains hidden or 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
echo "Super TBK Cert Generator 3.0" | |
echo " by @fceruti ⌐■-■\n" | |
read -p "Ingresa tu código de comercio: " given_commerce_code | |
COMMERCE_CODE="5970$given_commerce_code"; | |
openssl genrsa -out $COMMERCE_CODE.key 2048 >> /dev/null 2>&1 | |
echo ".\n.\n.\n.\n.\n$COMMERCE_CODE\n.\n.\n" | openssl req -new -key $COMMERCE_CODE.key -out $COMMERCE_CODE.csr >> /dev/null 2>&1 | |
echo "\n" | |
openssl x509 -req -days 1460 -in $COMMERCE_CODE.csr -signkey $COMMERCE_CODE.key -out $COMMERCE_CODE.crt >> /dev/null 2>&1 | |
echo "Proceso terminado. Se crearon los siguientes archivos:" | |
echo " - $COMMERCE_CODE.key (Mantener en secreto)" | |
echo " - $COMMERCE_CODE.csr (Puedes descartar)" | |
echo " - $COMMERCE_CODE.crt (Compartir con transbank)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment