From f4c32cb6a440a5813e9aba319e9f97d1e8c48505 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 0376018f5d..abbf46512a 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -475,7 +475,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 d8457396e8883f6be0ee21c766b167a33a708c84 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 abbf46512a..2f2505854c 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -11614,7 +11614,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" @@ -11630,7 +11630,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