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 <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2024-04-26 21:28:49 +02:00
parent f1415b65d0
commit 1bc28fe34b

View File

@ -443,9 +443,9 @@ detect_required_features() {
esac esac
case "$CMD_LINE" in case "$CMD_LINE" in
*server5*|\ */server5*|\
*server7*|\ */server7*|\
*dir-maxpath*) */dir-maxpath*)
if [ "$TLS_VERSION" = "TLS13" ]; then if [ "$TLS_VERSION" = "TLS13" ]; then
# In case of TLS13 the support for ECDSA is enough # In case of TLS13 the support for ECDSA is enough
requires_pk_alg "ECDSA" requires_pk_alg "ECDSA"
@ -477,8 +477,8 @@ detect_required_features() {
esac esac
case "$CMD_LINE" in case "$CMD_LINE" in
*server2*|\ */server2*|\
*server7*) */server7*)
# server2 and server7 certificates use RSA encryption # server2 and server7 certificates use RSA encryption
requires_config_enabled "MBEDTLS_RSA_C" requires_config_enabled "MBEDTLS_RSA_C"
esac esac