mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-26 21:39:56 +00:00
Add missing not setting nonce tests
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
3ecdb3e308
commit
bdc2c68d97
@ -4402,6 +4402,36 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
|
||||
|
||||
psa_aead_abort( &operation );
|
||||
|
||||
/* ------------------------------------------------------- */
|
||||
|
||||
operation = psa_aead_operation_init( );
|
||||
|
||||
PSA_ASSERT( psa_aead_encrypt_setup( &operation, key, alg ) );
|
||||
|
||||
TEST_EQUAL( psa_aead_finish( &operation, final_data,
|
||||
finish_output_size,
|
||||
&output_part_length,
|
||||
tag_buffer, tag_length,
|
||||
&tag_size ),
|
||||
PSA_ERROR_BAD_STATE );
|
||||
|
||||
psa_aead_abort( &operation );
|
||||
|
||||
/* ------------------------------------------------------- */
|
||||
|
||||
operation = psa_aead_operation_init( );
|
||||
|
||||
PSA_ASSERT( psa_aead_decrypt_setup( &operation, key, alg ) );
|
||||
|
||||
TEST_EQUAL( psa_aead_verify( &operation, final_data,
|
||||
finish_output_size,
|
||||
&output_part_length,
|
||||
tag_buffer,
|
||||
tag_length ),
|
||||
PSA_ERROR_BAD_STATE );
|
||||
|
||||
psa_aead_abort( &operation );
|
||||
|
||||
/* Test for double setting nonce. */
|
||||
|
||||
operation = psa_aead_operation_init( );
|
||||
|
Loading…
x
Reference in New Issue
Block a user