From f0c9dd37d2b16a3d6e1e612d8a7ccf9ff208ae1a Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 17 Apr 2018 14:11:07 +0200 Subject: [PATCH] Added possible error codes for lifetime functions --- include/psa/crypto.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index 83e941f7e..07a120c42 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -604,6 +604,9 @@ typedef uint32_t psa_key_lifetime_t; * Success. * \retval PSA_ERROR_INVALID_ARGUMENT * The key slot is invalid. + * \retval PSA_ERROR_COMMUNICATION_FAILURE + * \retval PSA_ERROR_HARDWARE_FAILURE + * \retval PSA_ERROR_TAMPERING_DETECTED */ psa_status_t psa_get_key_lifetime(psa_key_slot_t key, psa_key_lifetime_t *lifetime); @@ -622,6 +625,15 @@ psa_status_t psa_get_key_lifetime(psa_key_slot_t key, * \retval PSA_ERROR_INVALID_ARGUMENT * The key slot is invalid, * or the lifetime value is invalid. + * \retval PSA_ERROR_NOT_SUPPORTED + * The implementation does not support the specified lifetime value, + * at least for the specified key slot. + * \retval PSA_ERROR_OCCUPIED_SLOT + * The slot contains a key, and the implementation does not support + * changing the lifetime of an occupied slot. + * \retval PSA_ERROR_COMMUNICATION_FAILURE + * \retval PSA_ERROR_HARDWARE_FAILURE + * \retval PSA_ERROR_TAMPERING_DETECTED */ psa_status_t psa_set_key_lifetime(psa_key_slot_t key, psa_key_lifetime_t lifetime);