Skip to content

Commit c35fa9f

Browse files
ssl-opt: Added coverage for hs defragmentation TLS 1.2 tests.
Signed-off-by: Minos Galanakis <[email protected]>
1 parent 3b2c33f commit c35fa9f

File tree

1 file changed

+144
-5
lines changed

1 file changed

+144
-5
lines changed

tests/ssl-opt.sh

Lines changed: 144 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14055,7 +14055,7 @@ run_test "Handshake defragmentation on client: len=32, TLS 1.2" \
1405514055
requires_openssl_3_x
1405614056
requires_protocol_version tls13
1405714057
requires_certificate_authentication
14058-
run_test "Handshake defragmentation on client: len=14, TLS 1.3" \
14058+
run_test "Handshake defragmentation on client: len=16, TLS 1.3" \
1405914059
"$O_NEXT_SRV -tls1_3 -split_send_frag 16 " \
1406014060
"$P_CLI debug_level=4 " \
1406114061
0 \
@@ -14067,7 +14067,7 @@ requires_openssl_3_x
1406714067
requires_protocol_version tls12
1406814068
requires_certificate_authentication
1406914069
requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
14070-
run_test "Handshake defragmentation on client: len=14, TLS 1.2" \
14070+
run_test "Handshake defragmentation on client: len=16, TLS 1.2" \
1407114071
"$O_NEXT_SRV -tls1_2 -split_send_frag 16 " \
1407214072
"$P_CLI debug_level=4 " \
1407314073
0 \
@@ -14086,6 +14086,17 @@ run_test "Handshake defragmentation on client: len=13, TLS 1.3" \
1408614086
-c "handshake fragment: 0 \\.\\. 13 of [0-9]\\+ msglen 13" \
1408714087
-c "waiting for more fragments (13"
1408814088

14089+
requires_openssl_3_x
14090+
requires_protocol_version tls12
14091+
requires_certificate_authentication
14092+
run_test "Handshake defragmentation on client: len=13, TLS 1.2" \
14093+
"$O_NEXT_SRV -tls1_2 -split_send_frag 13 " \
14094+
"$P_CLI debug_level=4 " \
14095+
0 \
14096+
-c "reassembled record" \
14097+
-c "handshake fragment: 0 \\.\\. 13 of [0-9]\\+ msglen 13" \
14098+
-c "waiting for more fragments (13"
14099+
1408914100
requires_openssl_3_x
1409014101
requires_protocol_version tls13
1409114102
requires_certificate_authentication
@@ -14097,6 +14108,39 @@ run_test "Handshake defragmentation on client: len=5, TLS 1.3" \
1409714108
-c "handshake fragment: 0 \\.\\. 5 of [0-9]\\+ msglen 5" \
1409814109
-c "waiting for more fragments (5"
1409914110

14111+
requires_openssl_3_x
14112+
requires_protocol_version tls12
14113+
requires_certificate_authentication
14114+
run_test "Handshake defragmentation on client: len=5, TLS 1.2" \
14115+
"$O_NEXT_SRV -tls1_2 -split_send_frag 5 " \
14116+
"$P_CLI debug_level=4 " \
14117+
0 \
14118+
-c "reassembled record" \
14119+
-c "handshake fragment: 0 \\.\\. 5 of [0-9]\\+ msglen 5" \
14120+
-c "waiting for more fragments (5"
14121+
14122+
requires_openssl_3_x
14123+
requires_protocol_version tls13
14124+
requires_certificate_authentication
14125+
run_test "Handshake defragmentation on client: len=4, TLS 1.3" \
14126+
"$O_NEXT_SRV -tls1_3 -split_send_frag 4 " \
14127+
"$P_CLI debug_level=4 " \
14128+
0 \
14129+
-c "reassembled record" \
14130+
-c "handshake fragment: 0 \\.\\. 4 of [0-9]\\+ msglen 4" \
14131+
-c "waiting for more fragments (4"
14132+
14133+
requires_openssl_3_x
14134+
requires_protocol_version tls12
14135+
requires_certificate_authentication
14136+
run_test "Handshake defragmentation on client: len=4, TLS 1.2" \
14137+
"$O_NEXT_SRV -tls1_2 -split_send_frag 4 " \
14138+
"$P_CLI debug_level=4 " \
14139+
0 \
14140+
-c "reassembled record" \
14141+
-c "handshake fragment: 0 \\.\\. 4 of [0-9]\\+ msglen 4" \
14142+
-c "waiting for more fragments (4"
14143+
1410014144
requires_openssl_3_x
1410114145
requires_protocol_version tls13
1410214146
requires_certificate_authentication
@@ -14183,6 +14227,17 @@ run_test "Handshake defragmentation on server: len=256, TLS 1.3" \
1418314227
-s "handshake fragment: 0 \\.\\. 256 of [0-9]\\+ msglen 256" \
1418414228
-s "waiting for more fragments (256"
1418514229

14230+
requires_openssl_3_x
14231+
requires_protocol_version tls12
14232+
requires_certificate_authentication
14233+
run_test "Handshake defragmentation on server: len=256, TLS 1.2" \
14234+
"$P_SRV debug_level=4 auth_mode=required" \
14235+
"$O_NEXT_CLI -tls1_2 -split_send_frag 256 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14236+
0 \
14237+
-s "reassembled record" \
14238+
-s "handshake fragment: 0 \\.\\. 256 of [0-9]\\+ msglen 256" \
14239+
-s "waiting for more fragments (256"
14240+
1418614241
requires_openssl_3_x
1418714242
requires_protocol_version tls13
1418814243
requires_certificate_authentication
@@ -14194,6 +14249,20 @@ run_test "Handshake defragmentation on server: len=128, TLS 1.3" \
1419414249
-s "handshake fragment: 0 \\.\\. 128 of [0-9]\\+ msglen 128" \
1419514250
-s "waiting for more fragments (128"
1419614251

14252+
# Server-side ClientHello degfragmentation is only supported for MBEDTLS_SSL_PROTO_TLS1_3. For TLS 1.2 testing
14253+
# the server should suport both protocols and downgrade to client-requested TL1.2 after proccessing the ClientHello.
14254+
requires_openssl_3_x
14255+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14256+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14257+
requires_certificate_authentication
14258+
run_test "Handshake defragmentation on server: len=128, TLS 1.2" \
14259+
"$P_SRV debug_level=4 auth_mode=required" \
14260+
"$O_NEXT_CLI -tls1_2 -split_send_frag 128 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14261+
0 \
14262+
-s "reassembled record" \
14263+
-s "handshake fragment: 0 \\.\\. 128 of [0-9]\\+ msglen 128" \
14264+
-s "waiting for more fragments (128"
14265+
1419714266
requires_openssl_3_x
1419814267
requires_protocol_version tls13
1419914268
requires_certificate_authentication
@@ -14205,6 +14274,18 @@ run_test "Handshake defragmentation on server: len=64, TLS 1.3" \
1420514274
-s "handshake fragment: 0 \\.\\. 64 of [0-9]\\+ msglen 64" \
1420614275
-s "waiting for more fragments (64"
1420714276

14277+
requires_openssl_3_x
14278+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14279+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14280+
requires_certificate_authentication
14281+
run_test "Handshake defragmentation on server: len=64, TLS 1.2" \
14282+
"$P_SRV debug_level=4 auth_mode=required" \
14283+
"$O_NEXT_CLI -tls1_2 -split_send_frag 64 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14284+
0 \
14285+
-s "reassembled record" \
14286+
-s "handshake fragment: 0 \\.\\. 64 of [0-9]\\+ msglen 64" \
14287+
-s "waiting for more fragments (64"
14288+
1420814289
requires_openssl_3_x
1420914290
requires_protocol_version tls13
1421014291
requires_certificate_authentication
@@ -14216,6 +14297,18 @@ run_test "Handshake defragmentation on server: len=36, TLS 1.3" \
1421614297
-s "handshake fragment: 0 \\.\\. 36 of [0-9]\\+ msglen 36" \
1421714298
-s "waiting for more fragments (36"
1421814299

14300+
requires_openssl_3_x
14301+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14302+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14303+
requires_certificate_authentication
14304+
run_test "Handshake defragmentation on server: len=36, TLS 1.2" \
14305+
"$P_SRV debug_level=4 auth_mode=required" \
14306+
"$O_NEXT_CLI -tls1_2 -split_send_frag 36 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14307+
0 \
14308+
-s "reassembled record" \
14309+
-s "handshake fragment: 0 \\.\\. 36 of [0-9]\\+ msglen 36" \
14310+
-s "waiting for more fragments (36"
14311+
1421914312
requires_openssl_3_x
1422014313
requires_protocol_version tls13
1422114314
requires_certificate_authentication
@@ -14227,6 +14320,18 @@ run_test "Handshake defragmentation on server: len=32, TLS 1.3" \
1422714320
-s "handshake fragment: 0 \\.\\. 32 of [0-9]\\+ msglen 32" \
1422814321
-s "waiting for more fragments (32"
1422914322

14323+
requires_openssl_3_x
14324+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14325+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14326+
requires_certificate_authentication
14327+
run_test "Handshake defragmentation on server: len=32, TLS 1.2" \
14328+
"$P_SRV debug_level=4 auth_mode=required" \
14329+
"$O_NEXT_CLI -tls1_2 -split_send_frag 32 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14330+
0 \
14331+
-s "reassembled record" \
14332+
-s "handshake fragment: 0 \\.\\. 32 of [0-9]\\+ msglen 32" \
14333+
-s "waiting for more fragments (32"
14334+
1423014335
requires_openssl_3_x
1423114336
requires_protocol_version tls13
1423214337
requires_certificate_authentication
@@ -14238,6 +14343,18 @@ run_test "Handshake defragmentation on server: len=16, TLS 1.3" \
1423814343
-s "handshake fragment: 0 \\.\\. 16 of [0-9]\\+ msglen 16" \
1423914344
-s "waiting for more fragments (16"
1424014345

14346+
requires_openssl_3_x
14347+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14348+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14349+
requires_certificate_authentication
14350+
run_test "Handshake defragmentation on server: len=16, TLS 1.2" \
14351+
"$P_SRV debug_level=4 auth_mode=required" \
14352+
"$O_NEXT_CLI -tls1_2 -split_send_frag 16 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14353+
0 \
14354+
-s "reassembled record" \
14355+
-s "handshake fragment: 0 \\.\\. 16 of [0-9]\\+ msglen 16" \
14356+
-s "waiting for more fragments (16"
14357+
1424114358
requires_openssl_3_x
1424214359
requires_protocol_version tls13
1424314360
requires_certificate_authentication
@@ -14249,6 +14366,18 @@ run_test "Handshake defragmentation on server: len=13, TLS 1.3" \
1424914366
-s "handshake fragment: 0 \\.\\. 13 of [0-9]\\+ msglen 13" \
1425014367
-s "waiting for more fragments (13"
1425114368

14369+
requires_openssl_3_x
14370+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14371+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14372+
requires_certificate_authentication
14373+
run_test "Handshake defragmentation on server: len=13, TLS 1.2" \
14374+
"$P_SRV debug_level=4 auth_mode=required" \
14375+
"$O_NEXT_CLI -tls1_2 -split_send_frag 13 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14376+
0 \
14377+
-s "reassembled record" \
14378+
-s "handshake fragment: 0 \\.\\. 13 of [0-9]\\+ msglen 13" \
14379+
-s "waiting for more fragments (13"
14380+
1425214381
requires_openssl_3_x
1425314382
requires_protocol_version tls13
1425414383
requires_certificate_authentication
@@ -14260,6 +14389,18 @@ run_test "Handshake defragmentation on server: len=5, TLS 1.3" \
1426014389
-s "handshake fragment: 0 \\.\\. 5 of [0-9]\\+ msglen 5" \
1426114390
-s "waiting for more fragments (5"
1426214391

14392+
requires_openssl_3_x
14393+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
14394+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
14395+
requires_certificate_authentication
14396+
run_test "Handshake defragmentation on server: len=5, TLS 1.2" \
14397+
"$P_SRV debug_level=4 auth_mode=required" \
14398+
"$O_NEXT_CLI -tls1_2 -split_send_frag 5 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
14399+
0 \
14400+
-s "reassembled record" \
14401+
-s "handshake fragment: 0 \\.\\. 5 of [0-9]\\+ msglen 5" \
14402+
-s "waiting for more fragments (5"
14403+
1426314404
requires_openssl_3_x
1426414405
requires_protocol_version tls13
1426514406
requires_certificate_authentication
@@ -14294,8 +14435,6 @@ run_test "Handshake defragmentation on server: len=3, TLS 1.3" \
1429414435
-s "handshake message too short: 3" \
1429514436
-s "SSL - An invalid SSL record was received"
1429614437

14297-
# Server-side ClientHello degfragmentation is only supported for MBEDTLS_SSL_PROTO_TLS1_3. For TLS 1.2 testing
14298-
# the server should suport both protocols and downgrade to client-requested TL1.2 after proccessing the ClientHello.
1429914438
requires_openssl_3_x
1430014439
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
1430114440
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
@@ -14312,7 +14451,7 @@ requires_openssl_3_x
1431214451
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
1431314452
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
1431414453
requires_certificate_authentication
14315-
run_test "Handshake defragmentation on server: len=32, TLS 1.2" \
14454+
run_test "Handshake defragmentation on server: len=32, TLS 1.2 -> 1.2" \
1431614455
"$P_SRV debug_level=4 force_version=tls12 auth_mode=required" \
1431714456
"$O_NEXT_CLI -tls1_2 -split_send_frag 32 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
1431814457
1 \

0 commit comments

Comments
 (0)