diff --git a/ChangeLog b/ChangeLog index 79057fd6..bec13da7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ Easy-RSA 3 ChangeLog 3.2.2 (TBD) + * bugfix: revoke, renew: Remove pki/inline/private/$file.inline (febef85) (#1244) + Initial bug report #1242 (Minor) + Stop removing old credentials file pki/$file.creds (a871e9c) * Add LibreSSL version 4 to supported SSL Libraries (7df616b) (#1240) * sign-req: Allow custom X509 Types (2ee08cc) (#1238) * Remove redundant file index.txt.attr (da3c249) (#1233) diff --git a/dev/easyrsa-tools.lib b/dev/easyrsa-tools.lib index cf8b62b8..212cdf1c 100644 --- a/dev/easyrsa-tools.lib +++ b/dev/easyrsa-tools.lib @@ -689,8 +689,8 @@ Run easyrsa without commands for usage and command help." crt_in="$in_dir/issued/${file_name_base}.crt" key_in="$in_dir/private/${file_name_base}.key" req_in="$in_dir/reqs/${file_name_base}.req" - creds_in="$in_dir/${file_name_base}.creds" - inline_in="$in_dir/inline/${file_name_base}.inline" + inline_pub="$in_dir/inline/${file_name_base}.inline" + inline_pri="$in_dir/inline/private/${file_name_base}.inline" # deprecate ALL options while [ "$1" ]; do @@ -829,8 +829,8 @@ These files will be DELETED: All PKCS files for commonName: $file_name_base The inline credentials files: -* $creds_in -* $inline_in" +* $inline_pub +* $inline_pri" # move renewed files # so we can reissue certificate with the same name @@ -908,19 +908,9 @@ renew_move() { rm -f "$in_dir/private/$file_name_base.$pkcs" done - # remove credentials file - if [ -f "$creds_in" ]; then - rm "$creds_in" || warn "\ -Failed to remove credentials file: -* $creds_in" - fi - - # remove inline file - if [ -f "$inline_in" ]; then - rm "$inline_in" || warn "\ -Failed to remove inline file: -* $inline_in" - fi + # remove inline files + rm -f "$inline_pub" "$inline_pri" || warn \ + "renew_move - Error trying to remove inline files." } # => renew_move() # Verify certificate against CA diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 690055af..a001a97a 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -3203,8 +3203,8 @@ Run easyrsa without commands for usage and command help." in_dir="$EASYRSA_PKI" key_in="$in_dir/private/${file_name_base}.key" req_in="$in_dir/reqs/${file_name_base}.req" - creds_in="$in_dir/${file_name_base}.creds" - inline_in="$in_dir/inline/${file_name_base}.inline" + inline_pub="$in_dir/inline/${file_name_base}.inline" + inline_pri="$in_dir/inline/private/${file_name_base}.inline" # input cert for revocation: issued, expired or renewed crt_in="${in_dir}/${cert_dir}/${file_name_base}.crt" @@ -3368,11 +3368,11 @@ These files will be MOVED to the 'revoked' sub-directory: * $crt_in${if_exist_key_in}${if_exist_req_in} These files will be DELETED: -All PKCS files for commonName : $file_name_base +All PKCS files for commonName: $file_name_base The inline credentials files: -* $creds_in -* $inline_in" +* $inline_pub +* $inline_pri" confirm " Continue with revocation: " "yes" " Please confirm that you wish to revoke the certificate @@ -3441,19 +3441,9 @@ revoke_move() { fi done - # remove credentials file - if [ -f "$creds_in" ]; then - rm "$creds_in" || warn "\ -Failed to remove credentials file: -* $creds_in" - fi - - # remove inline file - if [ -f "$inline_in" ]; then - rm "$inline_in" || warn "\ -Failed to remove inline file: -* $inline_in" - fi + # remove inline files + rm -f "$inline_pub" "$inline_pri" || warn \ + "revoke_move - Error trying to remove inline files." } # => revoke_move() # Move expired cert out of pki/issued to pki/expired @@ -3473,7 +3463,6 @@ Run easyrsa without commands for usage and command help." crt_in="$in_dir/$file_name_base.crt" #key_in="$in_dir/private/$file_name_base.key" #req_in="$in_dir/reqs/$file_name_base.req" - #creds_in="$EASYRSA_PKI/$file_name_base.creds" # output out_dir="$EASYRSA_PKI/expired"