Skip to content

Commit

Permalink
Tools: shellcheck adjustments
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Mar 30, 2024
1 parent 4125617 commit 72a2b95
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dev/easyrsa-tools.lib
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ Missing request file:
# get the serial number of the certificate
cert_serial=
ssl_cert_serial "$crt_in" cert_serial || \
die "$cmd: Failed to get cert serial number!"
die "renew: Failed to get cert serial number!"

# Duplicate cert by serial file
dup_dir="$EASYRSA_PKI/certs_by_serial"
Expand Down Expand Up @@ -1036,12 +1036,12 @@ This certificate cannot be renewed due to inconsistent Subject."

# Prohibit --copy-ext - renew only supports SAN extention
if [ "$EASYRSA_CP_EXT" ]; then
user_error "Command '$cmd' does not support --copy-ext"
user_error "Command 'renew' does not support --copy-ext"
fi

# Prohibit --san - renew uses SAN from old cert only
if [ "$EASYRSA_SAN" ]; then
user_error "Command '$cmd' does not support --san"
user_error "Command 'renew' does not support --san"
fi

# Set confirm DN and serial
Expand Down Expand Up @@ -1111,6 +1111,7 @@ $confirm_details"
# move renewed files
# so we can reissue certificate with the same name
renew_move
# shellcheck disable=SC2034 # error_undo_renew_move appears unused
error_undo_renew_move=1

# renew certificate
Expand Down Expand Up @@ -1289,7 +1290,7 @@ Request was expected at:

# get the serial number of the certificate
ssl_cert_serial "$crt_in" cert_serial || \
die "$cmd: Failed to get cert serial number!"
die "revoke_renewed: Failed to get cert serial number!"

# Duplicate cert by serial file
dup_dir="$EASYRSA_PKI/certs_by_serial"
Expand Down

0 comments on commit 72a2b95

Please sign in to comment.