diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index fd17ede..650c80c 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -39,16 +39,16 @@ Here is the list of commands available with a short syntax reminder. Use the renew [cmd-opts] revoke-renewed [cmd-opts] renewable [ ] - rewind-renewed + rewind-renew gen-crl update-db show-req [ cmd-opts ] show-cert [ cmd-opts ] show-ca [ cmd-opts ] show-crl - show-expire (Optional) - show-revoke (Optional) - show-renew (Optional) + show-expire [ ] + show-revoke [ ] + show-renew [ ] verify import-req export-p1 [ cmd-opts ] @@ -148,8 +148,8 @@ cmd_help() { renewable) text=" renewable [ ] Check which certificates can be renewed" ;; - rewind-renewed) text=" - rewind-renewed + rewind-renew) text=" + rewind-renew Rewind EasyRSA version 3.0 style renewed certificates. Moves and renames certs, keys and reqs. Use with caution! @@ -2088,7 +2088,7 @@ EOF rewind_renew() { # pull filename base: serial number [ "$1" ] || die "\ -Error: didn't find a file base name as the first argument. +Error: didn't find a serial number as the first argument. Run easyrsa without commands for usage and command help." verify_ca_init @@ -2142,11 +2142,11 @@ Cannot renew this certificate because a conflicting file exists. unset -v deny_msg # move crt, key and req file to renewed folders - cp "$crt_in" "$crt_out" || die "Failed to move: $crt_in" + mv "$crt_in" "$crt_out" || die "Failed to move: $crt_in" # only move the key if we have it if [ -e "$key_in" ]; then - if cp "$key_in" "$key_out"; then + if mv "$key_in" "$key_out"; then : # ok else # Attempt restore @@ -2158,7 +2158,7 @@ Cannot renew this certificate because a conflicting file exists. # only move the req if we have it if [ -e "$req_in" ]; then - if cp "$req_in" "$req_out"; then + if mv "$req_in" "$req_out"; then : # ok else # Attempt restore @@ -4156,6 +4156,9 @@ case "$cmd" in renewable) renewable "$@" ;; + rewind-renew) + rewind_renew "$@" + ;; import-req) import_req "$@" ;; @@ -4207,9 +4210,6 @@ case "$cmd" in show-renew) status renew "$@" ;; - rewind-renew) - rewind_renew "$@" - ;; upgrade) up23_manage_upgrade_23 "$@" ;;