Minor documentation improvements

This commit is contained in:
Gilles Peskine 2019-05-16 16:10:59 +02:00
parent dd835cbea6
commit f1b7694768

View File

@ -208,14 +208,15 @@ typedef struct psa_key_attributes_s psa_key_attributes_t;
/** Declare a key as persistent and set its key identifier. /** Declare a key as persistent and set its key identifier.
* *
* If the attribute structure declares the key as volatile (which is * If the attribute structure currently declares the key as volatile (which
* the default content of an attribute structure), this function sets * is the default content of an attribute structure), this function sets
* the lifetime attribute to #PSA_KEY_LIFETIME_PERSISTENT. * the lifetime attribute to #PSA_KEY_LIFETIME_PERSISTENT.
* *
* This function does not access storage, it merely fills the attribute * This function does not access storage, it merely stores the given
* structure with given value. The persistent key will be written to * value in the structure.
* storage when the attribute structure is passed to a key creation * The persistent key will be written to storage when the attribute
* function such as psa_import_key(), psa_generate_random_key(), * structure is passed to a key creation function such as
* psa_import_key(), psa_generate_random_key(),
* psa_generate_derived_key() or psa_copy_key(). * psa_generate_derived_key() or psa_copy_key().
* *
* This function may be declared as `static` (i.e. without external * This function may be declared as `static` (i.e. without external
@ -231,12 +232,16 @@ static void psa_set_key_id(psa_key_attributes_t *attributes,
/** Set the location of a persistent key. /** Set the location of a persistent key.
* *
* To make a key persistent, you must give it a persistent key identifier * To make a key persistent, you must give it a persistent key identifier
* with psa_set_key_id(). * with psa_set_key_id(). By default, a key that has a persistent identifier
* is stored in the default storage area identifier by
* #PSA_KEY_LIFETIME_PERSISTENT. Call this function to choose a storage
* area, or to explicitly declare the key as volatile.
* *
* This function does not access storage, it merely fills the attribute * This function does not access storage, it merely stores the given
* structure with given value. The persistent key will be written to * value in the structure.
* storage when the attribute structure is passed to a key creation * The persistent key will be written to storage when the attribute
* function such as psa_import_key(), psa_generate_random_key(), * structure is passed to a key creation function such as
* psa_import_key(), psa_generate_random_key(),
* psa_generate_derived_key() or psa_copy_key(). * psa_generate_derived_key() or psa_copy_key().
* *
* This function may be declared as `static` (i.e. without external * This function may be declared as `static` (i.e. without external