Move testing of mbedtls_aria_free() to separate test

The test that mbedtls_aria_free() accepts NULL parameters
can be performed even if MBEDTLS_CHECK_PARAMS is unset, but
was previously included in the test case aria_invalid_params()
which is only executed if MBEDTLS_CHECK_PARAMS is set.
This commit is contained in:
Hanno Becker 2018-12-17 14:13:36 +00:00
parent fac1d44d62
commit 14b91e8e22
2 changed files with 11 additions and 2 deletions

View file

@ -1,4 +1,7 @@
Parameter validation
ARIA - Valid parameters
aria_valid_param:
ARIA - Invalid parameters
aria_invalid_param:
ARIA-128-ECB Encrypt - RFC 5794

View file

@ -16,6 +16,13 @@
* END_DEPENDENCIES
*/
/* BEGIN_CASE */
void aria_valid_param( )
{
TEST_VALID_PARAM( mbedtls_aria_free( NULL ) );
}
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_CHECK_PARAMS:!MBEDTLS_PARAM_FAILED_ALT */
void aria_invalid_param( )
{
@ -27,7 +34,6 @@ void aria_invalid_param( )
size_t iv_off = 0;
TEST_INVALID_PARAM( mbedtls_aria_init( NULL ) );
TEST_VALID_PARAM( mbedtls_aria_free( NULL ) );
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_ARIA_BAD_INPUT_DATA,
mbedtls_aria_setkey_enc( NULL, key,