mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 22:35:43 +01:00
Add variable buffer length tests to all.sh
Exercise the feature alone, with record splitting and DTLS connection ID. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com> Signed-off-by: Darryl Green <darryl.green@arm.com>
This commit is contained in:
parent
b33cc7688e
commit
aad82f9bbb
@ -1142,6 +1142,58 @@ component_test_no_max_fragment_length_small_ssl_out_content_len () {
|
|||||||
if_build_succeeded tests/ssl-opt.sh -f "Max fragment length\|Large buffer"
|
if_build_succeeded tests/ssl-opt.sh -f "Max fragment length\|Large buffer"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component_test_variable_ssl_in_out_buffer_len () {
|
||||||
|
msg "build: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled (ASan build)"
|
||||||
|
scripts/config.py set MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
|
||||||
|
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||||
|
make
|
||||||
|
|
||||||
|
msg "test: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled"
|
||||||
|
make test
|
||||||
|
|
||||||
|
msg "test: ssl-opt.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled"
|
||||||
|
if_build_succeeded tests/ssl-opt.sh
|
||||||
|
|
||||||
|
msg "test: compat.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled"
|
||||||
|
if_build_succeeded tests/compat.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
component_test_variable_ssl_in_out_buffer_len_CID () {
|
||||||
|
msg "build: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_DTLS_CONNECTION_ID enabled (ASan build)"
|
||||||
|
scripts/config.py set MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
|
||||||
|
scripts/config.py set MBEDTLS_SSL_DTLS_CONNECTION_ID
|
||||||
|
|
||||||
|
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||||
|
make
|
||||||
|
|
||||||
|
msg "test: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_DTLS_CONNECTION_ID"
|
||||||
|
make test
|
||||||
|
|
||||||
|
msg "test: ssl-opt.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_DTLS_CONNECTION_ID enabled"
|
||||||
|
if_build_succeeded tests/ssl-opt.sh
|
||||||
|
|
||||||
|
msg "test: compat.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_DTLS_CONNECTION_ID enabled"
|
||||||
|
if_build_succeeded tests/compat.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
component_test_variable_ssl_in_out_buffer_len_record_splitting () {
|
||||||
|
msg "build: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_CBC_RECORD_SPLITTING enabled (ASan build)"
|
||||||
|
scripts/config.py set MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
|
||||||
|
scripts/config.py set MBEDTLS_SSL_CBC_RECORD_SPLITTING
|
||||||
|
|
||||||
|
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||||
|
make
|
||||||
|
|
||||||
|
msg "test: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_CBC_RECORD_SPLITTING"
|
||||||
|
make test
|
||||||
|
|
||||||
|
msg "test: ssl-opt.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_CBC_RECORD_SPLITTING enabled"
|
||||||
|
if_build_succeeded tests/ssl-opt.sh
|
||||||
|
|
||||||
|
msg "test: compat.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH and MBEDTLS_SSL_CBC_RECORD_SPLITTING enabled"
|
||||||
|
if_build_succeeded tests/compat.sh
|
||||||
|
}
|
||||||
|
|
||||||
component_test_when_no_ciphersuites_have_mac () {
|
component_test_when_no_ciphersuites_have_mac () {
|
||||||
msg "build: when no ciphersuites have MAC"
|
msg "build: when no ciphersuites have MAC"
|
||||||
scripts/config.py unset MBEDTLS_CIPHER_NULL_CIPHER
|
scripts/config.py unset MBEDTLS_CIPHER_NULL_CIPHER
|
||||||
|
@ -3746,7 +3746,7 @@ void handshake_serialization( )
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:!MBEDTLS_USE_PSA_CRYPTO:MBEDTLS_PKCS1_V15:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_DEBUG_C:MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
|
/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:!MBEDTLS_USE_PSA_CRYPTO:MBEDTLS_PKCS1_V15:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_DEBUG_C:MBEDTLS_SSL_MAX_FRAGMENT_LENGTH:MBEDTLS_CIPHER_MODE_CBC */
|
||||||
void handshake_fragmentation( int mfl, int expected_srv_hs_fragmentation, int expected_cli_hs_fragmentation)
|
void handshake_fragmentation( int mfl, int expected_srv_hs_fragmentation, int expected_cli_hs_fragmentation)
|
||||||
{
|
{
|
||||||
handshake_test_options options;
|
handshake_test_options options;
|
||||||
@ -3759,6 +3759,8 @@ void handshake_fragmentation( int mfl, int expected_srv_hs_fragmentation, int ex
|
|||||||
init_handshake_options( &options );
|
init_handshake_options( &options );
|
||||||
options.dtls = 1;
|
options.dtls = 1;
|
||||||
options.mfl = mfl;
|
options.mfl = mfl;
|
||||||
|
/* Set cipher to one using CBC so that record splitting can be tested */
|
||||||
|
options.cipher = "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256";
|
||||||
options.srv_auth_mode = MBEDTLS_SSL_VERIFY_REQUIRED;
|
options.srv_auth_mode = MBEDTLS_SSL_VERIFY_REQUIRED;
|
||||||
options.srv_log_obj = &srv_pattern;
|
options.srv_log_obj = &srv_pattern;
|
||||||
options.cli_log_obj = &cli_pattern;
|
options.cli_log_obj = &cli_pattern;
|
||||||
|
Loading…
Reference in New Issue
Block a user