Rewording comments
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
This commit is contained in:
parent
829fe7038d
commit
c9890e9a8c
2 changed files with 10 additions and 8 deletions
|
@ -1002,10 +1002,11 @@ psa_status_t psa_wipe_key_slot( psa_key_slot_t *slot )
|
|||
|
||||
/*
|
||||
* As the return error code may not be handled in case of multiple errors,
|
||||
* do our best to report an unexpected lock counter: if available call
|
||||
* MBEDTLS_TEST_HOOK_TEST_ASSERT that may terminate execution (if called as
|
||||
* part of the execution of a test suite this will stop the test suite
|
||||
* execution).
|
||||
* do our best to report an unexpected lock counter. Assert with
|
||||
* MBEDTLS_TEST_HOOK_TEST_ASSERT that the lock counter is equal to one:
|
||||
* if the MBEDTLS_TEST_HOOKS configuration option is enabled and the
|
||||
* function is called as part of the execution of a test suite, the
|
||||
* execution of the test suite is stopped in error if the assertion fails.
|
||||
*/
|
||||
if( slot->lock_count != 1 )
|
||||
{
|
||||
|
|
|
@ -414,10 +414,11 @@ psa_status_t psa_unlock_key_slot( psa_key_slot_t *slot )
|
|||
|
||||
/*
|
||||
* As the return error code may not be handled in case of multiple errors,
|
||||
* do our best to report if the lock counter is equal to zero: if available
|
||||
* call MBEDTLS_TEST_HOOK_TEST_ASSERT that may terminate execution (if called
|
||||
* as part of the execution of a unit test suite this will stop the test
|
||||
* suite execution).
|
||||
* do our best to report if the lock counter is equal to zero. Assert with
|
||||
* MBEDTLS_TEST_HOOK_TEST_ASSERT that the lock counter is strictly greater
|
||||
* than zero: if the MBEDTLS_TEST_HOOKS configuration option is enabled and
|
||||
* the function is called as part of the execution of a test suite, the
|
||||
* execution of the test suite is stopped in error if the assertion fails.
|
||||
*/
|
||||
MBEDTLS_TEST_HOOK_TEST_ASSERT( slot->lock_count > 0 );
|
||||
return( PSA_ERROR_CORRUPTION_DETECTED );
|
||||
|
|
Loading…
Reference in a new issue