From 7bf9f7e308eab31464cef0cc7a0b5422909dcd62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 17 Nov 2014 11:20:21 +0100 Subject: [PATCH] Fix documentation issues found by Clang --- include/polarssl/entropy.h | 2 +- include/polarssl/pkcs12.h | 6 +++--- include/polarssl/pkcs5.h | 2 +- include/polarssl/rsa.h | 1 - include/polarssl/ssl.h | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/polarssl/entropy.h b/include/polarssl/entropy.h index ed97dcabb..2d7c21163 100644 --- a/include/polarssl/entropy.h +++ b/include/polarssl/entropy.h @@ -66,7 +66,7 @@ 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 diff --git a/include/polarssl/pkcs12.h b/include/polarssl/pkcs12.h index 9a4577173..7bbf393de 100644 --- a/include/polarssl/pkcs12.h +++ b/include/polarssl/pkcs12.h @@ -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 diff --git a/include/polarssl/pkcs5.h b/include/polarssl/pkcs5.h index b8c742e97..f83c8cdb8 100644 --- a/include/polarssl/pkcs5.h +++ b/include/polarssl/pkcs5.h @@ -77,7 +77,7 @@ extern "C" { * \param pbe_params the ASN.1 algorithm parameters * \param mode either PKCS5_DECRYPT or PKCS5_ENCRYPT * \param pwd password to use when generating key - * \param plen length of password + * \param pwdlen length of password * \param data data to process * \param datalen length of data * \param output output buffer diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h index 1159b9421..653354855 100644 --- a/include/polarssl/rsa.h +++ b/include/polarssl/rsa.h @@ -580,7 +580,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) diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index dd3521dc5..02f9dabbb 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -802,9 +802,9 @@ void ssl_set_own_cert( ssl_context *ssl, x509_cert *own_cert, * \param ssl SSL context * \param own_cert own public certificate chain * \param rsa_key alternate implementation private RSA key - * \param rsa_decrypt_func alternate implementation of \c rsa_pkcs1_decrypt() - * \param rsa_sign_func alternate implementation of \c rsa_pkcs1_sign() - * \param rsa_key_len_func function returning length of RSA key in bytes + * \param rsa_decrypt alternate implementation of \c rsa_pkcs1_decrypt() + * \param rsa_sign alternate implementation of \c rsa_pkcs1_sign() + * \param rsa_key_len function returning length of RSA key in bytes */ void ssl_set_own_cert_alt( ssl_context *ssl, x509_cert *own_cert, void *rsa_key,