mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
leverage psa_allocate_buffer_to_slot from slot management
It makes the implementation of psa_load_builtin_key_into_slot a lot cleaner. Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
@ -180,6 +180,21 @@ static inline psa_key_slot_number_t psa_key_slot_get_slot_number(
|
||||
*/
|
||||
psa_status_t psa_wipe_key_slot( psa_key_slot_t *slot );
|
||||
|
||||
/** Try to allocate a buffer to an empty key slot.
|
||||
*
|
||||
* \param[in,out] slot Key slot to attach buffer to.
|
||||
* \param[in] buffer_length Requested size of the buffer.
|
||||
*
|
||||
* \retval #PSA_SUCCESS
|
||||
* The buffer has been successfully allocated.
|
||||
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
|
||||
* Not enough memory was available for allocation.
|
||||
* \retval #PSA_ERROR_ALREADY_EXISTS
|
||||
* Trying to allocate a buffer to a non-empty key slot.
|
||||
*/
|
||||
psa_status_t psa_allocate_buffer_to_slot( psa_key_slot_t *slot,
|
||||
size_t buffer_length );
|
||||
|
||||
/** Copy key data (in export format) into an empty key slot.
|
||||
*
|
||||
* This function assumes that the slot does not contain
|
||||
|
Reference in New Issue
Block a user