Skip to content

Commit 8209ca3

Browse files
committed
Add reference tests with 1.3 ClientHello
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
1 parent 1b6af67 commit 8209ca3

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tests/suites/test_suite_ssl.data

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,6 +3462,19 @@ tls13_srv_max_early_data_size:TEST_EARLY_DATA_HRR:97:0
34623462
# 0002 - length of named_curve_list / named_group_list
34633463
# 0017 - secp256r1 aka NIST P-256
34643464
# ...
3465+
# 002b - supported version (for TLS 1.3)
3466+
# 0003 - extension length
3467+
# 02 - length of versions
3468+
# 0304 - TLS 1.3 ("SSL 3.4")
3469+
# ...
3470+
# 000d - signature algorithms
3471+
# 0004 - extension length
3472+
# 0002 - SignatureSchemeList length
3473+
# 0403 - ecdsa_secp256r1_sha256
3474+
# ...
3475+
# 0033 - key share
3476+
# 0002 - extension length
3477+
# 0000 - length of client_shares (empty is valid)
34653478
#
34663479
# Note: currently our TLS "1.3 or 1.2" code requires extension length to be
34673480
# present even it it's 0. This is not strictly compliant but doesn't matter
@@ -3474,9 +3487,17 @@ tls13_srv_max_early_data_size:TEST_EARLY_DATA_HRR:97:0
34743487
# supported_groups extension is present, see
34753488
# https://github.com/Mbed-TLS/mbedtls/issues/7458
34763489
#
3490+
# For TLS 1.3 with ephemeral key exchange, mandatory extensions are:
3491+
# - supported versions (as for all of TLS 1.3)
3492+
# - supported groups
3493+
# - key share
3494+
# - signature algorithms
3495+
# (see ssl_tls13_client_hello_has_exts_for_ephemeral_key_exchange()).
3496+
#
34773497
# Note: cccc is currently not assigned, so can be used get a consistent
34783498
# "no matching ciphersuite" behaviour regardless of the configuration.
34793499
# c02b is MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (1.2)
3500+
# 1301 is MBEDTLS_TLS1_3_AES_128_GCM_SHA256 (1.3)
34803501

34813502
# See "ClientHello breakdown" above
34823503
# MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 with secp256r1
@@ -3485,6 +3506,19 @@ depends_on:MBEDTLS_SSL_PROTO_TLS1_2:MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED:MBE
34853506
inject_client_content_on_the_wire:MBEDTLS_PK_ECDSA:MBEDTLS_SSL_CLIENT_HELLO:"16030300370100003303030123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef000002c02b01000008000a000400020017":"<= parse client hello":0
34863507

34873508
# See "ClientHello breakdown" above
3509+
# Same as the above test with s/c02b/cccc/ as the ciphersuite
34883510
Inject ClientHello - TLS 1.2 unknown ciphersuite (for reference)
34893511
depends_on:MBEDTLS_SSL_PROTO_TLS1_2:MBEDTLS_RSA_C
34903512
inject_client_content_on_the_wire:MBEDTLS_PK_RSA:MBEDTLS_SSL_CLIENT_HELLO:"160303002f0100002b03030123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef000002cccc01000000":"got no ciphersuites in common":MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE
3513+
3514+
# See "ClientHello breakdown" above
3515+
# ephemeral with secp256r1 + MBEDTLS_TLS1_3_AES_128_GCM_SHA256
3516+
Inject ClientHello - TLS 1.3 good (for reference)
3517+
depends_on:MBEDTLS_SSL_PROTO_TLS1_3:MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED:MBEDTLS_SSL_HAVE_AES:MBEDTLS_MD_CAN_SHA256:MBEDTLS_SSL_HAVE_GCM:MBEDTLS_ECP_HAVE_SECP256R1
3518+
inject_client_content_on_the_wire:MBEDTLS_PK_ECDSA:MBEDTLS_SSL_CLIENT_HELLO:"160303004c0100004803030123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef00000213010100001d000a000400020017002b0003020304000d000400020403003300020000":"key exchange mode\: ephemeral":0
3519+
3520+
# See "ClientHello breakdown" above
3521+
# Same as the above test with s/1301/cccc/ as the ciphersuite
3522+
Inject ClientHello - TLS 1.3 unknown ciphersuite (for reference)
3523+
depends_on:MBEDTLS_SSL_PROTO_TLS1_3:MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED:MBEDTLS_SSL_HAVE_AES:MBEDTLS_MD_CAN_SHA256:MBEDTLS_SSL_HAVE_GCM:MBEDTLS_ECP_HAVE_SECP256R1
3524+
inject_client_content_on_the_wire:MBEDTLS_PK_ECDSA:MBEDTLS_SSL_CLIENT_HELLO:"160303004c0100004803030123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef000002cccc0100001d000a000400020017002b0003020304000d000400020403003300020000":"No matched ciphersuite":MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE

0 commit comments

Comments
 (0)