tests: Remove unused key policy objects

persistent_key_import() and persistent_key_destroy() don't need to and
don't use key policy objects. Remove unused key policy objects.
This commit is contained in:
Jaeden Amero 2019-01-04 12:03:35 +00:00
parent d668baebc5
commit 8c7e95d9e0

View File

@ -117,7 +117,6 @@ void persistent_key_destroy( int key_id_arg, int should_store,
int first_type_arg, data_t *first_data,
int second_type_arg, data_t *second_data )
{
psa_key_policy_t policy;
psa_key_id_t key_id = key_id_arg;
psa_key_handle_t handle = 0;
psa_key_type_t first_type = (psa_key_type_t) first_type_arg;
@ -125,8 +124,6 @@ void persistent_key_destroy( int key_id_arg, int should_store,
PSA_ASSERT( psa_crypto_init() );
psa_key_policy_init( &policy );
PSA_ASSERT( psa_create_key( PSA_KEY_LIFETIME_PERSISTENT, key_id,
first_type,
PSA_BYTES_TO_BITS( first_data->len ),
@ -171,7 +168,6 @@ exit:
void persistent_key_import( int key_id_arg, int type_arg, data_t *data,
int expected_status )
{
psa_key_policy_t policy;
psa_key_lifetime_t lifetime;
psa_key_id_t key_id = (psa_key_id_t) key_id_arg;
psa_key_type_t type = (psa_key_type_t) type_arg;
@ -183,7 +179,6 @@ void persistent_key_import( int key_id_arg, int type_arg, data_t *data,
type,
PSA_BYTES_TO_BITS( data->len ),
&handle ) );
psa_key_policy_init( &policy );
TEST_EQUAL( psa_import_key( handle, type, data->x, data->len ),
expected_status );