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,

View File

@ -170,7 +170,7 @@ static int block_cipher_df( unsigned char *output,
aes_setkey_enc( &aes_ctx, key, CTR_DRBG_KEYBITS );
/*
* Reduce data to POLARSSL_CTR_DRBG_SEEDLEN bytes of data
* Reduce data to CTR_DRBG_SEEDLEN bytes of data
*/
for( j = 0; j < CTR_DRBG_SEEDLEN; j += CTR_DRBG_BLOCKSIZE )
{

View File

@ -1098,7 +1098,7 @@ int ssl_psk_derive_premaster( ssl_context *ssl, key_exchange_type_t key_ex )
p += 48;
}
else
#endif /* POLARSSL_KEY_EXCHANGE_RSA_PKS_ENABLED */
#endif /* POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED */
#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED)
if( key_ex == POLARSSL_KEY_EXCHANGE_DHE_PSK )
{

View File

@ -61,7 +61,7 @@ int main( void )
polarssl_printf("POLARSSL_AES_C and/or POLARSSL_DHM_C and/or POLARSSL_ENTROPY_C "
"and/or POLARSSL_NET_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_SHA256_C and/or POLARSSL_FS_IO and/or "
"POLARSSL_CTR_DBRG_C not defined.\n");
"POLARSSL_CTR_DRBG_C not defined.\n");
return( 0 );
}
#else

View File

@ -404,4 +404,4 @@ exit:
return( ret );
}
#endif /* POLARSSL_X509_WRITE_C && POLARSSL_FS_IO */
#endif /* POLARSSL_PK_WRITE_C && POLARSSL_FS_IO */

View File

@ -39,7 +39,7 @@
int main( void )
{
polarssl_printf( "POLARSSL_X509_CSR_WRITE_C and/or POLARSSL_FS_IO and/or "
"POLARSSL_PK_PARSE_C and/or POLARSSL_SHA256_c and/or "
"POLARSSL_PK_PARSE_C and/or POLARSSL_SHA256_C and/or "
"POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C "
"not defined.\n");
return( 0 );

View File

@ -547,11 +547,11 @@ depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECDSA_C:POLARSSL_RSA_C:POLARSSL_ECP_DP_
x509_verify:"data_files/server8_int-ca2.crt":"data_files/test-ca.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL"
X509 Certificate verification #50 (Valid, multiple CAs)
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_RSA_C:POLARSSL_PKCS1_V15:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP383R1_ENABLED
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_RSA_C:POLARSSL_PKCS1_V15:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP384R1_ENABLED
x509_verify:"data_files/server2.crt":"data_files/test-ca_cat12.crt":"data_files/crl.pem":"NULL":0:0:"NULL"
X509 Certificate verification #51 (Valid, multiple CAs, reverse order)
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_RSA_C:POLARSSL_PKCS1_V15:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP383R1_ENABLED
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_RSA_C:POLARSSL_PKCS1_V15:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP384R1_ENABLED
x509_verify:"data_files/server2.crt":"data_files/test-ca_cat21.crt":"data_files/crl.pem":"NULL":0:0:"NULL"
X509 Certificate verification #52 (CA keyUsage valid)

View File

@ -147,7 +147,7 @@ exit:
}
/* END_CASE */
/* BEGIN_CASE depends_on:POLARSSL_FS_IO:POLARSSL_X509_CRT_C */
/* BEGIN_CASE depends_on:POLARSSL_FS_IO:POLARSSL_X509_CRT_PARSE_C */
void x509_dn_gets( char *crt_file, char *entity, char *result_str )
{
x509_crt crt;
@ -175,7 +175,7 @@ exit:
}
/* END_CASE */
/* BEGIN_CASE depends_on:POLARSSL_FS_IO:POLARSSL_X509_CRT_C */
/* BEGIN_CASE depends_on:POLARSSL_FS_IO:POLARSSL_X509_CRT_PARSE_C */
void x509_time_expired( char *crt_file, char *entity, int result )
{
x509_crt crt;
@ -196,7 +196,7 @@ exit:
}
/* END_CASE */
/* BEGIN_CASE depends_on:POLARSSL_FS_IO:POLARSSL_X509_CRT_C */
/* BEGIN_CASE depends_on:POLARSSL_FS_IO:POLARSSL_X509_CRT_PARSE_C */
void x509_time_future( char *crt_file, char *entity, int result )
{
x509_crt crt;