From f8be2842f381067cfbd72beddd2bfe94b2e50347 Mon Sep 17 00:00:00 2001 From: Daniel Jakots Date: Sat, 20 May 2017 22:10:46 -0400 Subject: [PATCH] fail if there's no openssl.cnf --- shellpki.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shellpki.sh b/shellpki.sh index 36e3427..e83caff 100755 --- a/shellpki.sh +++ b/shellpki.sh @@ -29,6 +29,14 @@ init() { if [ ! -f $PREFIX/ca/index.txt ]; then touch $PREFIX/ca/index.txt; fi if [ ! -f $PREFIX/files/ca/serial ]; then echo 01 > $PREFIX/ca/serial; fi + if [ ! -e "$CONFFILE" ]; then + echo "$CONFFILE is missing" >&2 + echo >&2 + echo "Press return to continue..." >&2 + read REPLY + exit 1 + fi + $OPENSSL dhparam -out $PREFIX/ca/dh2048.pem 2048 $OPENSSL genrsa -out $PREFIX/ca/private.key 2048