mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
psa stats: Count locked slots instead of unlocked ones
Count locked slots and not unlocked ones to align with the other statistics counters. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -438,9 +438,9 @@ void mbedtls_psa_get_stats( mbedtls_psa_stats_t *stats )
|
||||
for( slot_idx = 0; slot_idx < PSA_KEY_SLOT_COUNT; slot_idx++ )
|
||||
{
|
||||
const psa_key_slot_t *slot = &global_data.key_slots[ slot_idx ];
|
||||
if( ! psa_is_key_slot_locked( slot ) )
|
||||
if( psa_is_key_slot_locked( slot ) )
|
||||
{
|
||||
++stats->unlocked_slots;
|
||||
++stats->locked_slots;
|
||||
}
|
||||
if( ! psa_is_key_slot_occupied( slot ) )
|
||||
{
|
||||
|
Reference in New Issue
Block a user