1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Return CORRUPTION_DETECTED instead of BAD_SLOT when the slot's state is wrong

These error codes are only returned if the program has been tampered with,
so they should be CORRUPTION_DETECTED.

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
Ryan Everett
2024-01-12 17:45:05 +00:00
parent 4755e6bda4
commit dfe8bf86a8
6 changed files with 17 additions and 29 deletions

View File

@ -1718,7 +1718,6 @@ static psa_status_t psa_start_key_creation(
* \retval #PSA_ERROR_DATA_INVALID \emptydescription
* \retval #PSA_ERROR_DATA_CORRUPT \emptydescription
* \retval #PSA_ERROR_STORAGE_FAILURE \emptydescription
* \retval #PSA_ERROR_BAD_STATE \emptydescription
*
* \return If this function fails, the key slot is an invalid state.
* You must call psa_fail_key_creation() to wipe and free the slot.