Fix issue with renego & resend

This commit is contained in:
Manuel Pégourié-Gonnard 2014-09-25 13:50:12 +02:00 committed by Paul Bakker
parent 8cc7e03ae0
commit 23b7b703aa
2 changed files with 11 additions and 1 deletions

View file

@ -248,6 +248,13 @@
/*
* DTLS retransmission states, see RFC 6347 4.2.4
*
* Warning: the state is sometimes explicit sometimes implicit!
* - PREPARING is explicit (but could be implicit from ssl->state)
* - SENDING is merged in PREPARING for initial sends, explicit for resends
* - WAITING is usually implicit from ssl->state, except after resend
* - FINISHED is explicit (but could be implicit from state)
* TODO-DTLS: clean that up
*/
#define SSL_RETRANS_PREPARING 0
#define SSL_RETRANS_SENDING 1

View file

@ -2206,7 +2206,10 @@ int ssl_resend( ssl_context *ssl )
}
}
ssl->handshake->retransmit_state = SSL_RETRANS_WAITING;
if( ssl->state == SSL_HANDSHAKE_OVER )
ssl->handshake->retransmit_state = SSL_RETRANS_FINISHED;
else
ssl->handshake->retransmit_state = SSL_RETRANS_WAITING;
SSL_DEBUG_MSG( 2, ( "<= ssl_resend" ) );