Skip to content

Instantly share code, notes, and snippets.

@balos1
Last active December 27, 2015 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balos1/306699f5b91dac4f3a94 to your computer and use it in GitHub Desktop.
Save balos1/306699f5b91dac4f3a94 to your computer and use it in GitHub Desktop.
A bash script to create cer files quickly.
#!/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
@balos1
Copy link
Author

balos1 commented Dec 27, 2015

Works great for creating .cers needed for Microsoft Azure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment