Add possibility to encrypt private keys.

This commit is contained in:
Romain Dessort 2013-10-15 14:01:38 +02:00
parent b0724c97ea
commit 0bb337f56c

View file

@ -61,7 +61,13 @@ create() {
mkdir $DIR
# generate private key
$OPENSSL genrsa -out $DIR/$cn.key 2048
echo -n "Should private key be protected by a passphrase? [y/N] "
read
if [ "$REPLY" = "y" ] || [ "REPLY" = "Y" ]; then
$OPENSSL genrsa -des -out $DIR/$cn.key 2048
else
$OPENSSL genrsa -out $DIR/$cn.key 2048
fi
# generate csr req
$OPENSSL req \