Add missing not setting nonce tests
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
3ecdb3e308
commit
bdc2c68d97
1 changed files with 30 additions and 0 deletions
|
@ -4402,6 +4402,36 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
|
||||||
|
|
||||||
psa_aead_abort( &operation );
|
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. */
|
/* Test for double setting nonce. */
|
||||||
|
|
||||||
operation = psa_aead_operation_init( );
|
operation = psa_aead_operation_init( );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue