From eecb43cf0bd851ee644f85e95e5e56541ae3cbd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 12 May 2015 12:56:41 +0200 Subject: [PATCH] Manually merge doc fixes from 1.3 --- include/mbedtls/ecp.h | 6 +++--- include/mbedtls/rsa.h | 2 +- include/mbedtls/ssl.h | 10 ++++++++-- library/error.c | 2 +- library/x509.c | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 569c581dc5..a69ba17a26 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -412,7 +412,7 @@ int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp, mbedtls_ecp_poi * * \note buf is updated to point right after the ECPoint on exit * - * \return O if successful, + * \return 0 if successful, * MBEDTLS_ERR_MPI_XXX if initialization failed * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid */ @@ -443,7 +443,7 @@ int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp * \param grp Destination group * \param index Index in the list of well-known domain parameters * - * \return O if successful, + * \return 0 if successful, * MBEDTLS_ERR_MPI_XXX if initialization failed * MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE for unkownn groups * @@ -461,7 +461,7 @@ int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id index ) * * \note buf is updated to point right after ECParameters on exit * - * \return O if successful, + * \return 0 if successful, * MBEDTLS_ERR_MPI_XXX if initialization failed * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid */ diff --git a/include/mbedtls/rsa.h b/include/mbedtls/rsa.h index 89d61b512f..9ff667ed4d 100644 --- a/include/mbedtls/rsa.h +++ b/include/mbedtls/rsa.h @@ -43,7 +43,7 @@ #define MBEDTLS_ERR_RSA_BAD_INPUT_DATA -0x4080 /**< Bad input parameters to function. */ #define MBEDTLS_ERR_RSA_INVALID_PADDING -0x4100 /**< Input data contains invalid padding and is rejected. */ #define MBEDTLS_ERR_RSA_KEY_GEN_FAILED -0x4180 /**< Something failed during generation of a key. */ -#define MBEDTLS_ERR_RSA_KEY_CHECK_FAILED -0x4200 /**< Key failed to pass the libraries validity check. */ +#define MBEDTLS_ERR_RSA_KEY_CHECK_FAILED -0x4200 /**< Key failed to pass the library's validity check. */ #define MBEDTLS_ERR_RSA_PUBLIC_FAILED -0x4280 /**< The public key operation failed. */ #define MBEDTLS_ERR_RSA_PRIVATE_FAILED -0x4300 /**< The private key operation failed. */ #define MBEDTLS_ERR_RSA_VERIFY_FAILED -0x4380 /**< The PKCS#1 verification failed. */ diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 3076d12d56..7df46b51a8 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1520,6 +1520,9 @@ int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_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_config. + * * Note: The server uses its own preferences * over the preference of the client unless * MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE is defined! @@ -1535,6 +1538,9 @@ void mbedtls_ssl_conf_ciphersuites( mbedtls_ssl_config *conf, * preference order for a specific version of the protocol. * (Only useful on the server side) * + * The ciphersuites array is not copied, and must remain + * valid for the lifetime of the ssl_config. + * * \param conf SSL configuration * \param ciphersuites 0-terminated list of allowed ciphersuites * \param major Major version number (only MBEDTLS_SSL_MAJOR_VERSION_3 @@ -1919,7 +1925,7 @@ void mbedtls_ssl_conf_arc4_support( mbedtls_ssl_config *conf, char arc4 ); * MBEDTLS_SSL_MAX_FRAG_LEN_512, MBEDTLS_SSL_MAX_FRAG_LEN_1024, * MBEDTLS_SSL_MAX_FRAG_LEN_2048, MBEDTLS_SSL_MAX_FRAG_LEN_4096) * - * \return O if successful or MBEDTLS_ERR_SSL_BAD_INPUT_DATA + * \return 0 if successful or MBEDTLS_ERR_SSL_BAD_INPUT_DATA */ int mbedtls_ssl_conf_max_frag_len( mbedtls_ssl_config *conf, unsigned char mfl_code ); #endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ @@ -1965,7 +1971,7 @@ void mbedtls_ssl_conf_cbc_record_splitting( mbedtls_ssl_config *conf, char split * \param use_tickets Enable or disable (MBEDTLS_SSL_SESSION_TICKETS_ENABLED or * MBEDTLS_SSL_SESSION_TICKETS_DISABLED) * - * \return O if successful, + * \return 0 if successful, * or a specific error code (server only). */ int mbedtls_ssl_conf_session_tickets( mbedtls_ssl_config *conf, int use_tickets ); diff --git a/library/error.c b/library/error.c index 1a82cc9346..36b9032a18 100644 --- a/library/error.c +++ b/library/error.c @@ -352,7 +352,7 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen ) if( use_ret == -(MBEDTLS_ERR_RSA_KEY_GEN_FAILED) ) mbedtls_snprintf( buf, buflen, "RSA - Something failed during generation of a key" ); if( use_ret == -(MBEDTLS_ERR_RSA_KEY_CHECK_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - Key failed to pass the libraries validity check" ); + mbedtls_snprintf( buf, buflen, "RSA - Key failed to pass the library's validity check" ); if( use_ret == -(MBEDTLS_ERR_RSA_PUBLIC_FAILED) ) mbedtls_snprintf( buf, buflen, "RSA - The public key operation failed" ); if( use_ret == -(MBEDTLS_ERR_RSA_PRIVATE_FAILED) ) diff --git a/library/x509.c b/library/x509.c index 08a1ec3712..e97f82d820 100644 --- a/library/x509.c +++ b/library/x509.c @@ -449,7 +449,7 @@ int mbedtls_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 no the only one in a set */ cur->next_merged = 1; cur->next = mbedtls_malloc( sizeof( mbedtls_x509_name ) );