From 99b6b6b6c977ba0dc8faf111fbd992d2227e5763 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 4 Jul 2019 11:34:40 +0100 Subject: [PATCH] Fix outdated documentation of effect of hardcoded timer cb's on API --- include/mbedtls/ssl.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index bef634164..ad60e82c3 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1785,36 +1785,35 @@ void mbedtls_ssl_conf_read_timeout( mbedtls_ssl_config *conf, uint32_t timeout ) #if !defined(MBEDTLS_SSL_CONF_SET_TIMER) && \ !defined(MBEDTLS_SSL_CONF_GET_TIMER) /** - * \brief Set the timer callbacks (Mandatory for DTLS.) + * \brief Set the timer callbacks (Mandatory for DTLS.) * - * \param ssl SSL context - * \param p_timer parameter (context) shared by timer callbacks + * \param ssl SSL context + * \param p_timer parameter (context) shared by timer callbacks * \param f_set_timer set timer callback * \param f_get_timer get timer callback. Must return: * - * \note See the documentation of \c mbedtls_ssl_set_timer_t and - * \c mbedtls_ssl_get_timer_t for the conventions this pair of - * callbacks must follow. + * \note See the documentation of \c mbedtls_ssl_set_timer_t and + * \c mbedtls_ssl_get_timer_t for the conventions this pair of + * callbacks must follow. * - * \note On some platforms, timing.c provides - * \c mbedtls_timing_set_delay() and - * \c mbedtls_timing_get_delay() that are suitable for using - * here, except if using an event-driven style. + * \note On some platforms, timing.c provides + * \c mbedtls_timing_set_delay() and + * \c mbedtls_timing_get_delay() that are suitable for using + * here, except if using an event-driven style. * - * \note On constrained systems, the timer callbacks \p f_set_timer - * and \p f_get_timer may also be configured at compile-time - * via MBEDTLS_SSL_CONF_GET_TIMER and MBEDTLS_SSL_CONF_SET_TIMER. - * In this case, the corresponding arguments to this function - * are ignored. + * \note On constrained systems, the timer callbacks \p f_set_timer + * and \p f_get_timer may also be configured at compile-time + * via MBEDTLS_SSL_CONF_GET_TIMER and MBEDTLS_SSL_CONF_SET_TIMER. * - * \note See also the "DTLS tutorial" article in our knowledge base. - * https://tls.mbed.org/kb/how-to/dtls-tutorial + * \note See also the "DTLS tutorial" article in our knowledge base. + * https://tls.mbed.org/kb/how-to/dtls-tutorial */ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, void *p_timer, mbedtls_ssl_set_timer_t *f_set_timer, mbedtls_ssl_get_timer_t *f_get_timer ); -#else +#else /* !( MBEDTLS_SSL_CONF_SET_TIMER && + MBEDTLS_SSL_CONF_GET_TIMER ) */ /** * \brief Set the context to be passed to the timer callbacks * (Mandatory for DTLS.) @@ -1825,7 +1824,8 @@ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, */ void mbedtls_ssl_set_timer_cb_ctx( mbedtls_ssl_context *ssl, void *p_timer ); -#endif +#endif /* MBEDTLS_SSL_CONF_SET_TIMER && + MBEDTLS_SSL_CONF_GET_TIMER */ /** * \brief Callback type: generate and write session ticket