Document AES functions and fix free() functions

This commit is contained in:
Manuel Pégourié-Gonnard 2018-12-10 16:56:14 +01:00
parent 0e9cddbf1a
commit 44c5d58d05
4 changed files with 50 additions and 12 deletions

View file

@ -379,6 +379,8 @@ void aes_invalid_param( )
TEST_INVALID_PARAM( mbedtls_aes_init( NULL ) );
TEST_INVALID_PARAM( mbedtls_aes_xts_init( NULL ) );
/* mbedtls_aes_setkey_enc() */
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
mbedtls_aes_setkey_enc( NULL, key, 128 ) );
@ -393,6 +395,10 @@ void aes_invalid_param( )
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
mbedtls_aes_setkey_dec( &dummy_ctx, NULL, 128 ) );
/* These calls accept NULL */
TEST_VALID_PARAM( mbedtls_aes_free( NULL ) );
TEST_VALID_PARAM( mbedtls_aes_xts_free( NULL ) );
exit:
return;
}