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:
@ -56,7 +56,7 @@ typedef struct {
|
||||
* The state variable is used to help determine whether library functions
|
||||
* which operate on the slot succeed. For example, psa_finish_key_creation,
|
||||
* which transfers the state of a slot from PSA_SLOT_FILLING to
|
||||
* PSA_SLOT_FULL, must fail with error code PSA_ERROR_BAD_STATE
|
||||
* PSA_SLOT_FULL, must fail with error code PSA_ERROR_CORRUPTION_DETECTED
|
||||
* if the state of the slot is not PSA_SLOT_FILLING.
|
||||
*
|
||||
* Library functions which traverse the array of key slots only consider
|
||||
|
Reference in New Issue
Block a user