Add config MBEDTLS_SSL_SESSION_CACHE
Add configuration option MBEDTLS_SSL_SESSION_CACHE to control enabling/disabling of the cache based session resumption.
This commit is contained in:
parent
4e24c449e2
commit
7be14065e2
9 changed files with 40 additions and 12 deletions
|
@ -2637,6 +2637,7 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
|
|||
|
||||
MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, random bytes", buf + 6, 32 );
|
||||
|
||||
#if defined(MBEDTLS_SSL_SESSION_CACHE)
|
||||
/*
|
||||
* Resume is 0 by default, see ssl_handshake_init().
|
||||
* It may be already set to 1 by ssl_parse_session_ticket_ext().
|
||||
|
@ -2653,6 +2654,7 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
|
|||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "session successfully restored from cache" ) );
|
||||
ssl->handshake->resume = 1;
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_SESSION_CACHE */
|
||||
|
||||
if( ssl->handshake->resume == 0 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue