From a4251f477564383f65fb63897039d23bad0b8a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 12 Dec 2018 12:04:51 +0100 Subject: [PATCH] Test aes_free( NULL ) unconditionally --- tests/suites/test_suite_aes.function | 8 +++++--- tests/suites/test_suite_aes.rest.data | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function index f61f71c3e9..1832f2db40 100644 --- a/tests/suites/test_suite_aes.function +++ b/tests/suites/test_suite_aes.function @@ -394,13 +394,15 @@ void aes_invalid_param( ) TEST_INVALID_PARAM_RET( MBEDTLS_ERR_AES_BAD_INPUT_DATA, mbedtls_aes_setkey_dec( &dummy_ctx, NULL, 128 ) ); +} +/* END_CASE */ +/* BEGIN_CASE */ +void aes_valid_param( ) +{ /* These calls accept NULL */ TEST_VALID_PARAM( mbedtls_aes_free( NULL ) ); TEST_VALID_PARAM( mbedtls_aes_xts_free( NULL ) ); - -exit: - return; } /* END_CASE */ diff --git a/tests/suites/test_suite_aes.rest.data b/tests/suites/test_suite_aes.rest.data index 14b78a6059..a5d843de43 100644 --- a/tests/suites/test_suite_aes.rest.data +++ b/tests/suites/test_suite_aes.rest.data @@ -13,6 +13,9 @@ aes_decrypt_cbc:"000000000000000000000000000000000000000000000000000000000000000 AES - Invalid parameters aes_invalid_param: +AES - Valid parameters +aes_valid_param: + AES Selftest depends_on:MBEDTLS_SELF_TEST aes_selftest: