Re-introduction of key slot chekcs

Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 6e73d12..c7186af 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1002,6 +1002,10 @@
 
     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;
     }