Adjust secure element code to the new ITS interface
diff --git a/library/psa_crypto_storage.c b/library/psa_crypto_storage.c
index 43a19b3..687d22a 100644
--- a/library/psa_crypto_storage.c
+++ b/library/psa_crypto_storage.c
@@ -437,9 +437,16 @@
psa_status_t psa_crypto_load_transaction( void )
{
- return( psa_its_get( PSA_CRYPTO_ITS_TRANSACTION_UID, 0,
- sizeof( psa_crypto_transaction ),
- &psa_crypto_transaction ) );
+ psa_status_t status;
+ size_t length;
+ status = psa_its_get( PSA_CRYPTO_ITS_TRANSACTION_UID, 0,
+ sizeof( psa_crypto_transaction ),
+ &psa_crypto_transaction, &length );
+ if( status != PSA_SUCCESS )
+ return( status );
+ if( length != sizeof( psa_crypto_transaction ) )
+ return( PSA_ERROR_STORAGE_FAILURE );
+ return( PSA_SUCCESS );
}
psa_status_t psa_crypto_stop_transaction( void )