Add new config MBEDTLS_SSL_SESSION_RESUMPTION

Add a new configuration option MBEDTLS_SSL_SESSION_RESUMPTION
to enable/disable the session resumption feature including
ticket and cache based session resumption.
This commit is contained in:
Jarno Lamsa 2019-06-18 13:49:02 +03:00 committed by Manuel Pégourié-Gonnard
parent 590bf51cbb
commit 59bd12bf14
7 changed files with 44 additions and 0 deletions

View file

@ -671,6 +671,12 @@
#error "MBEDTLS_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
#endif
#if ( defined(MBEDTLS_SSL_SESSION_TICKETS) || \
defined(MBEDTLS_SSL_SESSION_CACHE) ) && \
!defined(MBEDTLS_SSL_SESSION_RESUMPTION)
#error "MBEDTLS_SSL_SESSION_TICKETS/MBEDTLS_SESSION_CACHE cannot be defined without MBEDTLS_SSL_SESSION_RESUMPTION"
#endif
#if defined(MBEDTLS_THREADING_PTHREAD)
#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
#error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites"

View file

@ -1676,6 +1676,14 @@
*/
#define MBEDTLS_SSL_SESSION_CACHE
/**
* \def MBEDTLS_SSL_SESSION_RESUMPTION
*
*
* Comment this macro to disable support for SSL session resumption
*/
#define MBEDTLS_SSL_SESSION_RESUMPTION
/**
* \def MBEDTLS_SSL_EXPORT_KEYS
*

View file

@ -509,7 +509,9 @@ struct mbedtls_ssl_handshake_params
unsigned char premaster[MBEDTLS_PREMASTER_SIZE];
/*!< premaster secret */
#if defined(MBEDTLS_SSL_SESSION_RESUMPTION)
int resume; /*!< session resume indicator*/
#endif /* MBEDTLS_SSL_SESSION_RESUMPTION */
int max_major_ver; /*!< max. major version client*/
int max_minor_ver; /*!< max. minor version client*/
int cli_exts; /*!< client extension presence*/