Persistent storage implementation: psa_key_slot_t -> psa_key_id_t
Move the persistent storage implementation from psa_key_slot_t to
psa_key_id_t. For the most part, this just means changing the types of
function arguments.
Update the documentation of some functions to reflect the fact that
the slot identifier is purely a storage identifier and is not related
to how the slot is designated in memory.
diff --git a/library/psa_crypto_storage_its.c b/library/psa_crypto_storage_its.c
index 29394b5..86e0e89 100644
--- a/library/psa_crypto_storage_its.c
+++ b/library/psa_crypto_storage_its.c
@@ -68,12 +68,12 @@
}
}
-static uint32_t psa_its_identifier_of_slot( psa_key_slot_t key )
+static uint32_t psa_its_identifier_of_slot( psa_key_id_t key )
{
return( key );
}
-psa_status_t psa_crypto_storage_load( const psa_key_slot_t key, uint8_t *data,
+psa_status_t psa_crypto_storage_load( const psa_key_id_t key, uint8_t *data,
size_t data_size )
{
psa_its_status_t ret;
@@ -92,7 +92,7 @@
return( status );
}
-int psa_is_key_present_in_storage( const psa_key_slot_t key )
+int psa_is_key_present_in_storage( const psa_key_id_t key )
{
psa_its_status_t ret;
uint32_t data_identifier = psa_its_identifier_of_slot( key );
@@ -105,7 +105,7 @@
return( 1 );
}
-psa_status_t psa_crypto_storage_store( const psa_key_slot_t key,
+psa_status_t psa_crypto_storage_store( const psa_key_id_t key,
const uint8_t *data,
size_t data_length )
{
@@ -143,7 +143,7 @@
return( status );
}
-psa_status_t psa_destroy_persistent_key( const psa_key_slot_t key )
+psa_status_t psa_destroy_persistent_key( const psa_key_id_t key )
{
psa_its_status_t ret;
uint32_t data_identifier = psa_its_identifier_of_slot( key );
@@ -163,7 +163,7 @@
return( PSA_SUCCESS );
}
-psa_status_t psa_crypto_storage_get_data_length( const psa_key_slot_t key,
+psa_status_t psa_crypto_storage_get_data_length( const psa_key_id_t key,
size_t *data_length )
{
psa_its_status_t ret;