From 08ec129dd89f0ea11fbf4e82b815ec59c0bc0775 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 29 May 2019 12:44:28 +0100 Subject: [PATCH] Use US spelling 'serialize' instead of UK spelling 'serialise' --- tests/suites/test_suite_ssl.data | 14 ++++---- tests/suites/test_suite_ssl.function | 52 ++++++++++++++-------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/suites/test_suite_ssl.data b/tests/suites/test_suite_ssl.data index 819162943..edb87d888 100644 --- a/tests/suites/test_suite_ssl.data +++ b/tests/suites/test_suite_ssl.data @@ -59,16 +59,16 @@ SSL SET_HOSTNAME memory leak: call ssl_set_hostname twice ssl_set_hostname_twice:"server0":"server1" SSL session serialization: Wrong major version -ssl_session_serialise_version_check:1:0:0:0 +ssl_session_serialize_version_check:1:0:0:0 -SSL session serialisation: Wrong minor version -ssl_session_serialise_version_check:0:1:0:0 +SSL session serialization: Wrong minor version +ssl_session_serialize_version_check:0:1:0:0 -SSL session serialisation: Wrong patch version -ssl_session_serialise_version_check:0:0:1:0 +SSL session serialization: Wrong patch version +ssl_session_serialize_version_check:0:0:1:0 -SSL session serialisation: Wrong config -ssl_session_serialise_version_check:0:0:0:1 +SSL session serialization: Wrong config +ssl_session_serialize_version_check:0:0:0:1 Record crypt, AES-128-CBC, 1.2, SHA-384 depends_on:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_AES_C:MBEDTLS_SSL_PROTO_TLS1_2:MBEDTLS_SHA512_C diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 64a534c33..bc371ac8f 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -852,52 +852,52 @@ exit: } /* END_CASE */ -/* BEGIN_CASE depends_on */ -void ssl_session_serialise_version_check( int corrupt_major, +/* BEGIN_CASE */ +void ssl_session_serialize_version_check( int corrupt_major, int corrupt_minor, int corrupt_patch, int corrupt_config ) { - unsigned char serialised_session[ 2048 ]; - size_t serialised_session_len; + unsigned char serialized_session[ 2048 ]; + size_t serialized_session_len; mbedtls_ssl_session session; mbedtls_ssl_session_init( &session ); - /* Infer length of serialised session. */ + /* Infer length of serialized session. */ TEST_ASSERT( mbedtls_ssl_session_save( &session, - serialised_session, - sizeof( serialised_session ), - &serialised_session_len ) == 0 ); + serialized_session, + sizeof( serialized_session ), + &serialized_session_len ) == 0 ); - mbedtls_ssl_session_free( &session ); + mbedtls_ssl_session_free( &session ); - /* Without any modification, we should be able to successfully - * de-serialise the session - double-check that. */ + /* Without any modification, we should be able to successfully + * de-serialize the session - double-check that. */ TEST_ASSERT( mbedtls_ssl_session_load( &session, - serialised_session, - serialised_session_len ) == 0 ); + serialized_session, + serialized_session_len ) == 0 ); mbedtls_ssl_session_free( &session ); - if( corrupt_major ) - serialised_session[0] ^= (uint8_t) 0x1; + if( corrupt_major ) + serialized_session[0] ^= (uint8_t) 0x1; - if( corrupt_minor ) - serialised_session[1] ^= (uint8_t) 0x1; + if( corrupt_minor ) + serialized_session[1] ^= (uint8_t) 0x1; - if( corrupt_patch ) - serialised_session[2] ^= (uint8_t) 0x1; + if( corrupt_patch ) + serialized_session[2] ^= (uint8_t) 0x1; - if( corrupt_config ) + if( corrupt_config ) { - serialised_session[3] ^= (uint8_t) 0x1; - serialised_session[4] ^= (uint8_t) 0x1; - serialised_session[5] ^= (uint8_t) 0x1; + serialized_session[3] ^= (uint8_t) 0x1; + serialized_session[4] ^= (uint8_t) 0x1; + serialized_session[5] ^= (uint8_t) 0x1; } - TEST_ASSERT( mbedtls_ssl_session_load( &session, - serialised_session, - serialised_session_len ) == + TEST_ASSERT( mbedtls_ssl_session_load( &session, + serialized_session, + serialized_session_len ) == MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); } /* END_CASE */