Update usage of PSA ITS to comply with v1.0
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 1b961b8..2d21bb0 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -92,7 +92,7 @@
#include "mbedtls/xtea.h"
#if ( defined(MBEDTLS_ENTROPY_NV_SEED) && defined(MBEDTLS_PSA_HAS_ITS_IO) )
-#include "psa_prot_internal_storage.h"
+#include "psa/internal_trusted_storage.h"
#endif
#define ARRAY_LENGTH( array ) ( sizeof( array ) / sizeof( *( array ) ) )
@@ -4220,7 +4220,7 @@
case PSA_ITS_SUCCESS:
return( PSA_SUCCESS );
- case PSA_ITS_ERROR_KEY_NOT_FOUND:
+ case PSA_ITS_ERROR_UID_NOT_FOUND:
return( PSA_ERROR_EMPTY_SLOT );
case PSA_ITS_ERROR_STORAGE_FAILURE:
@@ -4229,10 +4229,9 @@
case PSA_ITS_ERROR_INSUFFICIENT_SPACE:
return( PSA_ERROR_INSUFFICIENT_STORAGE );
- case PSA_ITS_ERROR_INVALID_KEY:
case PSA_ITS_ERROR_OFFSET_INVALID:
case PSA_ITS_ERROR_INCORRECT_SIZE:
- case PSA_ITS_ERROR_BAD_POINTER:
+ case PSA_ITS_ERROR_INVALID_ARGUMENTS:
return( PSA_ERROR_INVALID_ARGUMENT );
case PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED:
@@ -4263,7 +4262,7 @@
its_status = psa_its_get_info( PSA_CRYPTO_ITS_RANDOM_SEED_UID, &p_info );
status = its_to_psa_error( its_status );
- if( PSA_ITS_ERROR_KEY_NOT_FOUND == its_status ) /* No seed exists */
+ if( PSA_ITS_ERROR_UID_NOT_FOUND == its_status ) /* No seed exists */
{
its_status = psa_its_set( PSA_CRYPTO_ITS_RANDOM_SEED_UID, seed_size, seed, 0 );
status = its_to_psa_error( its_status );