Expand and fix resend infrastructure

This commit is contained in:
Manuel Pégourié-Gonnard 2014-09-19 15:09:21 +02:00 committed by Paul Bakker
parent ffa67be698
commit 5d8ba53ace
4 changed files with 145 additions and 14 deletions

View file

@ -1805,6 +1805,11 @@ have_ciphersuite:
ssl->state++;
#if defined(POLARSSL_SSL_PROTO_DTLS)
if( ssl->transport == SSL_TRANSPORT_DATAGRAM )
ssl_recv_flight_completed( ssl );
#endif
SSL_DEBUG_MSG( 2, ( "<= parse client hello" ) );
return( 0 );
@ -3485,6 +3490,16 @@ int ssl_handshake_server_step( ssl_context *ssl )
if( ( ret = ssl_flush_output( ssl ) ) != 0 )
return( ret );
#if defined(POLARSSL_SSL_PROTO_DTLS)
if( ssl->transport == SSL_TRANSPORT_DATAGRAM &&
ssl->handshake != NULL &&
ssl->handshake->retransmit_state == SSL_RETRANS_SENDING )
{
if( ( ret = ssl_resend( ssl ) ) != 0 )
return( ret );
}
#endif
switch( ssl->state )
{
case SSL_HELLO_REQUEST: