mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 02:14:15 +01:00
Fix ssl_cli resumption guards
This commit is contained in:
parent
4f74f6d301
commit
dbf6073fa3
@ -1805,9 +1805,6 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
||||
*/
|
||||
#if defined(MBEDTLS_SSL_SESSION_RESUMPTION)
|
||||
if( ssl->handshake->resume == 0 || n == 0 ||
|
||||
#else
|
||||
if( n == 0 ||
|
||||
#endif /* MBEDTLS_SSL_SESSION_RESUMPTION */
|
||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
||||
ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ||
|
||||
#endif
|
||||
@ -1815,6 +1812,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
||||
ssl->session_negotiate->compression != comp ||
|
||||
ssl->session_negotiate->id_len != n ||
|
||||
memcmp( ssl->session_negotiate->id, buf + 35, n ) != 0 )
|
||||
#endif /* MBEDTLS_SSL_SESSION_RESUMPTION */
|
||||
{
|
||||
ssl->state++;
|
||||
#if defined(MBEDTLS_SSL_SESSION_RESUMPTION)
|
||||
@ -1828,6 +1826,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
||||
ssl->session_negotiate->id_len = n;
|
||||
memcpy( ssl->session_negotiate->id, buf + 35, n );
|
||||
}
|
||||
#if defined(MBEDTLS_SSL_SESSION_RESUMPTION)
|
||||
else
|
||||
{
|
||||
ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC;
|
||||
@ -1840,6 +1839,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
||||
return( ret );
|
||||
}
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_SESSION_RESUMPTION */
|
||||
|
||||
#if defined(MBEDTLS_SSL_SESSION_RESUMPTION)
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed",
|
||||
|
Loading…
Reference in New Issue
Block a user