mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Prepare moving away from memmove() on incoming HS
This commit is contained in:
committed by
Paul Bakker
parent
4a1753657c
commit
f899583f94
@ -1069,6 +1069,8 @@ static int ssl_parse_server_hello( ssl_context *ssl )
|
||||
return( POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE );
|
||||
}
|
||||
|
||||
ssl_hs_rm_dtls_hdr( ssl );
|
||||
|
||||
#if defined(POLARSSL_SSL_PROTO_DTLS)
|
||||
if( ssl->transport == SSL_TRANSPORT_DATAGRAM )
|
||||
{
|
||||
@ -1774,6 +1776,8 @@ static int ssl_parse_server_key_exchange( ssl_context *ssl )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
ssl_hs_rm_dtls_hdr( ssl );
|
||||
|
||||
if( ssl->in_msgtype != SSL_MSG_HANDSHAKE )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) );
|
||||
@ -2098,6 +2102,8 @@ static int ssl_parse_certificate_request( ssl_context *ssl )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
ssl_hs_rm_dtls_hdr( ssl );
|
||||
|
||||
if( ssl->in_msgtype != SSL_MSG_HANDSHAKE )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "bad certificate request message" ) );
|
||||
@ -2222,6 +2228,8 @@ static int ssl_parse_server_hello_done( ssl_context *ssl )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
ssl_hs_rm_dtls_hdr( ssl );
|
||||
|
||||
if( ssl->in_msgtype != SSL_MSG_HANDSHAKE )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "bad server hello done message" ) );
|
||||
@ -2648,6 +2656,8 @@ static int ssl_parse_new_session_ticket( ssl_context *ssl )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
ssl_hs_rm_dtls_hdr( ssl );
|
||||
|
||||
if( ssl->in_msgtype != SSL_MSG_HANDSHAKE )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "bad new session ticket message" ) );
|
||||
|
Reference in New Issue
Block a user