psa_get_key_attributes() function
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.
Arguments
key
Identifier of the key to query.
attributes
On success, the attributes of the key. On failure, equivalent to a freshly-initialized structure.
Return value
#PSA_SUCCESS \emptydescription #PSA_ERROR_INVALID_HANDLE \emptydescription #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription #PSA_ERROR_COMMUNICATION_FAILURE \emptydescription #PSA_ERROR_CORRUPTION_DETECTED \emptydescription #PSA_ERROR_STORAGE_FAILURE \emptydescription #PSA_ERROR_DATA_CORRUPT \emptydescription #PSA_ERROR_DATA_INVALID \emptydescription #PSA_ERROR_BAD_STATE The library has not been previously initialized by psa_crypto_init(). It is implementation-dependent whether a failure to initialize results in this error code.
Notes
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.