mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-05 09:40:32 +00:00
psa: Remove error message output
Remove error message output in case of unexpected access counter as Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
c9851141a2
commit
4640c15deb
@ -1308,17 +1308,12 @@ psa_status_t psa_wipe_key_slot( psa_key_slot_t *slot )
|
|||||||
* do our best to report an unexpected access counter: if available
|
* do our best to report an unexpected access counter: if available
|
||||||
* call MBEDTLS_PARAM_FAILED that may terminate execution (if called as
|
* call MBEDTLS_PARAM_FAILED that may terminate execution (if called as
|
||||||
* part of the execution of a test suite this will stop the test suite
|
* part of the execution of a test suite this will stop the test suite
|
||||||
* execution) and if MBEDTLS_PARAM_FAILED does not terminate execution
|
* execution).
|
||||||
* ouput an error message on standard error output.
|
|
||||||
*/
|
*/
|
||||||
if( slot->access_count != 1 )
|
if( slot->access_count != 1 )
|
||||||
{
|
{
|
||||||
#ifdef MBEDTLS_CHECK_PARAMS
|
#ifdef MBEDTLS_CHECK_PARAMS
|
||||||
MBEDTLS_PARAM_FAILED( slot->access_count == 1 );
|
MBEDTLS_PARAM_FAILED( slot->access_count == 1 );
|
||||||
#endif
|
|
||||||
#ifdef MBEDTLS_PLATFORM_C
|
|
||||||
mbedtls_fprintf( stderr,
|
|
||||||
"\nFATAL psa_wipe_key_slot Unexpected access counter value\n.");
|
|
||||||
#endif
|
#endif
|
||||||
status = PSA_ERROR_CORRUPTION_DETECTED;
|
status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
}
|
}
|
||||||
|
@ -317,16 +317,11 @@ psa_status_t psa_decrement_key_slot_access_count( psa_key_slot_t *slot )
|
|||||||
* do our best to report if the access counter is equal to zero: if
|
* do our best to report if the access counter is equal to zero: if
|
||||||
* available call MBEDTLS_PARAM_FAILED that may terminate execution (if
|
* available call MBEDTLS_PARAM_FAILED that may terminate execution (if
|
||||||
* called as part of the execution of a unit test suite this will stop the
|
* called as part of the execution of a unit test suite this will stop the
|
||||||
* test suite execution) and if MBEDTLS_PARAM_FAILED does not terminate
|
* test suite execution).
|
||||||
* execution ouput an error message on standard error output.
|
|
||||||
*/
|
*/
|
||||||
#ifdef MBEDTLS_CHECK_PARAMS
|
#ifdef MBEDTLS_CHECK_PARAMS
|
||||||
MBEDTLS_PARAM_FAILED( slot->access_count > 0 );
|
MBEDTLS_PARAM_FAILED( slot->access_count > 0 );
|
||||||
#endif
|
#endif
|
||||||
#ifdef MBEDTLS_PLATFORM_C
|
|
||||||
mbedtls_fprintf( stderr,
|
|
||||||
"\nFATAL psa_decrement_key_slot_access_count Decrementing a zero access counter.\n" );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return( PSA_ERROR_CORRUPTION_DETECTED );
|
return( PSA_ERROR_CORRUPTION_DETECTED );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user