Test that xxx_free() functions accept NULL parameter
This commit is contained in:
parent
236ea16c01
commit
a994b2379f
3 changed files with 3 additions and 0 deletions
|
@ -94,6 +94,7 @@ void chacha20_bad_params()
|
|||
mbedtls_chacha20_context ctx;
|
||||
|
||||
TEST_INVALID_PARAM( mbedtls_chacha20_init( NULL ) );
|
||||
TEST_VALID_PARAM( mbedtls_chacha20_free( NULL ) );
|
||||
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA,
|
||||
mbedtls_chacha20_setkey( NULL, key ) );
|
||||
|
|
|
@ -139,6 +139,7 @@ void chachapoly_bad_params()
|
|||
memset( mac, 0x00, sizeof( mac ) );
|
||||
|
||||
TEST_INVALID_PARAM( mbedtls_chachapoly_init( NULL ) );
|
||||
TEST_VALID_PARAM( mbedtls_chachapoly_free( NULL ) );
|
||||
|
||||
/* setkey */
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA,
|
||||
|
|
|
@ -98,6 +98,7 @@ void poly1305_bad_params()
|
|||
mbedtls_poly1305_context ctx;
|
||||
|
||||
TEST_INVALID_PARAM( mbedtls_poly1305_init( NULL ) );
|
||||
TEST_VALID_PARAM( mbedtls_poly1305_free( NULL ) );
|
||||
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA,
|
||||
mbedtls_poly1305_starts( NULL, key ) );
|
||||
|
|
Loading…
Reference in a new issue