Command renew: Process options correctly and minor improvements

Process options correctly:
* This removes an errant 'shift' when processing options.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-12-17 21:45:23 +00:00
parent 97fec2de61
commit b4dc2ad0ea
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -2171,16 +2171,17 @@ Run easyrsa without commands for usage and command help."
# Upgrade CA index.txt.attr - unique_subject = no
up23_upgrade_ca || die "Failed to upgrade CA to support renewal."
# Set 'nopass'
case "$1" in
nopass)
warn "\
Option 'nopass' is no longer supported by command 'renew'."
shift
;;
'') :; shift ;; # Empty ok
*) die "Unknown option: $1"
esac
# deprecate ALL options
while [ "$1" ]; do
case "$1" in
nopass)
warn "\
Option 'nopass' is not supported by command 'renew'."
;;
*) die "Unknown option: $1"
esac
shift
done
# referenced cert must exist:
[ -f "$crt_in" ] || die "\