Rework NewSessionTicket handling in state machine
Fixes bug: NewSessionTicket was ommited in resumed sessions.
This commit is contained in:
parent
3ffa3db80b
commit
7cd5924cec
3 changed files with 13 additions and 23 deletions
|
@ -2358,7 +2358,8 @@ static int ssl_write_new_session_ticket( ssl_context *ssl )
|
|||
return( ret );
|
||||
}
|
||||
|
||||
ssl->state = SSL_SERVER_CHANGE_CIPHER_SPEC;
|
||||
/* No need to remember writing a NewSessionTicket any more */
|
||||
ssl->handshake->new_session_ticket = 0;
|
||||
|
||||
SSL_DEBUG_MSG( 2, ( "<= write new session ticket" ) );
|
||||
|
||||
|
@ -2452,12 +2453,11 @@ int ssl_handshake_server_step( ssl_context *ssl )
|
|||
* ChangeCipherSpec
|
||||
* Finished
|
||||
*/
|
||||
case SSL_SERVER_NEW_SESSION_TICKET:
|
||||
ret = ssl_write_new_session_ticket( ssl );
|
||||
break;
|
||||
|
||||
case SSL_SERVER_CHANGE_CIPHER_SPEC:
|
||||
ret = ssl_write_change_cipher_spec( ssl );
|
||||
if( ssl->handshake->new_session_ticket != 0 )
|
||||
ret = ssl_write_new_session_ticket( ssl );
|
||||
else
|
||||
ret = ssl_write_change_cipher_spec( ssl );
|
||||
break;
|
||||
|
||||
case SSL_SERVER_FINISHED:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue