Move test of mbedtls_camellia_free() to separate test

The acceptance of NULL should be tested regardless of the
setting of MBEDTLS_CHECK_PARAMS.
This commit is contained in:
Hanno Becker 2018-12-17 14:20:05 +00:00
parent af4b83bb2a
commit f1931760d8
2 changed files with 11 additions and 2 deletions

View file

@ -1,4 +1,7 @@
Camellia parameter validation
Camellia - Valid parameters
camellia_valid_param:
Camellia - Invalid parameters
camellia_invalid_param:
Camellia-128-ECB Encrypt RFC3713 #1

View file

@ -7,6 +7,13 @@
* END_DEPENDENCIES
*/
/* BEGIN_CASE */
void camellia_valid_param( )
{
TEST_VALID_PARAM( mbedtls_camellia_free( NULL ) );
}
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_CHECK_PARAMS:!MBEDTLS_PARAM_FAILED_ALT */
void camellia_invalid_param( )
{
@ -19,7 +26,6 @@ void camellia_invalid_param( )
((void) off);
TEST_INVALID_PARAM( mbedtls_camellia_init( NULL ) );
TEST_VALID_PARAM( mbedtls_camellia_free( NULL ) );
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA,
mbedtls_camellia_setkey_enc( NULL,