diff --git a/include/mbedtls/memory_buffer_alloc.h b/include/mbedtls/memory_buffer_alloc.h index 3408f343b..5e14823b7 100644 --- a/include/mbedtls/memory_buffer_alloc.h +++ b/include/mbedtls/memory_buffer_alloc.h @@ -127,7 +127,7 @@ void mbedtls_memory_buffer_alloc_cur_get( size_t *cur_used, size_t *cur_blocks ) * is defined. (Includes stack trace information for each block if * MBEDTLS_MEMORY_BACKTRACE is defined as well). * - * \returns 0 if verified, 1 otherwise + * \return 0 if verified, 1 otherwise */ int mbedtls_memory_buffer_alloc_verify( void ); diff --git a/include/mbedtls/net.h b/include/mbedtls/net.h index 9f757fef0..586bd34ab 100644 --- a/include/mbedtls/net.h +++ b/include/mbedtls/net.h @@ -149,7 +149,7 @@ void mbedtls_net_usleep( unsigned long usec ); * \param buf The buffer to write to * \param len Maximum length of the buffer * - * \return This function returns the number of bytes received, + * \return the number of bytes received, * or a non-zero error code; with a non-blocking socket, * MBEDTLS_ERR_SSL_WANT_READ indicates read() would block. */ @@ -163,7 +163,7 @@ int mbedtls_net_recv( void *ctx, unsigned char *buf, size_t len ); * \param buf The buffer to read from * \param len The length of the buffer * - * \return This function returns the number of bytes sent, + * \return the number of bytes sent, * or a non-zero error code; with a non-blocking socket, * MBEDTLS_ERR_SSL_WANT_WRITE indicates write() would block. */ @@ -179,7 +179,7 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len ); * \param len Maximum length of the buffer * \param timeout Maximum number of milliseconds to wait for data * - * \return This function returns the number of bytes received, + * \return the number of bytes received, * or a non-zero error code: * MBEDTLS_ERR_SSL_TIMEOUT if the operation timed out, * MBEDTLS_ERR_SSL_WANT_READ if interrupted by a signal. diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h index 4586fc099..ffd06dd33 100644 --- a/include/mbedtls/pk.h +++ b/include/mbedtls/pk.h @@ -546,7 +546,7 @@ int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *ctx, unsigned char *buf, si * \param buf buffer to write to * \param size size of the buffer * - * \return 0 successful, or a specific error code + * \return 0 if successful, or a specific error code */ int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); @@ -557,7 +557,7 @@ int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, si * \param buf buffer to write to * \param size size of the buffer * - * \return 0 successful, or a specific error code + * \return 0 if successful, or a specific error code */ int mbedtls_pk_write_key_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); #endif /* MBEDTLS_PEM_WRITE_C */ diff --git a/include/mbedtls/rsa.h b/include/mbedtls/rsa.h index 15afaee6b..3898687e0 100644 --- a/include/mbedtls/rsa.h +++ b/include/mbedtls/rsa.h @@ -625,7 +625,7 @@ int mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_rsa_context *ctx, * \param dst Destination context * \param src Source context * - * \return O on success, + * \return 0 on success, * MBEDTLS_ERR_MPI_ALLOC_FAILED on memory allocation failure */ int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src ); diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index bb68d76c3..b9654ba19 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -2029,8 +2029,9 @@ int mbedtls_ssl_renegotiate( mbedtls_ssl_context *ssl ); * \param buf buffer that will hold the data * \param len maximum number of bytes to read * - * \return This function returns the number of bytes read, 0 for EOF, - * or a negative error code. + * \return the number of bytes read, or + * 0 for EOF, or + * a negative error code. */ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len ); @@ -2041,7 +2042,7 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len ) * \param buf buffer holding the data * \param len how many bytes must be written * - * \return This function returns the number of bytes written, + * \return the number of bytes written, * or a negative error code. * * \note When this function returns MBEDTLS_ERR_SSL_WANT_WRITE, diff --git a/include/mbedtls/ssl_ticket.h b/include/mbedtls/ssl_ticket.h index 36b2f4c5e..caa838089 100644 --- a/include/mbedtls/ssl_ticket.h +++ b/include/mbedtls/ssl_ticket.h @@ -95,7 +95,7 @@ void mbedtls_ssl_ticket_init( mbedtls_ssl_ticket_context *ctx ); * least as strong as the the strongest ciphersuite * supported. Usually that means a 256-bit key. * - * \return 0 is successful, + * \return 0 if successful, * or a specific MBEDTLS_ERR_XXX error code */ int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx, diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h index 19df51e7e..da5ff350b 100644 --- a/include/mbedtls/x509_crt.h +++ b/include/mbedtls/x509_crt.h @@ -283,7 +283,7 @@ int mbedtls_x509_crt_check_key_usage( const mbedtls_x509_crt *crt, unsigned int * \param usage_oid Intended usage (eg MBEDTLS_OID_SERVER_AUTH or MBEDTLS_OID_CLIENT_AUTH). * \param usage_len Length of usage_oid (eg given by MBEDTLS_OID_SIZE()). * - * \return 0 is this use of the certificate is allowed, + * \return 0 if this use of the certificate is allowed, * MBEDTLS_ERR_X509_BAD_INPUT_DATA if not. * * \note Usually only makes sense on leaf certificates. @@ -544,7 +544,7 @@ int mbedtls_x509write_crt_der( mbedtls_x509write_cert *ctx, unsigned char *buf, * \param f_rng RNG function (for signature, see note) * \param p_rng RNG parameter * - * \return 0 successful, or a specific error code + * \return 0 if successful, or a specific error code * * \note f_rng may be NULL if RSA is used for signature and the * signature is made offline (otherwise f_rng is desirable diff --git a/include/mbedtls/x509_csr.h b/include/mbedtls/x509_csr.h index 7ae7d224e..b52ffff62 100644 --- a/include/mbedtls/x509_csr.h +++ b/include/mbedtls/x509_csr.h @@ -273,7 +273,7 @@ int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, s * \param f_rng RNG function (for signature, see note) * \param p_rng RNG parameter * - * \return 0 successful, or a specific error code + * \return 0 if successful, or a specific error code * * \note f_rng may be NULL if RSA is used for signature and the * signature is made offline (otherwise f_rng is desirable