TI OAD API Documentation  9.14.00
Functions
Attributes

Functions

psa_status_t psa_get_key_attributes (psa_key_id_t key, psa_key_attributes_t *attributes)
 
void psa_reset_key_attributes (psa_key_attributes_t *attributes)
 

Detailed Description

Function Documentation

§ psa_get_key_attributes()

psa_status_t psa_get_key_attributes ( psa_key_id_t  key,
psa_key_attributes_t *  attributes 
)

Retrieve the attributes of a key.

This function first resets the attribute structure as with psa_reset_key_attributes(). It then copies the attributes of the given key into the given attribute structure.

Note
This function may allocate memory or other resources. Once you have called this function on an attribute structure, you must call psa_reset_key_attributes() to free these resources.
Parameters
[in]keyIdentifier of the key to query.
[in,out]attributesOn success, the attributes of the key. On failure, equivalent to a freshly-initialized structure.
Return values
#PSA_SUCCESS
#PSA_ERROR_INVALID_HANDLE
#PSA_ERROR_INSUFFICIENT_MEMORY
#PSA_ERROR_COMMUNICATION_FAILURE
#PSA_ERROR_CORRUPTION_DETECTED
#PSA_ERROR_STORAGE_FAILURE
#PSA_ERROR_DATA_CORRUPT
#PSA_ERROR_DATA_INVALID
#PSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init(). It is implementation-dependent whether a failure to initialize results in this error code.

§ psa_reset_key_attributes()

void psa_reset_key_attributes ( psa_key_attributes_t *  attributes)

Reset a key attribute structure to a freshly initialized state.

You must initialize the attribute structure as described in the documentation of the type #psa_key_attributes_t before calling this function. Once the structure has been initialized, you may call this function at any time.

This function frees any auxiliary resources that the structure may contain.

Parameters
[in,out]attributesThe attribute structure to reset.