Created
March 4, 2014 19:37
-
-
Save thinktainer/9353958 to your computer and use it in GitHub Desktop.
generate azure keys
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
# You may want to use another dir than /tmp | |
cd /tmp | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout azure-private.key -out azure-certificate.pem | |
chmod 600 azure-private.key azure-certificate.pem | |
openssl x509 -outform der -in azure-certificate.pem -out azure-certificate.cer | |
# Generate a keystore (azurekeystore.pkcs12) | |
# Transform private key to PEM format | |
openssl pkcs8 -topk8 -nocrypt -in azure-private.key -inform PEM -out azure-pk.pem -outform PEM | |
# Transform certificate to PEM format | |
openssl x509 -inform der -in azure-certificate.cer -out azure-cert.pem | |
cat azure-cert.pem azure-pk.pem > azure.pem.txt | |
# You MUST enter a password! | |
openssl pkcs12 -export -in azure.pem.txt -out azurekeystore.pkcs12 -name azure -noiter -nomaciter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment