Skip to content

Commit 625c8fd

Browse files
ssl-opt: Added 4 and 128 bytes tests to HS defragmentation for server initiated reneg
Signed-off-by: Minos Galanakis <[email protected]>
1 parent dfc082e commit 625c8fd

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

tests/ssl-opt.sh

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13819,6 +13819,15 @@ run_test "Handshake defragmentation on server: len=4, client-initiated server
1381913819
-s "Consume: waiting for more handshake fragments 4/" \
1382013820

1382113821
# Test server-initiated renegotiation with fragmented handshake on TLS1.2
13822+
13823+
# Note: The /reneg endpoint serves as a directive for OpenSSL's s_server
13824+
# to initiate a handshake renegotiation.
13825+
# Note: Adjusting the renegotiation delay beyond the library's default
13826+
# value of 16 is necessary. This parameter defines the maximum
13827+
# number of records received before renegotiation is completed.
13828+
# By fragmenting records and thereby increasing their quantity,
13829+
# the default threshold can be reached more quickly.
13830+
# Setting it to -1 disables that policy's enforment.
1382213831
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
1382313832
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
1382413833
run_test "Handshake defragmentation on client: len=512, server-initiated renegotiation" \
@@ -13832,15 +13841,6 @@ run_test "Handshake defragmentation on client: len=512, server-initiated rene
1383213841
-c "found renegotiation extension" \
1383313842
-c "=> renegotiate"
1383413843

13835-
13836-
# Note: The /reneg endpoint serves as a directive for OpenSSL's s_server
13837-
# to initiate a handshake renegotiation.
13838-
# Note: Adjusting the renegotiation delay beyond the library's default
13839-
# value of 16 is necessary. This parameter defines the maximum
13840-
# number of records received before renegotiation is completed.
13841-
# By fragmenting records and thereby increasing their quantity,
13842-
# the default threshold can be reached more quickly.
13843-
# Setting it to -1 disables that policy's enforment.
1384413844
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
1384513845
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
1384613846
run_test "Handshake defragmentation on client: len=256, server-initiated renegotiation" \
@@ -13854,6 +13854,32 @@ run_test "Handshake defragmentation on client: len=256, server-initiated rene
1385413854
-c "found renegotiation extension" \
1385513855
-c "=> renegotiate"
1385613856

13857+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
13858+
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
13859+
run_test "Handshake defragmentation on client: len=128, server-initiated renegotiation" \
13860+
"$O_NEXT_SRV -tls1_2 -split_send_frag 128 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
13861+
"$P_CLI debug_level=3 renegotiation=1 renego_delay=-1 request_page=/reneg" \
13862+
0 \
13863+
-c "initial handshake fragment: 128, 0\\.\\.128 of [0-9]\\+" \
13864+
-c "Prepare: waiting for more handshake fragments 128/" \
13865+
-c "Consume: waiting for more handshake fragments 128/" \
13866+
-c "client hello, adding renegotiation extension" \
13867+
-c "found renegotiation extension" \
13868+
-c "=> renegotiate"
13869+
13870+
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
13871+
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
13872+
run_test "Handshake defragmentation on client: len=4, server-initiated renegotiation" \
13873+
"$O_NEXT_SRV -tls1_2 -split_send_frag 4 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \
13874+
"$P_CLI debug_level=3 renegotiation=1 renego_delay=-1 request_page=/reneg" \
13875+
0 \
13876+
-c "initial handshake fragment: 4, 0\\.\\.4 of [0-9]\\+" \
13877+
-c "Prepare: waiting for more handshake fragments 4/" \
13878+
-c "Consume: waiting for more handshake fragments 4/" \
13879+
-c "client hello, adding renegotiation extension" \
13880+
-c "found renegotiation extension" \
13881+
-c "=> renegotiate"
13882+
1385713883
# Test heap memory usage after handshake
1385813884
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
1385913885
requires_config_enabled MBEDTLS_MEMORY_DEBUG

0 commit comments

Comments
 (0)