2022-11-07 07:03:44 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# tls13-misc.sh
|
|
|
|
#
|
|
|
|
# Copyright The Mbed TLS Contributors
|
2023-11-02 20:47:20 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2022-11-07 07:03:44 +01:00
|
|
|
#
|
|
|
|
|
2022-11-08 14:49:47 +01:00
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
|
|
|
|
requires_config_enabled MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
|
|
|
|
requires_config_enabled MBEDTLS_SSL_SRV_C
|
|
|
|
requires_config_enabled MBEDTLS_DEBUG_C
|
|
|
|
requires_config_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
|
|
|
|
|
|
|
run_test "TLS 1.3: PSK: No valid ciphersuite. G->m" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=all debug_level=5 $(get_srv_psk_list)" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-CIPHER-ALL:+AES-256-GCM:+AEAD:+SHA384:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK:+VERS-TLS1.3 \
|
|
|
|
--pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \
|
|
|
|
localhost" \
|
|
|
|
1 \
|
|
|
|
-s "found psk key exchange modes extension" \
|
|
|
|
-s "found pre_shared_key extension" \
|
|
|
|
-s "Found PSK_EPHEMERAL KEX MODE" \
|
|
|
|
-s "Found PSK KEX MODE" \
|
|
|
|
-s "No matched ciphersuite"
|
|
|
|
|
|
|
|
requires_openssl_tls1_3
|
|
|
|
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
|
|
|
|
requires_config_enabled MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
|
|
|
|
requires_config_enabled MBEDTLS_SSL_SRV_C
|
|
|
|
requires_config_enabled MBEDTLS_DEBUG_C
|
|
|
|
requires_config_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
|
|
|
|
|
|
|
run_test "TLS 1.3: PSK: No valid ciphersuite. O->m" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=all debug_level=5 $(get_srv_psk_list)" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$O_NEXT_CLI -tls1_3 -msg -allow_no_dhe_kex -ciphersuites TLS_AES_256_GCM_SHA384\
|
|
|
|
-psk_identity Client_identity -psk 6162636465666768696a6b6c6d6e6f70" \
|
|
|
|
1 \
|
|
|
|
-s "found psk key exchange modes extension" \
|
|
|
|
-s "found pre_shared_key extension" \
|
|
|
|
-s "Found PSK_EPHEMERAL KEX MODE" \
|
|
|
|
-s "Found PSK KEX MODE" \
|
|
|
|
-s "No matched ciphersuite"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Multiple PSKs: valid ticket, reconnect with ticket" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=psk_ephemeral debug_level=5 psk_identity=Client_identity psk=6162636465666768696a6b6c6d6e6f70 tickets=8" \
|
|
|
|
"$P_CLI tls13_kex_modes=psk_ephemeral debug_level=5 psk_identity=Client_identity psk=6162636465666768696a6b6c6d6e6f70 reco_mode=1 reconnect=1" \
|
2022-11-08 14:49:47 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 2" \
|
|
|
|
-s "sent selected_identity: 0" \
|
|
|
|
-s "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "key exchange mode: ephemeral$" \
|
|
|
|
-S "ticket is not authentic"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Multiple PSKs: invalid ticket, reconnect with PSK" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=psk_ephemeral debug_level=5 psk_identity=Client_identity psk=6162636465666768696a6b6c6d6e6f70 tickets=8 dummy_ticket=1" \
|
|
|
|
"$P_CLI tls13_kex_modes=psk_ephemeral debug_level=5 psk_identity=Client_identity psk=6162636465666768696a6b6c6d6e6f70 reco_mode=1 reconnect=1" \
|
2022-11-08 14:49:47 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 2" \
|
|
|
|
-s "sent selected_identity: 1" \
|
|
|
|
-s "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "key exchange mode: ephemeral$" \
|
|
|
|
-s "ticket is not authentic"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Session resumption failure, ticket authentication failed." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key tickets=8 dummy_ticket=1" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$P_CLI debug_level=4 reco_mode=1 reconnect=1" \
|
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-s "ticket is not authentic" \
|
|
|
|
-S "ticket is expired" \
|
2023-11-20 02:55:24 +01:00
|
|
|
-S "Invalid ticket creation time" \
|
2022-11-08 14:49:47 +01:00
|
|
|
-S "Ticket age exceeds limitation" \
|
|
|
|
-S "Ticket age outside tolerance window"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Session resumption failure, ticket expired." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key tickets=8 dummy_ticket=2" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$P_CLI debug_level=4 reco_mode=1 reconnect=1" \
|
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "ticket is not authentic" \
|
|
|
|
-s "ticket is expired" \
|
2023-11-20 02:55:24 +01:00
|
|
|
-S "Invalid ticket creation time" \
|
2022-11-08 14:49:47 +01:00
|
|
|
-S "Ticket age exceeds limitation" \
|
|
|
|
-S "Ticket age outside tolerance window"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Session resumption failure, invalid start time." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key tickets=8 dummy_ticket=3" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$P_CLI debug_level=4 reco_mode=1 reconnect=1" \
|
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "ticket is not authentic" \
|
|
|
|
-S "ticket is expired" \
|
2023-11-20 02:55:24 +01:00
|
|
|
-s "Invalid ticket creation time" \
|
2022-11-08 14:49:47 +01:00
|
|
|
-S "Ticket age exceeds limitation" \
|
|
|
|
-S "Ticket age outside tolerance window"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Session resumption failure, ticket expired. too old" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key tickets=8 dummy_ticket=4" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$P_CLI debug_level=4 reco_mode=1 reconnect=1" \
|
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "ticket is not authentic" \
|
|
|
|
-S "ticket is expired" \
|
2023-11-20 02:55:24 +01:00
|
|
|
-S "Invalid ticket creation time" \
|
2022-11-08 14:49:47 +01:00
|
|
|
-s "Ticket age exceeds limitation" \
|
|
|
|
-S "Ticket age outside tolerance window"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Session resumption failure, age outside tolerance window, too young." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key tickets=8 dummy_ticket=5" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$P_CLI debug_level=4 reco_mode=1 reconnect=1" \
|
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "ticket is not authentic" \
|
|
|
|
-S "ticket is expired" \
|
2023-11-20 02:55:24 +01:00
|
|
|
-S "Invalid ticket creation time" \
|
2022-11-08 14:49:47 +01:00
|
|
|
-S "Ticket age exceeds limitation" \
|
|
|
|
-s "Ticket age outside tolerance window"
|
|
|
|
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SESSION_TICKETS MBEDTLS_SSL_SRV_C \
|
2022-12-15 13:46:23 +01:00
|
|
|
MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-11-08 14:49:47 +01:00
|
|
|
run_test "TLS 1.3 m->m: Session resumption failure, age outside tolerance window, too old." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key tickets=8 dummy_ticket=6" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$P_CLI debug_level=4 reco_mode=1 reconnect=1" \
|
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "ticket is not authentic" \
|
|
|
|
-S "ticket is expired" \
|
2023-11-20 02:55:24 +01:00
|
|
|
-S "Invalid ticket creation time" \
|
2022-11-08 14:49:47 +01:00
|
|
|
-S "Ticket age exceeds limitation" \
|
|
|
|
-s "Ticket age outside tolerance window"
|
|
|
|
|
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE MBEDTLS_SSL_SRV_C MBEDTLS_DEBUG_C
|
|
|
|
requires_config_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
|
|
|
run_test "TLS 1.3: G->m: ephemeral_all/psk, fail, no common kex mode" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=psk debug_level=5 $(get_srv_psk_list)" \
|
2022-11-08 14:49:47 +01:00
|
|
|
"$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:-PSK:+VERS-TLS1.3 \
|
|
|
|
--pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \
|
|
|
|
localhost" \
|
|
|
|
1 \
|
|
|
|
-s "found psk key exchange modes extension" \
|
|
|
|
-s "found pre_shared_key extension" \
|
|
|
|
-s "Found PSK_EPHEMERAL KEX MODE" \
|
|
|
|
-S "Found PSK KEX MODE" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: ephemeral"
|
|
|
|
|
2022-11-07 07:03:44 +01:00
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SRV_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
|
|
|
requires_all_configs_disabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
|
|
|
|
run_test "TLS 1.3: G->m: PSK: configured psk only, good." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=all debug_level=5 $(get_srv_psk_list)" \
|
2022-11-07 07:03:44 +01:00
|
|
|
"$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK:+VERS-TLS1.3:+GROUP-ALL \
|
|
|
|
--pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \
|
|
|
|
localhost" \
|
|
|
|
0 \
|
|
|
|
-s "found psk key exchange modes extension" \
|
|
|
|
-s "found pre_shared_key extension" \
|
|
|
|
-s "Found PSK_EPHEMERAL KEX MODE" \
|
|
|
|
-s "Found PSK KEX MODE" \
|
|
|
|
-s "key exchange mode: psk$"
|
|
|
|
|
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SRV_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
|
|
|
requires_all_configs_disabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
|
|
|
|
run_test "TLS 1.3: G->m: PSK: configured psk_ephemeral only, good." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=all debug_level=5 $(get_srv_psk_list)" \
|
2022-11-07 07:03:44 +01:00
|
|
|
"$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK:+VERS-TLS1.3:+GROUP-ALL \
|
|
|
|
--pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \
|
|
|
|
localhost" \
|
|
|
|
0 \
|
|
|
|
-s "found psk key exchange modes extension" \
|
|
|
|
-s "found pre_shared_key extension" \
|
|
|
|
-s "Found PSK_EPHEMERAL KEX MODE" \
|
|
|
|
-s "Found PSK KEX MODE" \
|
|
|
|
-s "key exchange mode: psk_ephemeral$"
|
|
|
|
|
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_PROTO_TLS1_3 MBEDTLS_SSL_SRV_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
|
|
|
|
requires_all_configs_disabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
|
|
|
run_test "TLS 1.3: G->m: PSK: configured ephemeral only, good." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV tls13_kex_modes=all debug_level=5 $(get_srv_psk_list)" \
|
2022-11-07 07:03:44 +01:00
|
|
|
"$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK:+VERS-TLS1.3:+GROUP-ALL \
|
|
|
|
--pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \
|
|
|
|
localhost" \
|
|
|
|
0 \
|
|
|
|
-s "key exchange mode: ephemeral$"
|
|
|
|
|
2022-11-16 04:23:46 +01:00
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_config_enabled MBEDTLS_DEBUG_C
|
|
|
|
requires_config_enabled MBEDTLS_SSL_CLI_C
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_EARLY_DATA
|
2022-11-16 09:51:01 +01:00
|
|
|
requires_any_configs_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-11-16 04:23:46 +01:00
|
|
|
run_test "TLS 1.3 m->G: EarlyData: basic check, good" \
|
2023-11-21 04:13:31 +01:00
|
|
|
"$G_NEXT_SRV -d 10 --priority=NORMAL:-VERS-ALL:+VERS-TLS1.3:+CIPHER-ALL:+ECDHE-PSK:+PSK \
|
|
|
|
--earlydata --maxearlydata 16384 --disable-client-cert" \
|
2023-12-08 11:42:08 +01:00
|
|
|
"$P_CLI debug_level=4 early_data=$EARLY_DATA_INPUT reco_mode=1 reconnect=1 reco_delay=900" \
|
2022-12-16 09:32:02 +01:00
|
|
|
0 \
|
2023-11-21 04:13:31 +01:00
|
|
|
-c "received max_early_data_size: 16384" \
|
2022-11-16 04:23:46 +01:00
|
|
|
-c "Reconnecting with saved session" \
|
|
|
|
-c "NewSessionTicket: early_data(42) extension received." \
|
|
|
|
-c "ClientHello: early_data(42) extension exists." \
|
|
|
|
-c "EncryptedExtensions: early_data(42) extension received." \
|
2022-10-27 12:21:05 +02:00
|
|
|
-c "EncryptedExtensions: early_data(42) extension exists." \
|
2022-12-19 07:40:47 +01:00
|
|
|
-c "<= write EndOfEarlyData" \
|
2022-11-16 04:23:46 +01:00
|
|
|
-s "Parsing extension 'Early Data/42' (0 bytes)" \
|
|
|
|
-s "Sending extension Early Data/42 (0 bytes)" \
|
2022-12-15 16:13:04 +01:00
|
|
|
-s "END OF EARLY DATA (5) was received." \
|
2022-11-16 04:23:46 +01:00
|
|
|
-s "early data accepted"
|
|
|
|
|
|
|
|
requires_gnutls_tls1_3
|
|
|
|
requires_config_enabled MBEDTLS_DEBUG_C
|
|
|
|
requires_config_enabled MBEDTLS_SSL_CLI_C
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_EARLY_DATA
|
2022-11-16 09:51:01 +01:00
|
|
|
requires_any_configs_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-11-17 10:23:32 +01:00
|
|
|
run_test "TLS 1.3 m->G: EarlyData: no early_data in NewSessionTicket, good" \
|
2022-11-16 04:23:46 +01:00
|
|
|
"$G_NEXT_SRV -d 10 --priority=NORMAL:-VERS-ALL:+VERS-TLS1.3:+CIPHER-ALL:+ECDHE-PSK:+PSK --disable-client-cert" \
|
2023-12-08 11:42:08 +01:00
|
|
|
"$P_CLI debug_level=4 early_data=$EARLY_DATA_INPUT reco_mode=1 reconnect=1" \
|
2022-11-16 04:23:46 +01:00
|
|
|
0 \
|
|
|
|
-c "Reconnecting with saved session" \
|
|
|
|
-C "NewSessionTicket: early_data(42) extension received." \
|
|
|
|
-c "ClientHello: early_data(42) extension does not exist." \
|
|
|
|
-C "EncryptedExtensions: early_data(42) extension received." \
|
2022-10-27 12:21:05 +02:00
|
|
|
-C "EncryptedExtensions: early_data(42) extension exists."
|
2022-11-16 04:23:46 +01:00
|
|
|
|
2022-11-16 09:51:01 +01:00
|
|
|
#TODO: OpenSSL tests don't work now. It might be openssl options issue, cause GnuTLS has worked.
|
2022-11-16 04:23:46 +01:00
|
|
|
skip_next_test
|
2022-11-16 09:51:01 +01:00
|
|
|
requires_openssl_tls1_3
|
|
|
|
requires_config_enabled MBEDTLS_DEBUG_C
|
2022-11-16 04:23:46 +01:00
|
|
|
requires_config_enabled MBEDTLS_SSL_CLI_C
|
2022-11-16 09:51:01 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_EARLY_DATA
|
|
|
|
requires_any_configs_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-11-16 04:23:46 +01:00
|
|
|
run_test "TLS 1.3, ext PSK, early data" \
|
|
|
|
"$O_NEXT_SRV_EARLY_DATA -msg -debug -tls1_3 -psk_identity 0a0b0c -psk 010203 -allow_no_dhe_kex -nocert" \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_CLI debug_level=5 tls13_kex_modes=psk early_data=1 psk=010203 psk_identity=0a0b0c" \
|
2022-11-16 04:23:46 +01:00
|
|
|
1 \
|
|
|
|
-c "Reconnecting with saved session" \
|
|
|
|
-c "NewSessionTicket: early_data(42) extension received." \
|
|
|
|
-c "ClientHello: early_data(42) extension exists." \
|
|
|
|
-c "EncryptedExtensions: early_data(42) extension received." \
|
|
|
|
-c "EncryptedExtensions: early_data(42) extension ( ignored )."
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk/none." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=7" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=psk_or_ephemeral reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-s "No suitable key exchange mode" \
|
|
|
|
-s "No matched PSK or ticket"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk/psk." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=8" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=psk_or_ephemeral reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
|
|
|
-s "found matched identity"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk/psk_ephemeral." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=9" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=psk_or_ephemeral reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-s "No suitable key exchange mode" \
|
|
|
|
-s "No matched PSK or ticket"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk/psk_all." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=10" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=psk_or_ephemeral reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
|
|
|
-s "found matched identity"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_ephemeral/none." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=7" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=ephemeral_all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-s "No suitable key exchange mode" \
|
|
|
|
-s "No matched PSK or ticket"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_ephemeral/psk." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=8" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=ephemeral_all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-s "No suitable key exchange mode" \
|
|
|
|
-s "No matched PSK or ticket"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_ephemeral/psk_ephemeral." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=9" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=ephemeral_all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
2023-01-17 05:14:58 +01:00
|
|
|
-s "found matched identity" \
|
|
|
|
-s "key exchange mode: psk_ephemeral"
|
2022-12-12 03:43:55 +01:00
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_ephemeral/psk_all." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=10" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=ephemeral_all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
2023-01-17 05:14:58 +01:00
|
|
|
-s "found matched identity" \
|
|
|
|
-s "key exchange mode: psk_ephemeral"
|
2022-12-12 03:43:55 +01:00
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_all/none." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=7" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "sent selected_identity:" \
|
|
|
|
-s "key exchange mode: ephemeral" \
|
|
|
|
-S "key exchange mode: psk_ephemeral" \
|
|
|
|
-S "key exchange mode: psk$" \
|
|
|
|
-s "No suitable key exchange mode" \
|
|
|
|
-s "No matched PSK or ticket"
|
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_all/psk." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=8" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
|
|
|
-s "found matched identity"
|
2022-12-09 07:27:08 +01:00
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_all/psk_ephemeral." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=9" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
2023-01-17 05:14:58 +01:00
|
|
|
-s "found matched identity" \
|
|
|
|
-s "key exchange mode: psk_ephemeral"
|
2022-12-12 03:43:55 +01:00
|
|
|
|
2023-01-16 06:44:10 +01:00
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_SESSION_TICKETS \
|
2023-01-12 09:18:08 +01:00
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_SSL_CLI_C MBEDTLS_DEBUG_C \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2022-12-12 03:43:55 +01:00
|
|
|
run_test "TLS 1.3 m->m: Resumption with ticket flags, psk_all/psk_all." \
|
2023-03-14 08:59:56 +01:00
|
|
|
"$P_SRV debug_level=4 crt_file=data_files/server5.crt key_file=data_files/server5.key dummy_ticket=10" \
|
2023-01-16 06:44:10 +01:00
|
|
|
"$P_CLI debug_level=4 tls13_kex_modes=all reconnect=1" \
|
2022-12-12 03:43:55 +01:00
|
|
|
0 \
|
|
|
|
-c "Pre-configured PSK number = 1" \
|
|
|
|
-S "No suitable key exchange mode" \
|
2023-01-17 05:14:58 +01:00
|
|
|
-s "found matched identity" \
|
|
|
|
-s "key exchange mode: psk_ephemeral"
|
2022-12-09 07:27:08 +01:00
|
|
|
|
2023-02-08 08:09:32 +01:00
|
|
|
EARLY_DATA_INPUT_LEN_BLOCKS=$(( ( $( cat $EARLY_DATA_INPUT | wc -c ) + 31 ) / 32 ))
|
|
|
|
EARLY_DATA_INPUT_LEN=$(( $EARLY_DATA_INPUT_LEN_BLOCKS * 32 ))
|
|
|
|
|
|
|
|
requires_gnutls_next
|
|
|
|
requires_all_configs_enabled MBEDTLS_SSL_EARLY_DATA MBEDTLS_SSL_SESSION_TICKETS \
|
|
|
|
MBEDTLS_SSL_SRV_C MBEDTLS_DEBUG_C MBEDTLS_HAVE_TIME \
|
2023-10-31 08:13:54 +01:00
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
|
2023-02-08 08:09:32 +01:00
|
|
|
requires_any_configs_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
|
|
|
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
2023-02-08 08:38:19 +01:00
|
|
|
run_test "TLS 1.3 G->m: EarlyData: feature is enabled, good." \
|
2023-10-31 08:13:54 +01:00
|
|
|
"$P_SRV force_version=tls13 debug_level=4 max_early_data_size=$EARLY_DATA_INPUT_LEN" \
|
|
|
|
"$G_NEXT_CLI localhost --priority=NORMAL:-VERS-ALL:+VERS-TLS1.3:+GROUP-ALL:+KX-ALL \
|
|
|
|
-d 10 -r --earlydata $EARLY_DATA_INPUT " \
|
2023-02-08 08:38:19 +01:00
|
|
|
0 \
|
2023-11-15 05:46:58 +01:00
|
|
|
-s "NewSessionTicket: early_data(42) extension exists." \
|
|
|
|
-s "Sent max_early_data_size=$EARLY_DATA_INPUT_LEN" \
|
2023-02-08 08:09:32 +01:00
|
|
|
-s "ClientHello: early_data(42) extension exists." \
|
|
|
|
-s "EncryptedExtensions: early_data(42) extension exists." \
|
2023-02-08 08:38:19 +01:00
|
|
|
-s "$( tail -1 $EARLY_DATA_INPUT )"
|