Update driver tests for psa_hash/verify_message

Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
gabor-mezei-arm 2021-05-03 16:29:54 +02:00
parent 9719a8450e
commit 2e14879c15
No known key found for this signature in database
GPG key ID: 106F5A41ECC305BD

View file

@ -168,7 +168,9 @@ void ecdsa_sign_message( int force_status_arg,
ASSERT_COMPARE( signature, signature_length,
expected_output->x, expected_output->len );
}
TEST_EQUAL( mbedtls_test_driver_signature_sign_hooks.hits, 1 );
/* In the builtin algorithm the driver is called twice. */
TEST_EQUAL( mbedtls_test_driver_signature_sign_hooks.hits,
force_status == PSA_ERROR_NOT_SUPPORTED ? 2 : 1 );
exit:
psa_reset_key_attributes( &attributes );
@ -224,7 +226,9 @@ void ecdsa_verify_message( int force_status_arg,
data_input->x, data_input->len,
signature_input->x, signature_input->len );
TEST_EQUAL( actual_status, expected_status );
TEST_EQUAL( mbedtls_test_driver_signature_verify_hooks.hits, 1 );
/* In the builtin algorithm the driver is called twice. */
TEST_EQUAL( mbedtls_test_driver_signature_verify_hooks.hits,
force_status == PSA_ERROR_NOT_SUPPORTED ? 2 : 1 );
exit:
psa_reset_key_attributes( &attributes );