Typos and doc additions
diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h
index ef99351..094a840 100644
--- a/include/polarssl/ecp.h
+++ b/include/polarssl/ecp.h
@@ -412,7 +412,7 @@
*
* \note buf is updated to point right after the ECPoint on exit
*
- * \return O if successful,
+ * \return 0 if successful,
* POLARSSL_ERR_MPI_XXX if initialization failed
* POLARSSL_ERR_ECP_BAD_INPUT_DATA if input is invalid
*/
@@ -462,7 +462,7 @@
* \param grp Destination group
* \param index Index in the list of well-known domain parameters
*
- * \return O if successful,
+ * \return 0 if successful,
* POLARSSL_ERR_MPI_XXX if initialization failed
* POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE for unkownn groups
*
@@ -480,7 +480,7 @@
*
* \note buf is updated to point right after ECParameters on exit
*
- * \return O if successful,
+ * \return 0 if successful,
* POLARSSL_ERR_MPI_XXX if initialization failed
* POLARSSL_ERR_ECP_BAD_INPUT_DATA if input is invalid
*/
diff --git a/include/polarssl/oid.h b/include/polarssl/oid.h
index 31a7d2b..11330f2 100644
--- a/include/polarssl/oid.h
+++ b/include/polarssl/oid.h
@@ -396,7 +396,7 @@
* \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 );
diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h
index 21109ed..b1354d1 100644
--- a/include/polarssl/rsa.h
+++ b/include/polarssl/rsa.h
@@ -43,7 +43,7 @@
#define POLARSSL_ERR_RSA_BAD_INPUT_DATA -0x4080 /**< Bad input parameters to function. */
#define POLARSSL_ERR_RSA_INVALID_PADDING -0x4100 /**< Input data contains invalid padding and is rejected. */
#define POLARSSL_ERR_RSA_KEY_GEN_FAILED -0x4180 /**< Something failed during generation of a key. */
-#define POLARSSL_ERR_RSA_KEY_CHECK_FAILED -0x4200 /**< Key failed to pass the libraries validity check. */
+#define POLARSSL_ERR_RSA_KEY_CHECK_FAILED -0x4200 /**< Key failed to pass the library's validity check. */
#define POLARSSL_ERR_RSA_PUBLIC_FAILED -0x4280 /**< The public key operation failed. */
#define POLARSSL_ERR_RSA_PRIVATE_FAILED -0x4300 /**< The private key operation failed. */
#define POLARSSL_ERR_RSA_VERIFY_FAILED -0x4380 /**< The PKCS#1 verification failed. */
diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h
index cd9f770..a7b9a07 100644
--- a/include/polarssl/ssl.h
+++ b/include/polarssl/ssl.h
@@ -1154,6 +1154,9 @@
* order. First in the list has the highest preference.
* (Overrides all version specific lists)
*
+ * The ciphersuites array is not copied, and must remain
+ * valid for the lifetime of the ssl_context.
+ *
* Note: The server uses its own preferences
* over the preference of the client unless
* POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE is defined!
@@ -1540,7 +1543,7 @@
* SSL_MAX_FRAG_LEN_512, SSL_MAX_FRAG_LEN_1024,
* SSL_MAX_FRAG_LEN_2048, SSL_MAX_FRAG_LEN_4096)
*
- * \return O if successful or POLARSSL_ERR_SSL_BAD_INPUT_DATA
+ * \return 0 if successful or POLARSSL_ERR_SSL_BAD_INPUT_DATA
*/
int ssl_set_max_frag_len( ssl_context *ssl, unsigned char mfl_code );
#endif /* POLARSSL_SSL_MAX_FRAGMENT_LENGTH */
@@ -1589,7 +1592,7 @@
* \param use_tickets Enable or disable (SSL_SESSION_TICKETS_ENABLED or
* SSL_SESSION_TICKETS_DISABLED)
*
- * \return O if successful,
+ * \return 0 if successful,
* or a specific error code (server only).
*/
int ssl_set_session_tickets( ssl_context *ssl, int use_tickets );
diff --git a/library/error.c b/library/error.c
index 4d7b81c..98fba5c 100644
--- a/library/error.c
+++ b/library/error.c
@@ -356,7 +356,7 @@
if( use_ret == -(POLARSSL_ERR_RSA_KEY_GEN_FAILED) )
polarssl_snprintf( buf, buflen, "RSA - Something failed during generation of a key" );
if( use_ret == -(POLARSSL_ERR_RSA_KEY_CHECK_FAILED) )
- polarssl_snprintf( buf, buflen, "RSA - Key failed to pass the libraries validity check" );
+ polarssl_snprintf( buf, buflen, "RSA - Key failed to pass the library's validity check" );
if( use_ret == -(POLARSSL_ERR_RSA_PUBLIC_FAILED) )
polarssl_snprintf( buf, buflen, "RSA - The public key operation failed" );
if( use_ret == -(POLARSSL_ERR_RSA_PRIVATE_FAILED) )
diff --git a/library/x509.c b/library/x509.c
index 857b8a3..ab105d8 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -449,7 +449,7 @@
if( *p == end_set )
break;
- /* Mark this item as being only one in a set */
+ /* Mark this item as being not the only one in a set */
cur->next_merged = 1;
cur->next = polarssl_malloc( sizeof( x509_name ) );