pub unsafe extern "C" fn psa_get_key_attributes(
    key: mbedtls_svc_key_id_t,
    attributes: *mut psa_key_attributes_t
) -> psa_status_t
Expand description

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.

\param[in] key Identifier of the key to query. \param[in,out] attributes On success, the attributes of the key. On failure, equivalent to a freshly-initialized structure.

\retval #PSA_SUCCESS \emptydescription \retval #PSA_ERROR_INVALID_HANDLE \emptydescription \retval #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription \retval #PSA_ERROR_COMMUNICATION_FAILURE \emptydescription \retval #PSA_ERROR_CORRUPTION_DETECTED \emptydescription \retval #PSA_ERROR_STORAGE_FAILURE \emptydescription \retval #PSA_ERROR_DATA_CORRUPT \emptydescription \retval #PSA_ERROR_DATA_INVALID \emptydescription \retval #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.