mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-22 00:15:50 +08:00
Clarify some internal documentation
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
5abeb8c77b
commit
d339aefd91
@ -88,7 +88,15 @@ typedef struct {
|
|||||||
/* The index of the slice containing this slot.
|
/* The index of the slice containing this slot.
|
||||||
* This field must be filled if the slot contains a key
|
* This field must be filled if the slot contains a key
|
||||||
* (including keys being created or destroyed), and can be either
|
* (including keys being created or destroyed), and can be either
|
||||||
* filled or 0 when the slot is free. */
|
* filled or 0 when the slot is free.
|
||||||
|
*
|
||||||
|
* In most cases, the slice index can be deduced from the key identifer.
|
||||||
|
* We keep it in a separate field for robustness (it reduces the chance
|
||||||
|
* that a coding mistake in the key store will result in accessing the
|
||||||
|
* wrong slice), and also so that it's available even on code paths
|
||||||
|
* during creation or destruction where the key identifier might not be
|
||||||
|
* filled in.
|
||||||
|
* */
|
||||||
uint8_t slice_index;
|
uint8_t slice_index;
|
||||||
#endif /* MBEDTLS_PSA_KEY_STORE_DYNAMIC */
|
#endif /* MBEDTLS_PSA_KEY_STORE_DYNAMIC */
|
||||||
|
|
||||||
|
@ -137,13 +137,15 @@ void psa_wipe_all_key_slots(void);
|
|||||||
* If multi-threading is enabled, the caller must hold the
|
* If multi-threading is enabled, the caller must hold the
|
||||||
* global key slot mutex.
|
* global key slot mutex.
|
||||||
*
|
*
|
||||||
* \param[out] volatile_key_id If null, reserve a cache slot for
|
* \param[out] volatile_key_id - If null, reserve a cache slot for
|
||||||
* a persistent or built-in key.
|
* a persistent or built-in key.
|
||||||
* If non-null, allocate a slot for
|
* - If non-null, allocate a slot for
|
||||||
* a volatile key.
|
* a volatile key. On success,
|
||||||
* If non-null, on success, the volatile key
|
* \p *volatile_key_id is the
|
||||||
* identifier corresponding with the
|
* identifier corresponding to the
|
||||||
* returned slot.
|
* returned slot. It is the caller's
|
||||||
|
* responsibility to set this key identifier
|
||||||
|
* in the attributes.
|
||||||
* \param[out] p_slot On success, a pointer to the slot.
|
* \param[out] p_slot On success, a pointer to the slot.
|
||||||
*
|
*
|
||||||
* \retval #PSA_SUCCESS \emptydescription
|
* \retval #PSA_SUCCESS \emptydescription
|
||||||
|
Loading…
x
Reference in New Issue
Block a user