mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 20:05:37 +00:00
Change behavior of psa_get_key_lifetime()
psa_get_key_lifetime() behavior changed regarding empty slots, now it return the lifetime of and empty slots. Documentation in header file updated accordingly.
This commit is contained in:
parent
1c34545cfe
commit
ea0500936e
|
@ -103,10 +103,6 @@ typedef enum {
|
||||||
* Applications may call this function more than once. Once a call
|
* Applications may call this function more than once. Once a call
|
||||||
* succeeds, subsequent calls are guaranteed to succeed.
|
* succeeds, subsequent calls are guaranteed to succeed.
|
||||||
*
|
*
|
||||||
* \note Initial lifetime value for each key slot is initiated
|
|
||||||
* to PSA_KEY_LIFETIME_VOLATILE, user should change this value
|
|
||||||
* before calling psa_import_key() if needed.
|
|
||||||
*
|
|
||||||
* \retval PSA_SUCCESS
|
* \retval PSA_SUCCESS
|
||||||
* \retval PSA_ERROR_INSUFFICIENT_MEMORY
|
* \retval PSA_ERROR_INSUFFICIENT_MEMORY
|
||||||
* \retval PSA_ERROR_COMMUNICATION_FAILURE
|
* \retval PSA_ERROR_COMMUNICATION_FAILURE
|
||||||
|
@ -610,8 +606,6 @@ typedef uint32_t psa_key_lifetime_t;
|
||||||
* \retval PSA_ERROR_INVALID_ARGUMENT
|
* \retval PSA_ERROR_INVALID_ARGUMENT
|
||||||
* The key slot is invalid,
|
* The key slot is invalid,
|
||||||
* or the key data is not correctly formatted.
|
* or the key data is not correctly formatted.
|
||||||
* \retval PSA_ERROR_EMPTY_SLOT
|
|
||||||
* The key slot is not occupied.
|
|
||||||
*/
|
*/
|
||||||
psa_status_t psa_get_key_lifetime(psa_key_slot_t key,
|
psa_status_t psa_get_key_lifetime(psa_key_slot_t key,
|
||||||
psa_key_lifetime_t *lifetime);
|
psa_key_lifetime_t *lifetime);
|
||||||
|
@ -630,11 +624,9 @@ psa_status_t psa_get_key_lifetime(psa_key_slot_t key,
|
||||||
* \retval PSA_ERROR_INVALID_ARGUMENT
|
* \retval PSA_ERROR_INVALID_ARGUMENT
|
||||||
* The key slot is invalid,
|
* The key slot is invalid,
|
||||||
* or the key data is not correctly formatted.
|
* or the key data is not correctly formatted.
|
||||||
* \retval PSA_ERROR_EMPTY_SLOT
|
|
||||||
* The key slot is not occupied.
|
|
||||||
*/
|
*/
|
||||||
psa_status_t psa_set_key_lifetime(psa_key_slot_t key,
|
psa_status_t psa_set_key_lifetime(psa_key_slot_t key,
|
||||||
const psa_key_lifetime_t lifetime);
|
psa_key_lifetime_t lifetime);
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
|
|
|
@ -1275,9 +1275,6 @@ psa_status_t psa_get_key_lifetime(psa_key_slot_t key,
|
||||||
|
|
||||||
slot = &global_data.key_slots[key];
|
slot = &global_data.key_slots[key];
|
||||||
|
|
||||||
if( slot->type == PSA_KEY_TYPE_NONE )
|
|
||||||
return( PSA_ERROR_EMPTY_SLOT );
|
|
||||||
|
|
||||||
*lifetime = slot->lifetime;
|
*lifetime = slot->lifetime;
|
||||||
|
|
||||||
return( PSA_SUCCESS );
|
return( PSA_SUCCESS );
|
||||||
|
|
Loading…
Reference in a new issue