Merge pull request #1139 from LLautenbacher/feature/show_expired_cert

Showing expired certificates as such.
This commit is contained in:
Orazio 2020-10-01 13:46:26 +02:00 committed by GitHub
commit 77e75829ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,14 @@ if [ ! -f "${INDEX}" ]; then
exit 1
fi
EASYRSA="/etc/openvpn/easy-rsa/easyrsa"
if [ ! -f "${EASYRSA}" ]; then
echo "The file: $EASYRSA was not found!"
exit 1
fi
$EASYRSA update-db >> /dev/null 2>1
printf ": NOTE : The first entry should always be your valid server!\n"
printf "\\n"
printf "\\e[1m::: Certificate Status List :::\\e[0m\\n"
@ -23,6 +31,8 @@ while read -r line || [ -n "$line" ]; do
printf "Valid \t %s \t %s\\n" "$NAME" "$EXPD"
elif [ "${STATUS}" == "R" ]; then
printf "Revoked \t %s \t %s\\n" "$NAME" "$EXPD"
elif [ "${STATUS}" == "E" ]; then
printf "Expired \t %s \t %s\\n" "$NAME" "$EXPD"
else
printf "Unknown \t %s \t %s\\n" "$NAME" "$EXPD"
fi