set_maybe_calc_verify: $1 is intended to be auth_mode

Document that this is what it is. Don't allow made-up numerical values.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2022-04-06 22:23:45 +02:00
parent 1438e1620a
commit c8d242f625

View File

@ -891,8 +891,9 @@ is_gnutls() {
# disabled on the client or on the server. # disabled on the client or on the server.
# #
# Inputs: # Inputs:
# * $1: 'required' or 1 if client authentication is expected, # * $1: the value of the server auth_mode parameter.
# 'none' or 0 or absent if not. # 'required' if client authentication is expected,
# 'none' or absent if not.
# * $CONFIGS_ENABLED # * $CONFIGS_ENABLED
# #
# Outputs: # Outputs:
@ -903,8 +904,8 @@ set_maybe_calc_verify() {
*\ MBEDTLS_SSL_EXTENDED_MASTER_SECRET\ *) :;; *\ MBEDTLS_SSL_EXTENDED_MASTER_SECRET\ *) :;;
*) *)
case ${1-} in case ${1-} in
''|0|none) return;; ''|none) return;;
1|required) :;; required) :;;
*) echo "Bad parameter 1 to set_maybe_calc_verify: $1"; exit 1;; *) echo "Bad parameter 1 to set_maybe_calc_verify: $1"; exit 1;;
esac esac
esac esac