Skip to content

Commit

Permalink
Fix cmd case to catch unknown commands in No-CA mode
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Jul 20, 2021
1 parent 8445068 commit 030906c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions easytls
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ VERBATUM_COPYRIGHT_HEADER_INCLUDE_NEGOTIABLE
# Set the Easy-TLS version
easytls_version ()
{
easytls_verbose
print "Easy-TLS version: ${EASYTLS_VERSION}"
easytls_verbose
} # => easytls_version ()


Expand Down Expand Up @@ -7035,7 +7037,7 @@ main ()
[ $$ -eq ${EASYTLS_lock_PID} ] || \
die "PID mismatch: $$ ${EASYTLS_lock_PID}"
else
# Easy-TLS us not initialised
# Easy-TLS is not initialised
:
fi

Expand Down Expand Up @@ -7108,9 +7110,9 @@ main ()
die "Error: easytls_config"
cmd='Done'
;;
esac
esac # Edit config
;;
esac
esac # Init required has been checked

# Commands which can run with or without a PKI
case "${cmd}" in
Expand Down Expand Up @@ -7211,7 +7213,7 @@ main ()
die "Error: disabled_list_manager rehash"
cmd='Done'
;;
esac
esac # With or without a PKI

# When no-ca is true use these versions of commands
if [ $EASYTLS_NO_CA ]
Expand All @@ -7235,10 +7237,6 @@ main ()
die "Error: noca_status"
cmd='Done'
;;
*)
error_msg "Command '${cmd}' does not support 'no-ca' mode"
cmd='Done'
;;
esac
fi

Expand Down Expand Up @@ -7278,7 +7276,7 @@ main ()
# save me!
save_wiscii_hash || die "Master hash save failed"
;;
esac # help/versiom/Initialise
esac # help/version/Initialise

} # => main ()

Expand Down

0 comments on commit 030906c

Please sign in to comment.