mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 21:05:41 +00:00
Fix compile-time guard for optional field in struct
This commit is contained in:
parent
1772c9fac5
commit
7b80c64de4
|
@ -7275,10 +7275,6 @@ static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl )
|
||||||
|
|
||||||
void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl )
|
void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl )
|
||||||
{
|
{
|
||||||
#if !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
|
||||||
int resume = ssl->handshake->resume;
|
|
||||||
#endif /* !MBEDTLS_SSL_NO_SESSION_CACHE */
|
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup" ) );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
||||||
|
@ -7306,18 +7302,18 @@ void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl )
|
||||||
ssl->session = ssl->session_negotiate;
|
ssl->session = ssl->session_negotiate;
|
||||||
ssl->session_negotiate = NULL;
|
ssl->session_negotiate = NULL;
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
/*
|
/*
|
||||||
* Add cache entry
|
* Add cache entry
|
||||||
*/
|
*/
|
||||||
if( ssl->conf->f_set_cache != NULL &&
|
if( ssl->conf->f_set_cache != NULL &&
|
||||||
ssl->session->id_len != 0 &&
|
ssl->session->id_len != 0 &&
|
||||||
resume == 0 )
|
ssl->handshake->resume == 0 )
|
||||||
{
|
{
|
||||||
if( ssl->conf->f_set_cache( ssl->conf->p_cache, ssl->session ) != 0 )
|
if( ssl->conf->f_set_cache( ssl->conf->p_cache, ssl->session ) != 0 )
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "cache did not store session" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "cache did not store session" ) );
|
||||||
}
|
}
|
||||||
#endif /* !MBEDTLS_SSL_NO_SESSION_CACHE */
|
#endif /* MBEDTLS_SSL_SRV_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) &&
|
if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) &&
|
||||||
|
|
Loading…
Reference in a new issue