Fixed documentation issues found by clang

This commit is contained in:
Paul Bakker 2013-12-30 17:57:27 +01:00
parent 92bc875e0a
commit a36d23e290
10 changed files with 21 additions and 21 deletions

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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

View File

@ -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 );

View File

@ -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
*/

View File

@ -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 */

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)