Last active
December 27, 2015 08:37
-
-
Save balos1/306699f5b91dac4f3a94 to your computer and use it in GitHub Desktop.
A bash script to create cer files quickly.
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
#!/bin/bash | |
if [ -z "$1"] | |
then | |
echo "./create.cert <name>" | |
echo "please provide name argument" | |
exit 1 | |
else | |
name=$1 | |
fi | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $name.pem -out $name.pem | |
openssl pkcs12 -export -out $name.pfx -in $name.pem -name "$name" | |
openssl x509 -inform pem -in $name.pem -outform der -out $name.cer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works great for creating
.cer
s needed for Microsoft Azure.