mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Fix bug with NewSessionTicket and non-blocking I/O
This commit is contained in:
@ -3003,15 +3003,18 @@ static int ssl_write_new_session_ticket( ssl_context *ssl )
|
||||
|
||||
ssl->out_msglen = 10 + tlen;
|
||||
|
||||
/*
|
||||
* Morally equivalent to updating ssl->state, but NewSessionTicket and
|
||||
* ChangeCipherSpec share the same state.
|
||||
*/
|
||||
ssl->handshake->new_session_ticket = 0;
|
||||
|
||||
if( ( ret = ssl_write_record( ssl ) ) != 0 )
|
||||
{
|
||||
SSL_DEBUG_RET( 1, "ssl_write_record", ret );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
/* No need to remember writing a NewSessionTicket any more */
|
||||
ssl->handshake->new_session_ticket = 0;
|
||||
|
||||
SSL_DEBUG_MSG( 2, ( "<= write new session ticket" ) );
|
||||
|
||||
return( 0 );
|
||||
|
Reference in New Issue
Block a user