1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Re-introduction of key slot chekcs

Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
This commit is contained in:
TRodziewicz
2021-07-02 18:08:10 +02:00
parent bd3bfbf5c2
commit 053b99b90b
8 changed files with 35 additions and 1 deletions

View File

@ -1002,6 +1002,10 @@ psa_status_t psa_wipe_key_slot( psa_key_slot_t *slot )
if( slot->lock_count != 1 )
{
#if defined(MBEDTLS_TEST_HOOKS)
if( *mbedtls_test_hook_value != NULL )
( *mbedtls_test_hook_value )( slot->lock_count == 1, __FILE__, __LINE__ );
#endif
status = PSA_ERROR_CORRUPTION_DETECTED;
}