Skip to content

Commit

Permalink
Merge pull request #302 from outflanknl/openssl-basic-sanity-check
Browse files Browse the repository at this point in the history
Basic sanity check of openssl config file in initial install script
  • Loading branch information
MarcOverIP authored Sep 27, 2023
2 parents a4d290e + 6a449b3 commit 305f634
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions initial-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ if [ ! -f $1 ];then
exit 1
fi >> $LOGFILE 2>&1


echo "[*] Doing basic sanity check of openssl config file." | tee -a $LOGFILE
grep -E "MODIFYME|dnsnameofyourredelkserver|someseconddnsname|123.123.123.123" $1 | grep -v "^#" >> $LOGFILE 2>&1
ERROR=$?
if [ $ERROR -ne 0 ]; then
echoerror "[X] Check your openssl config file, it fails basic sanity checks. (Error Code: $ERROR)."
exit 1
fi

echo ""
echo "[*] Will generate TLS certificates for the following DNS names and/or IP addresses:" | tee -a $LOGFILE
grep -E "^DNS\.|^IP\." certs/config.cnf
Expand Down

0 comments on commit 305f634

Please sign in to comment.