mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-09-21 09:37:23 +00:00
Improve code structure for session cache query
Signed-off-by: Hanno Becker <[email protected]>
This commit is contained in:
+1
-1
@@ -2801,9 +2801,9 @@ static void ssl_handle_id_based_session_resumption( mbedtls_ssl_context *ssl )
|
||||
}
|
||||
|
||||
/* Move semantics */
|
||||
/* Zeroization of session_tmp happens at the end of the function. */
|
||||
mbedtls_ssl_session_free( session );
|
||||
*session = session_tmp;
|
||||
memset( &session_tmp, 0, sizeof( mbedtls_ssl_session ) );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "session successfully restored from cache" ) );
|
||||
ssl->handshake->resume = 1;
|
||||
|
||||
Reference in New Issue
Block a user