psa: Use key slot type in mbedtls_psa_crypto_free()
To avoid a possible loss of precision, and to be semantically correct,
use psa_key_slot_t (which is 16 bits) instead of size_t (which is 32 or
64 bits on common platforms) in mbedtls_psa_crypto_free().
@@ -2941,7 +2941,7 @@ psa_status_t psa_generate_key( psa_key_slot_t key,
void mbedtls_psa_crypto_free( void )
{
- size_t key;
+ psa_key_slot_t key;
for( key = 1; key < PSA_KEY_SLOT_COUNT; key++ )
psa_destroy_key( key );
mbedtls_ctr_drbg_free( &global_data.ctr_drbg );
