mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Add psa_trusted_storage_linux persistent storage support for v1.0.0 APIs
The following provides more information on this PR: - PSA stands for Platform Security Architecture. - Add support for use of psa_trusted_storage_api internal_trusted_storage.h v1.0.0 as the interface to the psa_trusted_storage_linux backend (i.e. for persistent storage when MBEDTLS_PSA_ITS_FILE_C is not defined). This requires changes to psa_crypto_its.h and psa_crypto_storage.c to migrate to the new API.
This commit is contained in:
committed by
Simon Hughes
parent
b6229e304e
commit
bda5a21112
@ -96,12 +96,15 @@ static psa_status_t psa_crypto_storage_load( const psa_key_file_id_t key,
|
||||
psa_status_t status;
|
||||
psa_storage_uid_t data_identifier = psa_its_identifier_of_slot( key );
|
||||
struct psa_storage_info_t data_identifier_info;
|
||||
size_t data_length = 0;
|
||||
|
||||
status = psa_its_get_info( data_identifier, &data_identifier_info );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
status = psa_its_get( data_identifier, 0, (uint32_t) data_size, data );
|
||||
status = psa_its_get( data_identifier, 0, (uint32_t) data_size, data, &data_length );
|
||||
if( data_size != data_length )
|
||||
return( PSA_ERROR_STORAGE_FAILURE );
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
Reference in New Issue
Block a user