psa_copy_key_material_into_slot() function
Copy key data (in export format) into an empty key slot. This function assumes that the slot does not contain any key material yet. On failure, the slot content is unchanged.
Arguments
slot
Key slot to copy the key into.
data
Buffer containing the key material.
data_length
Size of the key buffer.
Return value
#PSA_SUCCESS The key has been copied successfully. #PSA_ERROR_INSUFFICIENT_MEMORY Not enough memory was available for allocation of the copy buffer. #PSA_ERROR_ALREADY_EXISTS There was other key material already present in the slot.