doxygen: fix parameter name typos and misused \p commands

\p is reserved for function parameters.
\c is used to describe other values and variables.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2023-07-14 05:22:42 -04:00
parent a490042f1c
commit 96ce1b04ea
9 changed files with 26 additions and 26 deletions

View File

@ -231,7 +231,7 @@ int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context *ctx,
* *note Due to the nature of CTR mode, you should use the same * *note Due to the nature of CTR mode, you should use the same
* key for both encryption and decryption. In particular, calls * key for both encryption and decryption. In particular, calls
* to this function should be preceded by a key-schedule via * to this function should be preceded by a key-schedule via
* mbedtls_camellia_setkey_enc() regardless of whether \p mode * mbedtls_camellia_setkey_enc() regardless of whether \c mode
* is #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT. * is #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT.
* *
* \warning You must never reuse a nonce value with the same key. Doing so * \warning You must never reuse a nonce value with the same key. Doing so

View File

@ -427,7 +427,7 @@ const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values(const mbedtls_ciphe
const mbedtls_cipher_mode_t mode); const mbedtls_cipher_mode_t mode);
/** /**
* \brief This function initializes a \p cipher_context as NONE. * \brief This function initializes a \p ctx as NONE.
* *
* \param ctx The context to be initialized. This must not be \c NULL. * \param ctx The context to be initialized. This must not be \c NULL.
*/ */
@ -602,7 +602,7 @@ static inline const char *mbedtls_cipher_get_name(
* \param ctx The context of the cipher. This must be initialized. * \param ctx The context of the cipher. This must be initialized.
* *
* \return The key length of the cipher in bits. * \return The key length of the cipher in bits.
* \return #MBEDTLS_KEY_LENGTH_NONE if ctx \p has not been * \return #MBEDTLS_KEY_LENGTH_NONE if \p ctx has not been
* initialized. * initialized.
*/ */
static inline int mbedtls_cipher_get_key_bitlen( static inline int mbedtls_cipher_get_key_bitlen(
@ -779,7 +779,7 @@ int mbedtls_cipher_update(mbedtls_cipher_context_t *ctx,
* \param ctx The generic cipher context. This must be initialized and * \param ctx The generic cipher context. This must be initialized and
* bound to a key. * bound to a key.
* \param output The buffer to write data to. This needs to be a writable * \param output The buffer to write data to. This needs to be a writable
* buffer of at least \p block_size Bytes. * buffer of at least \c block_size Bytes.
* \param olen The length of the data written to the \p output buffer. * \param olen The length of the data written to the \p output buffer.
* This may not be \c NULL. * This may not be \c NULL.
* *

View File

@ -1458,8 +1458,8 @@
* ); * );
* ``` * ```
* The \c context value is initialized to 0 before the first call. * The \c context value is initialized to 0 before the first call.
* The function must fill the \c output buffer with \p output_size bytes * The function must fill the \c output buffer with \c output_size bytes
* of random data and set \c *output_length to \p output_size. * of random data and set \c *output_length to \c output_size.
* *
* Requires: MBEDTLS_PSA_CRYPTO_C * Requires: MBEDTLS_PSA_CRYPTO_C
* *

View File

@ -344,7 +344,7 @@ int mbedtls_ecdsa_verify(mbedtls_ecp_group *grp,
* via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair(). * via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair().
* \param md_alg The message digest that was used to hash the message. * \param md_alg The message digest that was used to hash the message.
* \param hash The message hash to be signed. This must be a readable * \param hash The message hash to be signed. This must be a readable
* buffer of length \p blen Bytes. * buffer of length \p hlen Bytes.
* \param hlen The length of the hash \p hash in Bytes. * \param hlen The length of the hash \p hash in Bytes.
* \param sig The buffer to which to write the signature. This must be a * \param sig The buffer to which to write the signature. This must be a
* writable buffer of length at least twice as large as the * writable buffer of length at least twice as large as the
@ -386,7 +386,7 @@ int mbedtls_ecdsa_write_signature(mbedtls_ecdsa_context *ctx,
* via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair(). * via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair().
* \param md_alg The message digest that was used to hash the message. * \param md_alg The message digest that was used to hash the message.
* \param hash The message hash to be signed. This must be a readable * \param hash The message hash to be signed. This must be a readable
* buffer of length \p blen Bytes. * buffer of length \p hlen Bytes.
* \param hlen The length of the hash \p hash in Bytes. * \param hlen The length of the hash \p hash in Bytes.
* \param sig The buffer to which to write the signature. This must be a * \param sig The buffer to which to write the signature. This must be a
* writable buffer of length at least twice as large as the * writable buffer of length at least twice as large as the
@ -490,7 +490,7 @@ int mbedtls_ecdsa_write_signature_det(mbedtls_ecdsa_context *ctx,
* \param ctx The ECDSA context to use. This must be initialized * \param ctx The ECDSA context to use. This must be initialized
* and have a group and public key bound to it. * and have a group and public key bound to it.
* \param hash The message hash that was signed. This must be a readable * \param hash The message hash that was signed. This must be a readable
* buffer of length \p size Bytes. * buffer of length \p hlen Bytes.
* \param hlen The size of the hash \p hash. * \param hlen The size of the hash \p hash.
* \param sig The signature to read and verify. This must be a readable * \param sig The signature to read and verify. This must be a readable
* buffer of length \p slen Bytes. * buffer of length \p slen Bytes.
@ -520,7 +520,7 @@ int mbedtls_ecdsa_read_signature(mbedtls_ecdsa_context *ctx,
* \param ctx The ECDSA context to use. This must be initialized * \param ctx The ECDSA context to use. This must be initialized
* and have a group and public key bound to it. * and have a group and public key bound to it.
* \param hash The message hash that was signed. This must be a readable * \param hash The message hash that was signed. This must be a readable
* buffer of length \p size Bytes. * buffer of length \p hlen Bytes.
* \param hlen The size of the hash \p hash. * \param hlen The size of the hash \p hash.
* \param sig The signature to read and verify. This must be a readable * \param sig The signature to read and verify. This must be a readable
* buffer of length \p slen Bytes. * buffer of length \p slen Bytes.

View File

@ -1081,7 +1081,7 @@ int mbedtls_ecp_muladd_restartable(
* *
* It only checks that the point is non-zero, has * It only checks that the point is non-zero, has
* valid coordinates and lies on the curve. It does not verify * valid coordinates and lies on the curve. It does not verify
* that it is indeed a multiple of \p G. This additional * that it is indeed a multiple of \c G. This additional
* check is computationally more expensive, is not required * check is computationally more expensive, is not required
* by standards, and should not be necessary if the group * by standards, and should not be necessary if the group
* used has a small cofactor. In particular, it is useless for * used has a small cofactor. In particular, it is useless for
@ -1106,7 +1106,7 @@ int mbedtls_ecp_check_pubkey(const mbedtls_ecp_group *grp,
const mbedtls_ecp_point *pt); const mbedtls_ecp_point *pt);
/** /**
* \brief This function checks that an \p mbedtls_mpi is a * \brief This function checks that an \c mbedtls_mpi is a
* valid private key for this curve. * valid private key for this curve.
* *
* \note This function uses bare components rather than an * \note This function uses bare components rather than an

View File

@ -186,8 +186,8 @@ void mbedtls_hmac_drbg_init(mbedtls_hmac_drbg_context *ctx);
* \param len The length of the personalization string. * \param len The length of the personalization string.
* This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT * This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT
* and also at most * and also at most
* #MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT - \p entropy_len * 3 / 2 * #MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT - \c entropy_len * 3 / 2
* where \p entropy_len is the entropy length * where \c entropy_len is the entropy length
* described above. * described above.
* *
* \return \c 0 if successful. * \return \c 0 if successful.
@ -316,8 +316,8 @@ int mbedtls_hmac_drbg_update_ret(mbedtls_hmac_drbg_context *ctx,
* \param len The length of the additional data. * \param len The length of the additional data.
* This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT * This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT
* and also at most * and also at most
* #MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT - \p entropy_len * #MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT - \c entropy_len
* where \p entropy_len is the entropy length * where \c entropy_len is the entropy length
* (see mbedtls_hmac_drbg_set_entropy_len()). * (see mbedtls_hmac_drbg_set_entropy_len()).
* *
* \return \c 0 if successful. * \return \c 0 if successful.

View File

@ -395,7 +395,7 @@ int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type);
* *
* \return 0 on success (signature is valid), * \return 0 on success (signature is valid),
* #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid * #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid
* signature in sig but its length is less than \p siglen, * signature in \p sig but its length is less than \p sig_len,
* or a specific error code. * or a specific error code.
* *
* \note For RSA keys, the default padding type is PKCS#1 v1.5. * \note For RSA keys, the default padding type is PKCS#1 v1.5.
@ -459,7 +459,7 @@ int mbedtls_pk_verify_restartable(mbedtls_pk_context *ctx,
* #MBEDTLS_ERR_PK_TYPE_MISMATCH if the PK context can't be * #MBEDTLS_ERR_PK_TYPE_MISMATCH if the PK context can't be
* used for this type of signatures, * used for this type of signatures,
* #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid * #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid
* signature in sig but its length is less than \p siglen, * signature in \p sig but its length is less than \p sig_len,
* or a specific error code. * or a specific error code.
* *
* \note If hash_len is 0, then the length associated with md_alg * \note If hash_len is 0, then the length associated with md_alg

View File

@ -537,7 +537,7 @@ int mbedtls_rsa_check_pub_priv(const mbedtls_rsa_context *pub,
* \note This function does not handle message padding. * \note This function does not handle message padding.
* *
* \note Make sure to set \p input[0] = 0 or ensure that * \note Make sure to set \p input[0] = 0 or ensure that
* input is smaller than \p N. * input is smaller than \c N.
* *
* \return \c 0 on success. * \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure. * \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@ -1109,8 +1109,8 @@ int mbedtls_rsa_rsassa_pss_sign(mbedtls_rsa_context *ctx,
* verification using the mode from the context. * verification using the mode from the context.
* *
* \note For PKCS#1 v2.1 encoding, see comments on * \note For PKCS#1 v2.1 encoding, see comments on
* mbedtls_rsa_rsassa_pss_verify() about \p md_alg and * mbedtls_rsa_rsassa_pss_verify() about \c md_alg and
* \p hash_id. * \c hash_id.
* *
* \deprecated It is deprecated and discouraged to call this function * \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PRIVATE mode. Future versions of the library * in #MBEDTLS_RSA_PRIVATE mode. Future versions of the library

View File

@ -1746,10 +1746,10 @@ void mbedtls_ssl_set_bio(mbedtls_ssl_context *ssl,
* \param own_cid The address of the readable buffer holding the CID we want * \param own_cid The address of the readable buffer holding the CID we want
* the peer to use when sending encrypted messages to us. * the peer to use when sending encrypted messages to us.
* This may be \c NULL if \p own_cid_len is \c 0. * This may be \c NULL if \p own_cid_len is \c 0.
* This parameter is unused if \p enabled is set to * This parameter is unused if \p enable is set to
* MBEDTLS_SSL_CID_DISABLED. * MBEDTLS_SSL_CID_DISABLED.
* \param own_cid_len The length of \p own_cid. * \param own_cid_len The length of \p own_cid.
* This parameter is unused if \p enabled is set to * This parameter is unused if \p enable is set to
* MBEDTLS_SSL_CID_DISABLED. * MBEDTLS_SSL_CID_DISABLED.
* *
* \note The value of \p own_cid_len must match the value of the * \note The value of \p own_cid_len must match the value of the
@ -2573,8 +2573,8 @@ int mbedtls_ssl_session_load(mbedtls_ssl_session *session,
* *
* \param session The session structure to be saved. * \param session The session structure to be saved.
* \param buf The buffer to write the serialized data to. It must be a * \param buf The buffer to write the serialized data to. It must be a
* writeable buffer of at least \p len bytes, or may be \c * writeable buffer of at least \p olen bytes, or may be \c
* NULL if \p len is \c 0. * NULL if \p olen is \c 0.
* \param buf_len The number of bytes available for writing in \p buf. * \param buf_len The number of bytes available for writing in \p buf.
* \param olen The size in bytes of the data that has been or would have * \param olen The size in bytes of the data that has been or would have
* been written. It must point to a valid \c size_t. * been written. It must point to a valid \c size_t.
@ -2659,7 +2659,7 @@ void mbedtls_ssl_conf_ciphersuites(mbedtls_ssl_config *conf,
* record headers. * record headers.
* *
* \return \c 0 on success. * \return \c 0 on success.
* \return #MBEDTLS_ERR_SSL_BAD_INPUT_DATA if \p own_cid_len * \return #MBEDTLS_ERR_SSL_BAD_INPUT_DATA if \p len
* is too large. * is too large.
*/ */
int mbedtls_ssl_conf_cid(mbedtls_ssl_config *conf, size_t len, int mbedtls_ssl_conf_cid(mbedtls_ssl_config *conf, size_t len,