Fix typos & Co

This commit is contained in:
Manuel Pégourié-Gonnard 2015-04-03 16:37:14 +02:00
parent 62edcc8176
commit 932e3934bd
15 changed files with 37 additions and 37 deletions

View file

@ -138,8 +138,8 @@ int ecdsa_verify( ecp_group *grp,
* curve is used). POLARSSL_ECDSA_MAX_LEN is always safe.
*
* \return 0 if successful,
* or a POLARSSL_ERR_ECP, POLARSSL_ERR_MPI or
* POLARSSL_ERR_ASN1 error code
* or a POLARSSL_ERR_ECP_XXX, POLARSSL_ERR_MPI_XXX or
* POLARSSL_ERR_ASN1_XXX error code
*/
int ecdsa_write_signature( ecdsa_context *ctx, md_type_t md_alg,
const unsigned char *hash, size_t hlen,
@ -174,8 +174,8 @@ int ecdsa_write_signature( ecdsa_context *ctx, md_type_t md_alg,
* curve is used). POLARSSL_ECDSA_MAX_LEN is always safe.
*
* \return 0 if successful,
* or a POLARSSL_ERR_ECP, POLARSSL_ERR_MPI or
* POLARSSL_ERR_ASN1 error code
* or a POLARSSL_ERR_ECP_XXX, POLARSSL_ERR_MPI_XXX or
* POLARSSL_ERR_ASN1_XXX error code
*/
int ecdsa_write_signature_det( ecdsa_context *ctx,
const unsigned char *hash, size_t hlen,
@ -196,9 +196,9 @@ int ecdsa_write_signature_det( ecdsa_context *ctx,
*
* \return 0 if successful,
* POLARSSL_ERR_ECP_BAD_INPUT_DATA if signature is invalid,
* POLARSSL_ERR_ECP_SIG_LEN_MISTMATCH if the signature is
* POLARSSL_ERR_ECP_SIG_LEN_MISMATCH if the signature is
* valid but its actual length is less than siglen,
* or a POLARSSL_ERR_ECP or POLARSSL_ERR_MPI error code
* or a POLARSSL_ERR_ECP_XXX or POLARSSL_ERR_MPI_XXX error code
*/
int ecdsa_read_signature( ecdsa_context *ctx,
const unsigned char *hash, size_t hlen,
@ -213,7 +213,7 @@ int ecdsa_read_signature( ecdsa_context *ctx,
* \param f_rng RNG function
* \param p_rng RNG parameter
*
* \return 0 on success, or a POLARSSL_ERR_ECP code.
* \return 0 on success, or a POLARSSL_ERR_ECP_XXX code.
*/
int ecdsa_genkey( ecdsa_context *ctx, ecp_group_id gid,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
@ -224,7 +224,7 @@ int ecdsa_genkey( ecdsa_context *ctx, ecp_group_id gid,
* \param ctx ECDSA context to set
* \param key EC key to use
*
* \return 0 on success, or a POLARSSL_ERR_ECP code.
* \return 0 on success, or a POLARSSL_ERR_ECP_XXX code.
*/
int ecdsa_from_keypair( ecdsa_context *ctx, const ecp_keypair *key );

View file

@ -254,8 +254,8 @@ int md( const md_info_t *md_info, const unsigned char *input, size_t ilen,
* \param path input file name
* \param output generic message digest checksum result
*
* \return 0 if successful, POLARSSL_ERR_MD_FILE_OPEN_FAILED if fopen
* failed, POLARSSL_ERR_MD_FILE_READ_FAILED if fread failed,
* \return 0 if successful,
* POLARSSL_ERR_MD_FILE_IO_ERROR if file input failed,
* POLARSSL_ERR_MD_BAD_INPUT_DATA if md_info was NULL.
*/
int md_file( const md_info_t *md_info, const char *path,

View file

@ -396,7 +396,7 @@ typedef struct {
* \param oid OID to translate
*
* \return Length of the string written (excluding final NULL) or
* POLARSSL_ERR_OID_BUF_TO_SMALL in case of error
* POLARSSL_ERR_OID_BUF_TOO_SMALL in case of error
*/
int oid_get_numeric_string( char *buf, size_t size, const asn1_buf *oid );

View file

@ -58,7 +58,7 @@ extern "C" {
* \param len data length
* \param output the output buffer
*
* \return 0 if successful, or a POLARSSL_ERR_xxx code
* \return 0 if successful, or a POLARSSL_ERR_XXX code
*/
int pkcs12_pbe_sha1_rc4_128( asn1_buf *pbe_params, int mode,
const unsigned char *pwd, size_t pwdlen,
@ -79,7 +79,7 @@ int pkcs12_pbe_sha1_rc4_128( asn1_buf *pbe_params, int mode,
* \param len data length
* \param output the output buffer
*
* \return 0 if successful, or a POLARSSL_ERR_xxx code
* \return 0 if successful, or a POLARSSL_ERR_XXX code
*/
int pkcs12_pbe( asn1_buf *pbe_params, int mode,
cipher_type_t cipher_type, md_type_t md_type,

View file

@ -61,7 +61,7 @@ extern "C" {
* \param datalen length of data
* \param output output buffer
*
* \returns 0 on success, or a POLARSSL_ERR_xxx code if verification fails.
* \returns 0 on success, or a POLARSSL_ERR_XXX code if verification fails.
*/
int pkcs5_pbes2( const asn1_buf *pbe_params, int mode,
const unsigned char *pwd, size_t pwdlen,
@ -80,7 +80,7 @@ int pkcs5_pbes2( const asn1_buf *pbe_params, int mode,
* \param key_length Length of generated key
* \param output Generated key. Must be at least as big as key_length
*
* \returns 0 on success, or a POLARSSL_ERR_xxx code if verification fails.
* \returns 0 on success, or a POLARSSL_ERR_XXX code if verification fails.
*/
int pkcs5_pbkdf2_hmac( md_context_t *ctx, const unsigned char *password,
size_t plen, const unsigned char *salt, size_t slen,

View file

@ -2037,8 +2037,8 @@ const char *ssl_get_version( const ssl_context *ssl );
* \param ssl SSL context
*
* \return Current maximum record expansion in bytes, or
* POLARSSL_ERR_FEATURE_UNAVAILABLE if compression is enabled,
* which makes expansion much less predictable
* POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE if compression is
* enabled, which makes expansion much less predictable
*/
int ssl_get_record_expansion( const ssl_context *ssl );

View file

@ -227,7 +227,7 @@ int x509_crt_info( char *buf, size_t size, const char *prefix,
* \param f_vrfy verification function
* \param p_vrfy verification parameter
*
* \return 0 if successful or POLARSSL_ERR_X509_SIG_VERIFY_FAILED,
* \return 0 if successful or POLARSSL_ERR_X509_CERT_VERIFY_FAILED
* in which case *flags will have one or more of
* the following values set:
* BADCERT_EXPIRED --
@ -424,7 +424,7 @@ void x509write_crt_set_md_alg( x509write_cert *ctx, md_type_t md_alg );
* \param val value of the extension OCTET STRING
* \param val_len length of the value data
*
* \return 0 if successful, or a POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or a POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_crt_set_extension( x509write_cert *ctx,
const char *oid, size_t oid_len,
@ -440,7 +440,7 @@ int x509write_crt_set_extension( x509write_cert *ctx,
* certificate (only for CA certificates, -1 is
* inlimited)
*
* \return 0 if successful, or a POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or a POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_crt_set_basic_constraints( x509write_cert *ctx,
int is_ca, int max_pathlen );
@ -453,7 +453,7 @@ int x509write_crt_set_basic_constraints( x509write_cert *ctx,
*
* \param ctx CRT context to use
*
* \return 0 if successful, or a POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or a POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_crt_set_subject_key_identifier( x509write_cert *ctx );
@ -464,7 +464,7 @@ int x509write_crt_set_subject_key_identifier( x509write_cert *ctx );
*
* \param ctx CRT context to use
*
* \return 0 if successful, or a POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or a POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_crt_set_authority_key_identifier( x509write_cert *ctx );
#endif /* POLARSSL_SHA1_C */
@ -476,7 +476,7 @@ int x509write_crt_set_authority_key_identifier( x509write_cert *ctx );
* \param ctx CRT context to use
* \param key_usage key usage flags to set
*
* \return 0 if successful, or POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_crt_set_key_usage( x509write_cert *ctx, unsigned char key_usage );
@ -487,7 +487,7 @@ int x509write_crt_set_key_usage( x509write_cert *ctx, unsigned char key_usage );
* \param ctx CRT context to use
* \param ns_cert_type Netscape Cert Type flags to set
*
* \return 0 if successful, or POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_crt_set_ns_cert_type( x509write_cert *ctx,
unsigned char ns_cert_type );

View file

@ -197,7 +197,7 @@ void x509write_csr_set_md_alg( x509write_csr *ctx, md_type_t md_alg );
* \param ctx CSR context to use
* \param key_usage key usage flags to set
*
* \return 0 if successful, or POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_csr_set_key_usage( x509write_csr *ctx, unsigned char key_usage );
@ -208,7 +208,7 @@ int x509write_csr_set_key_usage( x509write_csr *ctx, unsigned char key_usage );
* \param ctx CSR context to use
* \param ns_cert_type Netscape Cert Type flags to set
*
* \return 0 if successful, or POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_csr_set_ns_cert_type( x509write_csr *ctx,
unsigned char ns_cert_type );
@ -223,7 +223,7 @@ int x509write_csr_set_ns_cert_type( x509write_csr *ctx,
* \param val value of the extension OCTET STRING
* \param val_len length of the value data
*
* \return 0 if successful, or a POLARSSL_ERR_X509WRITE_MALLOC_FAILED
* \return 0 if successful, or a POLARSSL_ERR_X509_MALLOC_FAILED
*/
int x509write_csr_set_extension( x509write_csr *ctx,
const char *oid, size_t oid_len,