From 90abb224f7f38a061813a81dc98d5de202d69808 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Thu, 8 Feb 2024 09:02:49 +0100 Subject: [PATCH] ssl-opt.sh: Establish TLS 1.3 then TLS 1.2 session Add a test where first we establish a TLS 1.3 session, then a TLS 1.2 one with the same server. Signed-off-by: Ronald Cron --- tests/ssl-opt.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index be4c6f70a7..028a0f4617 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -11712,6 +11712,18 @@ run_test "Establish TLS 1.2 then TLS 1.3 session" \ -s "Protocol is TLSv1.2" \ -s "Protocol is TLSv1.3" \ +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 +requires_config_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED +requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_CERT +run_test "Establish TLS 1.3 then TLS 1.2 session" \ + "$P_SRV" \ + "( $P_CLI force_version=tls13; \ + $P_CLI force_version=tls12 )" \ + 0 \ + -s "Protocol is TLSv1.3" \ + -s "Protocol is TLSv1.2" \ + requires_openssl_tls1_3_with_compatible_ephemeral requires_config_enabled MBEDTLS_DEBUG_C requires_config_enabled MBEDTLS_SSL_CLI_C