You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of version 1.0.0, PSA Crypto API functions return PSA_ERROR_INVALID_HANDLE to indicate that a key identifier that should exist does not exist, no matter the reason (potentially valid identifier that does not exist now, or permanently invalid value). Mbed TLS still returns PSA_ERROR_DOES_NOT_EXIST in some cases, including psa_destroy_key and key operations. We should return PSA_ERROR_INVALID_HANDLE instead.
PSA_ERROR_DOES_NOT_EXIST can still be returned:
By psa_open_key.
By psa_its_xxx and internal storage functions.
Potentially by driver interface functions.
The goal of this task is to change code that returns PSA_ERROR_DOES_NOT_EXIST, but should not, to return PSA_ERROR_INVALID_HANDLE instead, and update tests and documentation accordingly.
The text was updated successfully, but these errors were encountered:
gilles-peskine-arm
changed the title
psa_destroy_key must not return PSA_ERROR_DOES_NOT_EXIST
Do not return PSA_ERROR_DOES_NOT_EXIST for a non-existing key
Feb 23, 2021
As of version 1.0.0, PSA Crypto API functions return
PSA_ERROR_INVALID_HANDLE
to indicate that a key identifier that should exist does not exist, no matter the reason (potentially valid identifier that does not exist now, or permanently invalid value). Mbed TLS still returnsPSA_ERROR_DOES_NOT_EXIST
in some cases, includingpsa_destroy_key
and key operations. We should returnPSA_ERROR_INVALID_HANDLE
instead.PSA_ERROR_DOES_NOT_EXIST
can still be returned:psa_open_key
.psa_its_xxx
and internal storage functions.The goal of this task is to change code that returns
PSA_ERROR_DOES_NOT_EXIST
, but should not, to returnPSA_ERROR_INVALID_HANDLE
instead, and update tests and documentation accordingly.The text was updated successfully, but these errors were encountered: