From f2e1f47b2ebdbe41e4b254b07a6209588e7f1328 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 6 Apr 2022 22:23:45 +0200 Subject: [PATCH] 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 --- tests/ssl-opt.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index c7b02c232..ac99d9240 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -818,8 +818,9 @@ is_gnutls() { # disabled on the client or on the server. # # Inputs: -# * $1: 'required' or 1 if client authentication is expected, -# 'none' or 0 or absent if not. +# * $1: the value of the server auth_mode parameter. +# 'required' if client authentication is expected, +# 'none' or absent if not. # * $CONFIGS_ENABLED # # Outputs: @@ -830,8 +831,8 @@ set_maybe_calc_verify() { *\ MBEDTLS_SSL_EXTENDED_MASTER_SECRET\ *) :;; *) case ${1-} in - ''|0|none) return;; - 1|required) :;; + ''|none) return;; + required) :;; *) echo "Bad parameter 1 to set_maybe_calc_verify: $1"; exit 1;; esac esac