Created
January 20, 2014 15:09
-
-
Save Luavis/8521550 to your computer and use it in GitHub Desktop.
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/sh | |
echo "Certification password:" | |
read -s password | |
read -p "Domain(www.xxx.xxx): `echo $'\n> '`" domain | |
read -p "Country(KR, US): `echo $'\n> '`" country | |
read -p "State/Province: `echo $'\n> '`" state | |
read -p "City: `echo $'\n> '`" city | |
read -p "Organization: `echo $'\n> '`" org | |
read -p "Team: `echo $'\n> '`" team | |
read -p "Email: `echo $'\n> '`" email | |
openssl genrsa -des3 -out $domain.key.tmp -passout pass:"$password" 2048 | |
openssl rsa -in $domain.key.tmp -passin pass:"" -out $domain.key | |
openssl req -new -key $domain.key.tmp -passin pass:"$password" -out $domain.csr -subj "/C=$country/ST=$state/L=$city/O=$org/OU=$team/CN=$domain/emailAddress=$email" | |
openssl req -noout -text -in $domain.csr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment