Merge pull request #30 from orenc17/its_update

Use new ITS uid type
This commit is contained in:
Jaeden Amero 2019-01-28 13:41:58 +00:00 committed by GitHub
commit fa6f146bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,7 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
} }
} }
static uint32_t psa_its_identifier_of_slot( psa_key_id_t key ) static psa_its_uid_t psa_its_identifier_of_slot( psa_key_id_t key )
{ {
return( key ); return( key );
} }
@ -77,7 +77,7 @@ psa_status_t psa_crypto_storage_load( const psa_key_id_t key, uint8_t *data,
{ {
psa_its_status_t ret; psa_its_status_t ret;
psa_status_t status; psa_status_t status;
uint32_t data_identifier = psa_its_identifier_of_slot( key ); psa_its_uid_t data_identifier = psa_its_identifier_of_slot( key );
struct psa_its_info_t data_identifier_info; struct psa_its_info_t data_identifier_info;
ret = psa_its_get_info( data_identifier, &data_identifier_info ); ret = psa_its_get_info( data_identifier, &data_identifier_info );
@ -94,7 +94,7 @@ psa_status_t psa_crypto_storage_load( const psa_key_id_t key, uint8_t *data,
int psa_is_key_present_in_storage( const psa_key_id_t key ) int psa_is_key_present_in_storage( const psa_key_id_t key )
{ {
psa_its_status_t ret; psa_its_status_t ret;
uint32_t data_identifier = psa_its_identifier_of_slot( key ); psa_its_uid_t data_identifier = psa_its_identifier_of_slot( key );
struct psa_its_info_t data_identifier_info; struct psa_its_info_t data_identifier_info;
ret = psa_its_get_info( data_identifier, &data_identifier_info ); ret = psa_its_get_info( data_identifier, &data_identifier_info );
@ -110,7 +110,7 @@ psa_status_t psa_crypto_storage_store( const psa_key_id_t key,
{ {
psa_its_status_t ret; psa_its_status_t ret;
psa_status_t status; psa_status_t status;
uint32_t data_identifier = psa_its_identifier_of_slot( key ); psa_its_uid_t data_identifier = psa_its_identifier_of_slot( key );
struct psa_its_info_t data_identifier_info; struct psa_its_info_t data_identifier_info;
if( psa_is_key_present_in_storage( key ) == 1 ) if( psa_is_key_present_in_storage( key ) == 1 )
@ -145,7 +145,7 @@ exit:
psa_status_t psa_destroy_persistent_key( const psa_key_id_t key ) psa_status_t psa_destroy_persistent_key( const psa_key_id_t key )
{ {
psa_its_status_t ret; psa_its_status_t ret;
uint32_t data_identifier = psa_its_identifier_of_slot( key ); psa_its_uid_t data_identifier = psa_its_identifier_of_slot( key );
struct psa_its_info_t data_identifier_info; struct psa_its_info_t data_identifier_info;
ret = psa_its_get_info( data_identifier, &data_identifier_info ); ret = psa_its_get_info( data_identifier, &data_identifier_info );
@ -167,7 +167,7 @@ psa_status_t psa_crypto_storage_get_data_length( const psa_key_id_t key,
{ {
psa_its_status_t ret; psa_its_status_t ret;
psa_status_t status; psa_status_t status;
uint32_t data_identifier = psa_its_identifier_of_slot( key ); psa_its_uid_t data_identifier = psa_its_identifier_of_slot( key );
struct psa_its_info_t data_identifier_info; struct psa_its_info_t data_identifier_info;
ret = psa_its_get_info( data_identifier, &data_identifier_info ); ret = psa_its_get_info( data_identifier, &data_identifier_info );