mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-28 09:39:53 +00:00
Fixed documentation issues found by clang
This commit is contained in:
parent
92bc875e0a
commit
a36d23e290
@ -148,7 +148,7 @@ int ecdh_read_params( ecdh_context *ctx,
|
||||
*
|
||||
* \param ctx ECDH constext to set
|
||||
* \param key EC key to use
|
||||
* \param ours Is it our key (1) or the peer's key (0) ?
|
||||
* \param side Is it our key (1) or the peer's key (0) ?
|
||||
*
|
||||
* \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
|
||||
*/
|
||||
|
@ -215,7 +215,7 @@ const ecp_curve_info *ecp_curve_info_from_grp_id( ecp_group_id grp_id );
|
||||
/**
|
||||
* \brief Get curve information from a TLS NamedCurve value
|
||||
*
|
||||
* \param grp_id A POLARSSL_ECP_DP_XXX value
|
||||
* \param tls_id A POLARSSL_ECP_DP_XXX value
|
||||
*
|
||||
* \return The associated curve information or NULL
|
||||
*/
|
||||
|
@ -81,7 +81,8 @@ extern "C" {
|
||||
* \return 0 if no critical failures occurred,
|
||||
* POLARSSL_ERR_ENTROPY_SOURCE_FAILED otherwise
|
||||
*/
|
||||
typedef int (*f_source_ptr)(void *, unsigned char *, size_t, size_t *);
|
||||
typedef int (*f_source_ptr)(void *data, unsigned char *output, size_t len,
|
||||
size_t *olen);
|
||||
|
||||
/**
|
||||
* \brief Entropy source state
|
||||
|
@ -201,7 +201,7 @@ int gcm_finish( gcm_context *ctx,
|
||||
/**
|
||||
* \brief Free a GCM context and underlying cipher sub-context
|
||||
*
|
||||
* \param ctx
|
||||
* \param ctx GCM context to free
|
||||
*/
|
||||
void gcm_free( gcm_context *ctx );
|
||||
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
||||
/**
|
||||
* \brief PadLock detection routine
|
||||
*
|
||||
* \param The feature to detect
|
||||
* \param feature The feature to detect
|
||||
*
|
||||
* \return 1 if CPU has support for the feature, 0 otherwise
|
||||
*/
|
||||
|
@ -453,14 +453,14 @@ int pk_parse_public_keyfile( pk_context *ctx, const char *path );
|
||||
* return value to determine where you should start
|
||||
* using the buffer
|
||||
*
|
||||
* \param key private to write away
|
||||
* \param ctx private to write away
|
||||
* \param buf buffer to write to
|
||||
* \param size size of the buffer
|
||||
*
|
||||
* \return length of data written if successful, or a specific
|
||||
* error code
|
||||
*/
|
||||
int pk_write_key_der( pk_context *pk, unsigned char *buf, size_t size );
|
||||
int pk_write_key_der( pk_context *ctx, unsigned char *buf, size_t size );
|
||||
|
||||
/**
|
||||
* \brief Write a public key to a SubjectPublicKeyInfo DER structure
|
||||
@ -468,37 +468,37 @@ int pk_write_key_der( pk_context *pk, unsigned char *buf, size_t size );
|
||||
* return value to determine where you should start
|
||||
* using the buffer
|
||||
*
|
||||
* \param key public key to write away
|
||||
* \param ctx public key to write away
|
||||
* \param buf buffer to write to
|
||||
* \param size size of the buffer
|
||||
*
|
||||
* \return length of data written if successful, or a specific
|
||||
* error code
|
||||
*/
|
||||
int pk_write_pubkey_der( pk_context *key, unsigned char *buf, size_t size );
|
||||
int pk_write_pubkey_der( pk_context *ctx, unsigned char *buf, size_t size );
|
||||
|
||||
#if defined(POLARSSL_PEM_WRITE_C)
|
||||
/**
|
||||
* \brief Write a public key to a PEM string
|
||||
*
|
||||
* \param key public key to write away
|
||||
* \param ctx public key to write away
|
||||
* \param buf buffer to write to
|
||||
* \param size size of the buffer
|
||||
*
|
||||
* \return 0 successful, or a specific error code
|
||||
*/
|
||||
int pk_write_pubkey_pem( pk_context *key, unsigned char *buf, size_t size );
|
||||
int pk_write_pubkey_pem( pk_context *ctx, unsigned char *buf, size_t size );
|
||||
|
||||
/**
|
||||
* \brief Write a private key to a PKCS#1 or SEC1 PEM string
|
||||
*
|
||||
* \param key private to write away
|
||||
* \param ctx private to write away
|
||||
* \param buf buffer to write to
|
||||
* \param size size of the buffer
|
||||
*
|
||||
* \return 0 successful, or a specific error code
|
||||
*/
|
||||
int pk_write_key_pem( pk_context *key, unsigned char *buf, size_t size );
|
||||
int pk_write_key_pem( pk_context *ctx, unsigned char *buf, size_t size );
|
||||
#endif /* POLARSSL_PEM_WRITE_C */
|
||||
#endif /* POLARSSL_PK_WRITE_C */
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
#define POLARSSL_ERR_PKCS12_PBE_INVALID_FORMAT -0x1E80 /**< PBE ASN.1 data not as expected. */
|
||||
#define POLARSSL_ERR_PKCS12_PASSWORD_MISMATCH -0x1E00 /**< Given private key password does not allow for correct decryption. */
|
||||
|
||||
#define PKCS12_DERIVE_KEY 1 /*< encryption/decryption key */
|
||||
#define PKCS12_DERIVE_IV 2 /*< initialization vector */
|
||||
#define PKCS12_DERIVE_MAC_KEY 3 /*< integrity / MAC key */
|
||||
#define PKCS12_DERIVE_KEY 1 /**< encryption/decryption key */
|
||||
#define PKCS12_DERIVE_IV 2 /**< initialization vector */
|
||||
#define PKCS12_DERIVE_MAC_KEY 3 /**< integrity / MAC key */
|
||||
|
||||
#define PKCS12_PBE_DECRYPT 0
|
||||
#define PKCS12_PBE_ENCRYPT 1
|
||||
|
@ -526,7 +526,6 @@ int rsa_rsassa_pkcs1_v15_verify( rsa_context *ctx,
|
||||
|
||||
/**
|
||||
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
||||
* \brief Do a public RSA and check the message digest
|
||||
*
|
||||
* \param ctx points to an RSA public key
|
||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||
|
@ -226,7 +226,7 @@ typedef enum {
|
||||
|
||||
typedef struct _ssl_ciphersuite_t ssl_ciphersuite_t;
|
||||
|
||||
#define POLARSSL_CIPHERSUITE_WEAK 0x01 /*<! Weak ciphersuite flag */
|
||||
#define POLARSSL_CIPHERSUITE_WEAK 0x01 /**< Weak ciphersuite flag */
|
||||
|
||||
/**
|
||||
* \brief This structure is used for storing ciphersuite information
|
||||
|
@ -371,7 +371,7 @@ void x509write_crt_set_issuer_key( x509write_cert *ctx, pk_context *key );
|
||||
* (e.g. POLARSSL_MD_SHA1)
|
||||
*
|
||||
* \param ctx CRT context to use
|
||||
* \param md_ald MD algorithm to use
|
||||
* \param md_alg MD algorithm to use
|
||||
*/
|
||||
void x509write_crt_set_md_alg( x509write_cert *ctx, md_type_t md_alg );
|
||||
|
||||
@ -467,7 +467,7 @@ void x509write_crt_free( x509write_cert *ctx );
|
||||
* return value to determine where you should start
|
||||
* using the buffer
|
||||
*
|
||||
* \param crt certificate to write away
|
||||
* \param ctx certificate to write away
|
||||
* \param buf buffer to write to
|
||||
* \param size size of the buffer
|
||||
* \param f_rng RNG function (for signature, see note)
|
||||
@ -489,7 +489,7 @@ int x509write_crt_der( x509write_cert *ctx, unsigned char *buf, size_t size,
|
||||
/**
|
||||
* \brief Write a built up certificate to a X509 PEM string
|
||||
*
|
||||
* \param crt certificate to write away
|
||||
* \param ctx certificate to write away
|
||||
* \param buf buffer to write to
|
||||
* \param size size of the buffer
|
||||
* \param f_rng RNG function (for signature, see note)
|
||||
|
Loading…
x
Reference in New Issue
Block a user