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:
parent
4755e6bda4
commit
dfe8bf86a8
6 changed files with 17 additions and 29 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue