Comment on locking strategy in psa_fail_key_creation

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
Ryan Everett 2024-02-14 11:36:41 +00:00
parent 3d8118d9dc
commit 73feaf2682

View file

@ -1900,6 +1900,9 @@ static void psa_fail_key_creation(psa_key_slot_t *slot,
} }
#if defined(MBEDTLS_THREADING_C) #if defined(MBEDTLS_THREADING_C)
/* If the lock operation fails we still wipe the slot.
* Operations will no longer work after a failed lock,
* but we still need to wipe the slot of confidential data. */
mbedtls_mutex_lock(&mbedtls_threading_key_slot_mutex); mbedtls_mutex_lock(&mbedtls_threading_key_slot_mutex);
#endif #endif