From 9f3b0a4cd4ca076891854d0fbc6f3589370e0082 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 12 Oct 2020 23:49:45 +0200 Subject: [PATCH] list: better options parsing --- shellpki | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shellpki b/shellpki index 89304e6..f04e552 100755 --- a/shellpki +++ b/shellpki @@ -215,7 +215,7 @@ Revoke a client cert with is commonName (CN) : List all actually valid commonName (CN) : - ${0} list [-a|v|r] + ${0} list [-a|--all|-v|--valid|-r|--revoked] Check expiration date of valid certificates : @@ -763,6 +763,11 @@ list() { exit 0 fi + if [ -z "${1}" ]; then + show_usage >&2 + exit 1 + fi + list_valid=0 list_revoked=1