Fixed typos in code
diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h
index 3942891..8886048 100644
--- a/include/polarssl/ecp.h
+++ b/include/polarssl/ecp.h
@@ -122,7 +122,7 @@
  * 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 @@
  *
  * \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 0c471c5..ade4683 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 c866b6f..95859e8 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 003154b..f2b8a0c 100644
--- a/include/polarssl/x509.h
+++ b/include/polarssl/x509.h
@@ -230,7 +230,7 @@
  * \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 2ca755c..3cc3aa3 100644
--- a/library/error.c
+++ b/library/error.c
@@ -430,7 +430,7 @@
         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 cfde265..25c9d85 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -86,7 +86,7 @@
         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 96695d4..61e78fe 100644
--- a/library/pk_wrap.c
+++ b/library/pk_wrap.c
@@ -259,7 +259,7 @@
 };
 
 /*
- * EC key resticted to ECDH
+ * EC key restricted to ECDH
  */
 static int eckeydh_can_do( pk_type_t type )
 {