mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 10:18:12 +00:00
Merge remote-tracking branch 'upstream-public/pr/2181' into development
This commit is contained in:
commit
e1b1a2c979
1 changed files with 6 additions and 4 deletions
|
@ -3201,8 +3201,10 @@ int mbedtls_ssl_write_handshake_msg( mbedtls_ssl_context *ssl )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE &&
|
/* Whenever we send anything different from a
|
||||||
hs_type != MBEDTLS_SSL_HS_HELLO_REQUEST &&
|
* HelloRequest we should be in a handshake - double check. */
|
||||||
|
if( ! ( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE &&
|
||||||
|
hs_type == MBEDTLS_SSL_HS_HELLO_REQUEST ) &&
|
||||||
ssl->handshake == NULL )
|
ssl->handshake == NULL )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
||||||
|
@ -3296,8 +3298,8 @@ int mbedtls_ssl_write_handshake_msg( mbedtls_ssl_context *ssl )
|
||||||
/* Either send now, or just save to be sent (and resent) later */
|
/* Either send now, or just save to be sent (and resent) later */
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
|
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
|
||||||
( ssl->out_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ||
|
! ( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE &&
|
||||||
hs_type != MBEDTLS_SSL_HS_HELLO_REQUEST ) )
|
hs_type == MBEDTLS_SSL_HS_HELLO_REQUEST ) )
|
||||||
{
|
{
|
||||||
if( ( ret = ssl_flight_append( ssl ) ) != 0 )
|
if( ( ret = ssl_flight_append( ssl ) ) != 0 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue