From 3c985f6b70f0b50fcc7eb7219bde11c08eb6d44f Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 8 Apr 2022 19:29:27 +0200 Subject: [PATCH] Move ticket, alpn detection into maybe_requires_ciphersuite_enabled No intended behavior change. Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index da8317476..910f6848a 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -288,6 +288,15 @@ detect_required_features() { esac;; esac + case " $1 " in + *[-_\ =]tickets=[^0]*) + requires_config_enabled MBEDTLS_SSL_TICKET_C;; + esac + case " $1 " in + *[-_\ =]alpn=*) + requires_config_enabled MBEDTLS_SSL_ALPN;; + esac + unset tmp } @@ -1173,16 +1182,6 @@ run_test() { requires_config_enabled MBEDTLS_SSL_PROTO_DTLS fi - # Check more TLS protocol features. - case "$SRV_CMD $CLI_CMD" in - *[-_\ =]tickets=[^0]*) - requires_config_enabled MBEDTLS_SSL_TICKET_C;; - esac - case "$SRV_CMD $CLI_CMD" in - *[-_\ =]alpn=*) - requires_config_enabled MBEDTLS_SSL_ALPN;; - esac - # If the client or server requires certain features that can be detected # from their command-line arguments, check that they're enabled. detect_required_features "$SRV_CMD" "$@"