Minor documentation improvements

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2024-02-01 20:42:21 +01:00
parent 03aa9bc226
commit e208b25b79

View file

@ -554,17 +554,17 @@ int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg,
* \p usage, exporting and copying the key, and * \p usage, exporting and copying the key, and
* possibly other permissions as documented for the * possibly other permissions as documented for the
* \p usage parameter. * \p usage parameter.
* The permitted algorithm is determined as follows * The permitted algorithm policy is determined as follows
* based on the #mbedtls_pk_type_t type of \p pk, * based on the #mbedtls_pk_type_t type of \p pk,
* the chosen \p usage and other factors: * the chosen \p usage and other factors:
* - #MBEDTLS_PK_RSA with whose underlying * - #MBEDTLS_PK_RSA whose underlying
* #mbedtls_rsa_context has the padding mode * #mbedtls_rsa_context has the padding mode
* #MBEDTLS_RSA_PKCS_V15: * #MBEDTLS_RSA_PKCS_V15:
* #PSA_ALG_RSA_PKCS1V15_SIGN(#PSA_ALG_ANY_HASH) * #PSA_ALG_RSA_PKCS1V15_SIGN(#PSA_ALG_ANY_HASH)
* if \p usage is SIGN/VERIFY, and * if \p usage is SIGN/VERIFY, and
* #PSA_ALG_RSA_PKCS1V15_CRYPT * #PSA_ALG_RSA_PKCS1V15_CRYPT
* if \p usage is ENCRYPT/DECRYPT. * if \p usage is ENCRYPT/DECRYPT.
* - #MBEDTLS_PK_RSA with whose underlying * - #MBEDTLS_PK_RSA whose underlying
* #mbedtls_rsa_context has the padding mode * #mbedtls_rsa_context has the padding mode
* #MBEDTLS_RSA_PKCS_V21 and the digest type * #MBEDTLS_RSA_PKCS_V21 and the digest type
* corresponding to the PSA algorithm \c hash: * corresponding to the PSA algorithm \c hash:
@ -581,7 +581,7 @@ int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg,
* - #MBEDTLS_PK_ECKEY_DH or #MBEDTLS_PK_ECKEY * - #MBEDTLS_PK_ECKEY_DH or #MBEDTLS_PK_ECKEY
* if \p usage is DERIVE: * if \p usage is DERIVE:
* #PSA_ALG_ECDH. * #PSA_ALG_ECDH.
* - #MBEDTLS_PK_OPAQUE: same as the algorithm policy * - #MBEDTLS_PK_OPAQUE: same as the primary algorithm
* set for the underlying PSA key, except that * set for the underlying PSA key, except that
* sign/decrypt flags are removed if the type is * sign/decrypt flags are removed if the type is
* set to a public key type. * set to a public key type.