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:
Jarno Lamsa 2019-06-18 13:07:17 +03:00 committed by Manuel Pégourié-Gonnard
parent 4e24c449e2
commit 7be14065e2
9 changed files with 40 additions and 12 deletions

View file

@ -2545,12 +2545,14 @@ reconnect:
}
}
#if defined(MBEDTLS_SSL_SESSION_CACHE)
if( ( ret = mbedtls_ssl_set_session( &ssl, &saved_session ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_set_session returned -0x%x\n\n",
-ret );
goto exit;
}
#endif /* MBEDTLS_SSL_SESSION_CACHE */
if( ( ret = mbedtls_net_connect( &server_fd,
opt.server_addr, opt.server_port,