From d0fa5ccbb0853ec9ae2a2e6041aee06bc4d6c57b Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Mon, 11 May 2015 10:39:49 +0100 Subject: [PATCH] Typos and doc additions --- include/polarssl/ecp.h | 6 +++--- include/polarssl/oid.h | 2 +- include/polarssl/rsa.h | 2 +- include/polarssl/ssl.h | 7 +++++-- library/error.c | 2 +- library/x509.c | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h index ef99351c7..094a8407c 100644 --- a/include/polarssl/ecp.h +++ b/include/polarssl/ecp.h @@ -412,7 +412,7 @@ int ecp_point_read_binary( const ecp_group *grp, ecp_point *P, * * \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 @@ int ecp_group_read_string( ecp_group *grp, int radix, * \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 @@ int ecp_use_known_dp( ecp_group *grp, ecp_group_id index ); * * \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 31a7d2be1..11330f251 100644 --- a/include/polarssl/oid.h +++ b/include/polarssl/oid.h @@ -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 ); diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h index 21109edbd..b1354d196 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 cd9f770e9..a7b9a07a5 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -1154,6 +1154,9 @@ int ssl_set_session( ssl_context *ssl, const ssl_session *session ); * 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 @@ void ssl_set_arc4_support( ssl_context *ssl, char arc4 ); * 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 @@ void ssl_set_cbc_record_splitting( ssl_context *ssl, char split ); * \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 4d7b81c2c..98fba5cbd 100644 --- a/library/error.c +++ b/library/error.c @@ -356,7 +356,7 @@ void polarssl_strerror( int ret, char *buf, size_t buflen ) 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 857b8a344..ab105d8fa 100644 --- a/library/x509.c +++ b/library/x509.c @@ -449,7 +449,7 @@ int x509_get_name( unsigned char **p, const unsigned char *end, 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 ) );