29
29
30
30
#include "psa/crypto.h"
31
31
#include "psa_crypto_storage_backend.h"
32
- #include "psa_prot_internal_storage .h"
32
+ #include "psa/internal_trusted_storage .h"
33
33
34
34
#if defined(MBEDTLS_PLATFORM_C )
35
35
#include "mbedtls/platform.h"
@@ -42,7 +42,7 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
42
42
case PSA_ITS_SUCCESS :
43
43
return ( PSA_SUCCESS );
44
44
45
- case PSA_ITS_ERROR_KEY_NOT_FOUND :
45
+ case PSA_ITS_ERROR_UID_NOT_FOUND :
46
46
return ( PSA_ERROR_EMPTY_SLOT );
47
47
48
48
case PSA_ITS_ERROR_STORAGE_FAILURE :
@@ -51,10 +51,9 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
51
51
case PSA_ITS_ERROR_INSUFFICIENT_SPACE :
52
52
return ( PSA_ERROR_INSUFFICIENT_STORAGE );
53
53
54
- case PSA_ITS_ERROR_INVALID_KEY :
55
54
case PSA_ITS_ERROR_OFFSET_INVALID :
56
55
case PSA_ITS_ERROR_INCORRECT_SIZE :
57
- case PSA_ITS_ERROR_BAD_POINTER :
56
+ case PSA_ITS_ERROR_INVALID_ARGUMENTS :
58
57
return ( PSA_ERROR_INVALID_ARGUMENT );
59
58
60
59
case PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED :
@@ -100,7 +99,7 @@ int psa_is_key_present_in_storage( const psa_key_id_t key )
100
99
101
100
ret = psa_its_get_info ( data_identifier , & data_identifier_info );
102
101
103
- if ( ret == PSA_ITS_ERROR_KEY_NOT_FOUND )
102
+ if ( ret == PSA_ITS_ERROR_UID_NOT_FOUND )
104
103
return ( 0 );
105
104
return ( 1 );
106
105
}
@@ -150,14 +149,14 @@ psa_status_t psa_destroy_persistent_key( const psa_key_id_t key )
150
149
struct psa_its_info_t data_identifier_info ;
151
150
152
151
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 )
154
153
return ( PSA_SUCCESS );
155
154
156
155
if ( psa_its_remove ( data_identifier ) != PSA_ITS_SUCCESS )
157
156
return ( PSA_ERROR_STORAGE_FAILURE );
158
157
159
158
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 )
161
160
return ( PSA_ERROR_STORAGE_FAILURE );
162
161
163
162
return ( PSA_SUCCESS );
0 commit comments