Skip to content

Commit

Permalink
revoke: Re-enable 'revoke-renewed' using the new method
Browse files Browse the repository at this point in the history
Command 'revoke' accepts a source directory as a variable, to determine
which type of certificate to revoke.  The types are: 'issued' (standard
certificates), 'expired' expired certificates) and 'renewed' (the old
renewed directory). The source directory is determined by the command
in use.

Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Apr 7, 2024
1 parent 8b62dcb commit 066a440
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -2652,12 +2652,8 @@ Run easyrsa without commands for usage and command help."
creds_in="$in_dir/${file_name_base}.creds"
inline_in="$in_dir/inline/${file_name_base}.inline"

# input cert for revocation, either issued/ or expired/
if [ "$revoke_expired" ]; then
crt_in="$in_dir/expired/${file_name_base}.crt"
else
crt_in="$in_dir/issued/${file_name_base}.crt"
fi
# input cert for revocation: issued, expired or renewed
crt_in="${in_dir}/${cert_dir}/${file_name_base}.crt"

# Assign possible "crl_reason"
if [ "$1" ]; then
Expand Down Expand Up @@ -5346,17 +5342,18 @@ case "$cmd" in
;;
revoke)
verify_working_env
revoke_expired=
cert_dir=issued
revoke "$@"
;;
revoke-expired)
verify_working_env
revoke_expired=1
cert_dir=expired
revoke "$@"
;;
revoke-renewed)
verify_working_env
revoke_renewed "$@"
cert_dir=renewed
revoke "$@"
;;
renew)
verify_working_env
Expand Down

0 comments on commit 066a440

Please sign in to comment.