mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-18 11:00:21 +00:00
Test drivers: rename import call source to driver location
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
981a0ceeee
commit
28a7c06281
|
@ -42,8 +42,8 @@ typedef struct {
|
||||||
/* Count the amount of times one of the key management driver functions
|
/* Count the amount of times one of the key management driver functions
|
||||||
* is called. */
|
* is called. */
|
||||||
unsigned long hits;
|
unsigned long hits;
|
||||||
/* Record the source of the function call. */
|
/* Location of the last key management driver called to import a key. */
|
||||||
psa_key_location_t source;
|
psa_key_location_t location;
|
||||||
} mbedtls_test_driver_key_management_hooks_t;
|
} mbedtls_test_driver_key_management_hooks_t;
|
||||||
|
|
||||||
/* The location is initialized to the invalid value 0x800000. Invalid in the
|
/* The location is initialized to the invalid value 0x800000. Invalid in the
|
||||||
|
|
|
@ -170,7 +170,7 @@ psa_status_t mbedtls_test_transparent_import_key(
|
||||||
size_t *bits)
|
size_t *bits)
|
||||||
{
|
{
|
||||||
++mbedtls_test_driver_key_management_hooks.hits;
|
++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 )
|
if( mbedtls_test_driver_key_management_hooks.forced_status != PSA_SUCCESS )
|
||||||
return( mbedtls_test_driver_key_management_hooks.forced_status );
|
return( mbedtls_test_driver_key_management_hooks.forced_status );
|
||||||
|
|
|
@ -348,7 +348,7 @@ void validate_key( int force_status_arg,
|
||||||
actual_status = psa_import_key( &attributes, key_input->x, key_input->len, &key );
|
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( mbedtls_test_driver_key_management_hooks.hits, 1 );
|
||||||
TEST_EQUAL( actual_status, expected_status );
|
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:
|
exit:
|
||||||
psa_reset_key_attributes( &attributes );
|
psa_reset_key_attributes( &attributes );
|
||||||
psa_destroy_key( key );
|
psa_destroy_key( key );
|
||||||
|
|
Loading…
Reference in a new issue