Fix intended code blocks that were not suitably indented

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2024-03-04 18:30:09 +01:00
parent e33b349c90
commit ddbe4ae901

View File

@ -484,20 +484,20 @@ int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg,
* \brief Determine valid PSA attributes that can be used to * \brief Determine valid PSA attributes that can be used to
* import a key into PSA. * import a key into PSA.
* *
* The attributes determined by this function are suitable * The attributes determined by this function are suitable
* for calling mbedtls_pk_import_into_psa() to create * for calling mbedtls_pk_import_into_psa() to create
* a PSA key with the same key material. * a PSA key with the same key material.
* *
* The typical flow of operations involving this function is * The typical flow of operations involving this function is
* ``` * ```
* psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; * psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
* int ret = mbedtls_pk_get_psa_attributes(pk, &attributes); * int ret = mbedtls_pk_get_psa_attributes(pk, &attributes);
* if (ret != 0) ...; // error handling omitted * if (ret != 0) ...; // error handling omitted
* // Tweak attributes if desired * // Tweak attributes if desired
* psa_key_id_t key_id = 0; * psa_key_id_t key_id = 0;
* ret = mbedtls_pk_import_into_psa(pk, &attributes, &key_id); * ret = mbedtls_pk_import_into_psa(pk, &attributes, &key_id);
* if (ret != 0) ...; // error handling omitted * if (ret != 0) ...; // error handling omitted
* ``` * ```
* *
* \note This function does not support RSA-alt contexts * \note This function does not support RSA-alt contexts
* (set up with mbedtls_pk_setup_rsa_alt()). * (set up with mbedtls_pk_setup_rsa_alt()).
@ -596,24 +596,23 @@ int mbedtls_pk_get_psa_attributes(const mbedtls_pk_context *pk,
/** /**
* \brief Import a key into the PSA key store. * \brief Import a key into the PSA key store.
* *
* This function is equivalent to calling psa_import_key() * This function is equivalent to calling psa_import_key()
* with the key material from \p pk. * with the key material from \p pk.
* *
* The typical way to use this function is: * The typical way to use this function is:
* -# Call mbedtls_pk_get_psa_attributes() to obtain * -# Call mbedtls_pk_get_psa_attributes() to obtain
* attributes for the given key. * attributes for the given key.
* -# If desired, modify the attributes, for example: * -# If desired, modify the attributes, for example:
* - To create a persistent key, call * - To create a persistent key, call
* psa_set_key_identifier() and optionally * psa_set_key_identifier() and optionally
* psa_set_key_lifetime(). * psa_set_key_lifetime().
* - To import only the public part of a key pair: * - To import only the public part of a key pair:
* ``` *
* psa_set_key_type(&attributes, * psa_set_key_type(&attributes,
* PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR( * PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(
* psa_get_key_type(&attributes))); * psa_get_key_type(&attributes)));
* ``` * - Restrict the key usage if desired.
* - Restrict the key usage if desired. * -# Call mbedtls_pk_import_into_psa().
* -# Call mbedtls_pk_import_into_psa().
* *
* \note This function does not support RSA-alt contexts * \note This function does not support RSA-alt contexts
* (set up with mbedtls_pk_setup_rsa_alt()). * (set up with mbedtls_pk_setup_rsa_alt()).