From 1bc28fe34bf5941c164bb038ef33f98e043beaa1 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 26 Apr 2024 21:28:49 +0200 Subject: [PATCH] Fix skipped tests in configurations without RSA Tighten the matching when detecting which certificates are in use to determine algorithm requirements. This fixes a bug whereby all tests were skipped in configurations without RSA except for an Mbed TLS client against a GnuTLS or OpenSSL server, due to *server2* matching ssl_server2. Fixes #8366. Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 3549a7b941..8e32a698f4 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -443,9 +443,9 @@ detect_required_features() { esac case "$CMD_LINE" in - *server5*|\ - *server7*|\ - *dir-maxpath*) + */server5*|\ + */server7*|\ + */dir-maxpath*) if [ "$TLS_VERSION" = "TLS13" ]; then # In case of TLS13 the support for ECDSA is enough requires_pk_alg "ECDSA" @@ -477,8 +477,8 @@ detect_required_features() { esac case "$CMD_LINE" in - *server2*|\ - *server7*) + */server2*|\ + */server7*) # server2 and server7 certificates use RSA encryption requires_config_enabled "MBEDTLS_RSA_C" esac