mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 21:05:37 +00:00
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().
This commit is contained in:
parent
65fb236799
commit
045bd50a78
|
@ -2941,7 +2941,7 @@ psa_status_t psa_generate_key( psa_key_slot_t key,
|
||||||
|
|
||||||
void mbedtls_psa_crypto_free( void )
|
void mbedtls_psa_crypto_free( void )
|
||||||
{
|
{
|
||||||
size_t key;
|
psa_key_slot_t key;
|
||||||
for( key = 1; key < PSA_KEY_SLOT_COUNT; key++ )
|
for( key = 1; key < PSA_KEY_SLOT_COUNT; key++ )
|
||||||
psa_destroy_key( key );
|
psa_destroy_key( key );
|
||||||
mbedtls_ctr_drbg_free( &global_data.ctr_drbg );
|
mbedtls_ctr_drbg_free( &global_data.ctr_drbg );
|
||||||
|
|
Loading…
Reference in a new issue