Add possibility to encrypt private keys.
This commit is contained in:
parent
b0724c97ea
commit
0bb337f56c
|
@ -61,7 +61,13 @@ create() {
|
||||||
mkdir $DIR
|
mkdir $DIR
|
||||||
|
|
||||||
# generate private key
|
# 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
|
# generate csr req
|
||||||
$OPENSSL req \
|
$OPENSSL req \
|
||||||
|
|
Loading…
Reference in a new issue