From 9aa16215d820295f14405e54a2b9de0458c4a526 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 20 Feb 2025 17:12:15 +0100 Subject: [PATCH 1/2] Fix MBEDTLS_SSL_TICKET_C autodependency not triggering with some shells On platforms whose `/bin/sh` does not treat `[^...]` as a negated character set in glob patterns, such as Ubuntu 24.04, the automatic detection of a configuration requirement on `MBEDTLS_SSL_TICKET_C` did not trigger, leading to test cases being executed and failing in configurations where they should have been skipped. Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 23b692c723..89099aedf5 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -460,7 +460,7 @@ detect_required_features() { esac case " $CMD_LINE " in - *[-_\ =]tickets=[^0]*) + *[-_\ =]tickets=[!0]*) requires_config_enabled MBEDTLS_SSL_TICKET_C;; esac case " $CMD_LINE " in From b60d6e46d87992afb86f4f0fce30103aa5b4ebfb Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 20 Feb 2025 17:16:30 +0100 Subject: [PATCH 2/2] Change correct code that came up as a false positive in checkbashisms Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 89099aedf5..823a77d681 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -11045,7 +11045,7 @@ run_test "DTLS-SRTP all profiles supported. server doesn't support mki." \ -c "selected srtp profile" \ -c "DTLS-SRTP key material is"\ -c "DTLS-SRTP no mki value negotiated"\ - -g "find_in_both '^ *Keying material: [0-9A-F]*$'"\ + -g "find_in_both '^ *Keying material: [0-9A-F]*\$'"\ -c "dumping 'sending mki' (8 bytes)" \ -C "dumping 'received mki' (8 bytes)" \ -C "error" @@ -11061,7 +11061,7 @@ run_test "DTLS-SRTP all profiles supported. openssl client." \ -s "selected srtp profile" \ -s "server hello, adding use_srtp extension" \ -s "DTLS-SRTP key material is"\ - -g "find_in_both '^ *Keying material: [0-9A-F]*$'"\ + -g "find_in_both '^ *Keying material: [0-9A-F]*\$'"\ -c "SRTP Extension negotiated, profile=SRTP_AES128_CM_SHA1_80" requires_config_enabled MBEDTLS_SSL_DTLS_SRTP