Created
February 4, 2020 10:01
-
-
Save 15below-adamhancock/2cb5a1946ebf03069f73defe7ac7f558 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 | |
name=`echo $1 | tr -d '.pfx'` | |
read -s -p "Enter PFX Password: " password | |
openssl pkcs12 -in $1 -nocerts -nodes -out $name-key.pem -passin pass:$password | |
echo "Exporting $name.key" | |
openssl rsa -in $name-key.pem -out $name.key | |
rm -rf $name-key.pem | |
echo "Exporting $name-cert.pem" | |
openssl pkcs12 -in $1 -clcerts -nokeys -out $name-cert.pem -passin pass:$password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment