mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-31 01:21:09 +02:00
ssl-opt: Added fragmented HS tests for client-initiated renegotiation.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
@@ -103,12 +103,14 @@ if [ -n "${OPENSSL_NEXT:-}" ]; then
|
||||
O_NEXT_SRV_NO_CERT="$OPENSSL_NEXT s_server -www "
|
||||
O_NEXT_CLI="echo 'GET / HTTP/1.0' | $OPENSSL_NEXT s_client -CAfile $DATA_FILES_PATH/test-ca_cat12.crt"
|
||||
O_NEXT_CLI_NO_CERT="echo 'GET / HTTP/1.0' | $OPENSSL_NEXT s_client"
|
||||
O_NEXT_CLI_RENEGOTIATE="echo 'R' | $OPENSSL_NEXT s_client"
|
||||
else
|
||||
O_NEXT_SRV=false
|
||||
O_NEXT_SRV_NO_CERT=false
|
||||
O_NEXT_SRV_EARLY_DATA=false
|
||||
O_NEXT_CLI_NO_CERT=false
|
||||
O_NEXT_CLI=false
|
||||
O_NEXT_CLI_RENEGOTIATE=false
|
||||
fi
|
||||
|
||||
if [ -n "${GNUTLS_NEXT_SERV:-}" ]; then
|
||||
@@ -13737,6 +13739,43 @@ run_test "Handshake defragmentation on server with buffer resizing: len=256,
|
||||
-s "Prepare: waiting for more handshake fragments 256/[0-9]\\+" \
|
||||
-s "Consume: waiting for more handshake fragments 256/[0-9]\\+"
|
||||
|
||||
# Test Client initiated renegotiation with fragmented handshake on TLS1.2
|
||||
requires_openssl_3_x
|
||||
requires_protocol_version tls12
|
||||
requires_certificate_authentication
|
||||
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
|
||||
run_test "Handshake defragmentation with client-initiated renegotiation: len=256" \
|
||||
"$P_SRV debug_level=4 exchanges=2 renegotiation=1 auth_mode=required" \
|
||||
"$O_NEXT_CLI_RENEGOTIATE -tls1_2 -split_send_frag 256 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key -connect 127.0.0.1:+$SRV_PORT" \
|
||||
0 \
|
||||
-s "received TLS_EMPTY_RENEGOTIATION_INFO" \
|
||||
-s "found renegotiation extension" \
|
||||
-s "server hello, secure renegotiation extension" \
|
||||
-s "=> renegotiate" \
|
||||
-S "write hello request" \
|
||||
-s "reassembled record" \
|
||||
-s "initial handshake fragment: 256, 0..256 of [0-9]\\+" \
|
||||
-s "Prepare: waiting for more handshake fragments 256/[0-9]\\+" \
|
||||
-s "Consume: waiting for more handshake fragments 256/[0-9]\\+" \
|
||||
|
||||
requires_openssl_3_x
|
||||
requires_protocol_version tls12
|
||||
requires_certificate_authentication
|
||||
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
|
||||
run_test "Handshake defragmentation with client-initiated renegotiation: len=512" \
|
||||
"$P_SRV debug_level=4 exchanges=2 renegotiation=1 auth_mode=required" \
|
||||
"$O_NEXT_CLI_RENEGOTIATE -tls1_2 -split_send_frag 512 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key -connect 127.0.0.1:+$SRV_PORT" \
|
||||
0 \
|
||||
-s "received TLS_EMPTY_RENEGOTIATION_INFO" \
|
||||
-s "found renegotiation extension" \
|
||||
-s "server hello, secure renegotiation extension" \
|
||||
-s "=> renegotiate" \
|
||||
-S "write hello request" \
|
||||
-s "reassembled record" \
|
||||
-s "initial handshake fragment: 512, 0..512 of [0-9]\\+" \
|
||||
-s "Prepare: waiting for more handshake fragments 512/[0-9]\\+" \
|
||||
-s "Consume: waiting for more handshake fragments 512/[0-9]\\+" \
|
||||
|
||||
# Test heap memory usage after handshake
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
|
||||
requires_config_enabled MBEDTLS_MEMORY_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user