From 75342a65e499a3d0ec70a1f4bb651e0fead17fa4 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Tue, 8 Apr 2014 17:35:40 +0200 Subject: [PATCH] Fixed typos in code --- include/polarssl/ecp.h | 4 ++-- include/polarssl/oid.h | 2 +- include/polarssl/ssl.h | 2 +- include/polarssl/x509.h | 2 +- library/error.c | 2 +- library/pk.c | 2 +- library/pk_wrap.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h index 3942891c6..888604821 100644 --- a/include/polarssl/ecp.h +++ b/include/polarssl/ecp.h @@ -122,7 +122,7 @@ ecp_point; * prime. (Use odd in ecp_mul() and prime in ecdsa_sign() for blinding.) * * In the case of Montgomery curves, we don't store A but (A + 2) / 4 which is - * the quantity actualy used in the formulas. Also, nbits is not the size of N + * the quantity actually used in the formulas. Also, nbits is not the size of N * but the required size for private keys. * * If modp is NULL, reduction modulo P is done using a generic algorithm. @@ -542,7 +542,7 @@ int ecp_sub( const ecp_group *grp, ecp_point *R, * * \note If f_rng is not NULL, it is used to randomize intermediate * results in order to prevent potential timing attacks - * targetting these results. It is recommended to always + * targeting these results. It is recommended to always * provide a non-NULL f_rng (the overhead is negligible). */ int ecp_mul( ecp_group *grp, ecp_point *R, diff --git a/include/polarssl/oid.h b/include/polarssl/oid.h index 0c471c545..ade468314 100644 --- a/include/polarssl/oid.h +++ b/include/polarssl/oid.h @@ -326,7 +326,7 @@ #define OID_ANSI_X9_62_PRIME_FIELD OID_ANSI_X9_62_FIELD_TYPE "\x01" /* - * ECDSA signature identifers, from RFC 5480 + * ECDSA signature identifiers, from RFC 5480 */ #define OID_ANSI_X9_62_SIG OID_ANSI_X9_62 "\x04" /* signatures(4) */ #define OID_ANSI_X9_62_SIG_SHA2 OID_ANSI_X9_62_SIG "\x03" /* ecdsa-with-SHA2(3) */ diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index c866b6ffd..95859e861 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -137,7 +137,7 @@ #define POLARSSL_ERR_SSL_BAD_HS_NEW_SESSION_TICKET -0x6E00 /**< Processing of the NewSessionTicket handshake message failed. */ #define POLARSSL_ERR_SSL_SESSION_TICKET_EXPIRED -0x6D80 /**< Session ticket has expired. */ #define POLARSSL_ERR_SSL_PK_TYPE_MISMATCH -0x6D00 /**< Public key type mismatch (eg, asked for RSA key exchange and presented EC key) */ -#define POLARSSL_ERR_SSL_UNKNOWN_IDENTITY -0x6C80 /**< Unkown identity received (eg, PSK identity) */ +#define POLARSSL_ERR_SSL_UNKNOWN_IDENTITY -0x6C80 /**< Unknown identity received (eg, PSK identity) */ #define POLARSSL_ERR_SSL_INTERNAL_ERROR -0x6C00 /**< Internal error (eg, unexpected failure in lower-level module) */ #define POLARSSL_ERR_SSL_COUNTER_WRAPPING -0x6B80 /**< A counter would wrap (eg, too many messages exchanged). */ diff --git a/include/polarssl/x509.h b/include/polarssl/x509.h index 003154bf1..f2b8a0c0b 100644 --- a/include/polarssl/x509.h +++ b/include/polarssl/x509.h @@ -230,7 +230,7 @@ const char *x509_oid_get_description( x509_buf *oid ); * \param size Maximum size of buffer * \param oid Buffer containing the OID * - * \return Length of the string written (exluding final NULL) or + * \return Length of the string written (excluding final NULL) or * POLARSSL_ERR_OID_BUF_TO_SMALL in case of error */ int x509_oid_get_numeric_string( char *buf, size_t size, x509_buf *oid ); diff --git a/library/error.c b/library/error.c index 2ca755c64..3cc3aa3ba 100644 --- a/library/error.c +++ b/library/error.c @@ -430,7 +430,7 @@ void polarssl_strerror( int ret, char *buf, size_t buflen ) if( use_ret == -(POLARSSL_ERR_SSL_PK_TYPE_MISMATCH) ) snprintf( buf, buflen, "SSL - Public key type mismatch (eg, asked for RSA key exchange and presented EC key)" ); if( use_ret == -(POLARSSL_ERR_SSL_UNKNOWN_IDENTITY) ) - snprintf( buf, buflen, "SSL - Unkown identity received (eg, PSK identity)" ); + snprintf( buf, buflen, "SSL - Unknown identity received (eg, PSK identity)" ); if( use_ret == -(POLARSSL_ERR_SSL_INTERNAL_ERROR) ) snprintf( buf, buflen, "SSL - Internal error (eg, unexpected failure in lower-level module)" ); if( use_ret == -(POLARSSL_ERR_SSL_COUNTER_WRAPPING) ) diff --git a/library/pk.c b/library/pk.c index cfde265bf..25c9d85e6 100644 --- a/library/pk.c +++ b/library/pk.c @@ -86,7 +86,7 @@ const pk_info_t * pk_info_from_type( pk_type_t pk_type ) case POLARSSL_PK_ECDSA: return &ecdsa_info; #endif - /* POLARSSL_PK_RSA_ALT ommited on purpose */ + /* POLARSSL_PK_RSA_ALT omitted on purpose */ default: return NULL; } diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 96695d462..61e78feb2 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -259,7 +259,7 @@ const pk_info_t eckey_info = { }; /* - * EC key resticted to ECDH + * EC key restricted to ECDH */ static int eckeydh_can_do( pk_type_t type ) {