Test drivers: rename import call source to driver location

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2022-02-03 10:27:01 -05:00
parent 333e0fac1d
commit ba4cadef14
3 changed files with 5 additions and 5 deletions

View File

@ -38,8 +38,8 @@ typedef struct {
/* Count the amount of times one of the key management driver functions
* is called. */
unsigned long hits;
/* Record the source of the function call. */
psa_key_location_t source;
/* Location of the last key management driver called to import a key. */
psa_key_location_t location;
} mbedtls_test_driver_key_management_hooks_t;
/* The location is initialized to the invalid value 0x800000. Invalid in the

View File

@ -262,7 +262,7 @@ psa_status_t mbedtls_test_transparent_import_key(
size_t *bits)
{
++mbedtls_test_driver_key_management_hooks.hits;
mbedtls_test_driver_key_management_hooks.source = PSA_KEY_LOCATION_LOCAL_STORAGE;
mbedtls_test_driver_key_management_hooks.location = PSA_KEY_LOCATION_LOCAL_STORAGE;
if( mbedtls_test_driver_key_management_hooks.forced_status != PSA_SUCCESS )
return( mbedtls_test_driver_key_management_hooks.forced_status );
@ -330,7 +330,7 @@ psa_status_t mbedtls_test_opaque_import_key(
size_t *bits)
{
++mbedtls_test_driver_key_management_hooks.hits;
mbedtls_test_driver_key_management_hooks.source = PSA_CRYPTO_TEST_DRIVER_LOCATION;
mbedtls_test_driver_key_management_hooks.location = PSA_CRYPTO_TEST_DRIVER_LOCATION;
if( mbedtls_test_driver_key_management_hooks.forced_status != PSA_SUCCESS )
return( mbedtls_test_driver_key_management_hooks.forced_status );

View File

@ -348,7 +348,7 @@ void validate_key( int force_status_arg,
actual_status = psa_import_key( &attributes, key_input->x, key_input->len, &key );
TEST_EQUAL( mbedtls_test_driver_key_management_hooks.hits, 1 );
TEST_EQUAL( actual_status, expected_status );
TEST_EQUAL( mbedtls_test_driver_key_management_hooks.source, location );
TEST_EQUAL( mbedtls_test_driver_key_management_hooks.location, location );
exit:
psa_reset_key_attributes( &attributes );
psa_destroy_key( key );