Skip to content

Commit 747459a

Browse files
Improve documentation of the allocate method
1 parent f04cddb commit 747459a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

include/psa/crypto_se_driver.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,21 @@ typedef psa_status_t (*psa_drv_se_generate_key_t)(psa_drv_se_context_t *drv_cont
977977
* If one of the functions is not implemented, it should be set to NULL.
978978
*/
979979
typedef struct {
980-
/** Function that allocates a slot. */
980+
/** Function that allocates a slot for a key.
981+
*
982+
* The core calls this function to determine a slot number, then
983+
* calls the actual creation function (such as
984+
* psa_drv_se_key_management_t::p_import or
985+
* psa_drv_se_key_management_t::p_generate).
986+
*
987+
* If this function succeeds, the next call that the core makes to the
988+
* driver is either the creation function or
989+
* psa_drv_se_key_management_t::p_destroy. Note that
990+
* if the platform is reset after this function returns, the core
991+
* may either subsequently call
992+
* psa_drv_se_key_management_t::p_destroy or may behave as if the
993+
* last call to this function had not taken place.
994+
*/
981995
psa_drv_se_allocate_key_t p_allocate;
982996
/** Function that performs a key import operation */
983997
psa_drv_se_import_key_t p_import;

0 commit comments

Comments
 (0)