2929
3030#include "psa/crypto.h"
3131#include "psa_crypto_storage_backend.h"
32- #include "psa_prot_internal_storage .h"
32+ #include "psa/internal_trusted_storage .h"
3333
3434#if defined(MBEDTLS_PLATFORM_C )
3535#include "mbedtls/platform.h"
@@ -42,7 +42,7 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
4242 case PSA_ITS_SUCCESS :
4343 return ( PSA_SUCCESS );
4444
45- case PSA_ITS_ERROR_KEY_NOT_FOUND :
45+ case PSA_ITS_ERROR_UID_NOT_FOUND :
4646 return ( PSA_ERROR_EMPTY_SLOT );
4747
4848 case PSA_ITS_ERROR_STORAGE_FAILURE :
@@ -51,10 +51,9 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
5151 case PSA_ITS_ERROR_INSUFFICIENT_SPACE :
5252 return ( PSA_ERROR_INSUFFICIENT_STORAGE );
5353
54- case PSA_ITS_ERROR_INVALID_KEY :
5554 case PSA_ITS_ERROR_OFFSET_INVALID :
5655 case PSA_ITS_ERROR_INCORRECT_SIZE :
57- case PSA_ITS_ERROR_BAD_POINTER :
56+ case PSA_ITS_ERROR_INVALID_ARGUMENTS :
5857 return ( PSA_ERROR_INVALID_ARGUMENT );
5958
6059 case PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED :
@@ -100,7 +99,7 @@ int psa_is_key_present_in_storage( const psa_key_id_t key )
10099
101100 ret = psa_its_get_info ( data_identifier , & data_identifier_info );
102101
103- if ( ret == PSA_ITS_ERROR_KEY_NOT_FOUND )
102+ if ( ret == PSA_ITS_ERROR_UID_NOT_FOUND )
104103 return ( 0 );
105104 return ( 1 );
106105}
@@ -150,14 +149,14 @@ psa_status_t psa_destroy_persistent_key( const psa_key_id_t key )
150149 struct psa_its_info_t data_identifier_info ;
151150
152151 ret = psa_its_get_info ( data_identifier , & data_identifier_info );
153- if ( ret == PSA_ITS_ERROR_KEY_NOT_FOUND )
152+ if ( ret == PSA_ITS_ERROR_UID_NOT_FOUND )
154153 return ( PSA_SUCCESS );
155154
156155 if ( psa_its_remove ( data_identifier ) != PSA_ITS_SUCCESS )
157156 return ( PSA_ERROR_STORAGE_FAILURE );
158157
159158 ret = psa_its_get_info ( data_identifier , & data_identifier_info );
160- if ( ret != PSA_ITS_ERROR_KEY_NOT_FOUND )
159+ if ( ret != PSA_ITS_ERROR_UID_NOT_FOUND )
161160 return ( PSA_ERROR_STORAGE_FAILURE );
162161
163162 return ( PSA_SUCCESS );
0 commit comments