mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 02:14:15 +01:00
psa: mac: Add driver dispatch tests for psa_mac_verify
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
4ed836883e
commit
54488c4abc
@ -1238,7 +1238,27 @@ void mac_verify( int key_type_arg,
|
||||
|
||||
mbedtls_test_driver_mac_hooks.forced_status = forced_status;
|
||||
|
||||
/* Test the correct MAC. */
|
||||
/*
|
||||
* Verify the MAC, one-shot case.
|
||||
*/
|
||||
status = psa_mac_verify( key, alg,
|
||||
input->x, input->len,
|
||||
expected_mac->x, expected_mac->len );
|
||||
TEST_EQUAL( mbedtls_test_driver_mac_hooks.hits, 1 );
|
||||
if( forced_status == PSA_SUCCESS ||
|
||||
forced_status == PSA_ERROR_NOT_SUPPORTED )
|
||||
{
|
||||
PSA_ASSERT( status );
|
||||
}
|
||||
else
|
||||
TEST_EQUAL( forced_status, status );
|
||||
|
||||
mbedtls_test_driver_mac_hooks = mbedtls_test_driver_mac_hooks_init();
|
||||
mbedtls_test_driver_mac_hooks.forced_status = forced_status;
|
||||
|
||||
/*
|
||||
* Verify the MAC, multi-part case.
|
||||
*/
|
||||
status = psa_mac_verify_setup( &operation, key, alg );
|
||||
TEST_EQUAL( mbedtls_test_driver_mac_hooks.hits, 1 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user