From 48e29a12716f233fa65db689a55c2aa2a263ec96 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Thu, 4 Apr 2024 09:53:07 +0200 Subject: [PATCH] tls: Fix doc of mbedtls_ssl_session_save() Fix documentation of mbedtls_ssl_session_save() regarding its dependency on MBEDTLS_SSL_SESSION_TICKETS in TLS 1.3 session case. Signed-off-by: Ronald Cron --- include/mbedtls/ssl.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 172d4693b..f78820810 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -3309,8 +3309,16 @@ int mbedtls_ssl_session_load(mbedtls_ssl_session *session, * to determine the necessary size by calling this function * with \p buf set to \c NULL and \p buf_len to \c 0. * + * \note For TLS 1.3 sessions, this feature is supported only if the + * MBEDTLS_SSL_SESSION_TICKETS configuration option is enabled, + * as in TLS 1.3 session resumption is possible only with + * tickets. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL if \p buf is too small. + * \return #MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE if the + * MBEDTLS_SSL_SESSION_TICKETS configuration option is disabled + * and the session is a TLS 1.3 session. */ int mbedtls_ssl_session_save(const mbedtls_ssl_session *session, unsigned char *buf,