Properly test for the existance of a client certificate

This commit is contained in:
Nick Chambers 2021-07-05 18:46:18 -05:00 committed by Nick Chambers
parent cc5bcaf4c7
commit d02f5d27ca
1 changed files with 2 additions and 2 deletions

4
rowbot
View File

@ -26,7 +26,7 @@ die() {
# This is a wrapper around printf so the format string isn't known ahead of
# time.
# shellcheck disable=SC2059
printf "$fmt\n" "$@" >&2
printf "FATAL: $fmt\n" "$@" >&2
exit "${STATUS:-42}"
}
@ -280,7 +280,7 @@ on_first_002_net() {
# This is a false positive
# shellcheck disable=SC2102
if [[ -v config[client-cert] ]]; then
if [[ ${config[client-cert]} ]]; then
if [[ ! -f ${config[client-cert]} ]]; then
die "client certificate not found: %s" "${config[client-cert]}"
fi