mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Fix server-initiated renego with non-blocking I/O
This commit is contained in:
@ -4167,8 +4167,6 @@ static int ssl_write_hello_request( ssl_context *ssl )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
ssl->renegotiation = SSL_RENEGOTIATION_PENDING;
|
||||
|
||||
SSL_DEBUG_MSG( 2, ( "<= write hello request" ) );
|
||||
|
||||
return( 0 );
|
||||
@ -4222,6 +4220,12 @@ int ssl_renegotiate( ssl_context *ssl )
|
||||
if( ssl->state != SSL_HANDSHAKE_OVER )
|
||||
return( POLARSSL_ERR_SSL_BAD_INPUT_DATA );
|
||||
|
||||
ssl->renegotiation = SSL_RENEGOTIATION_PENDING;
|
||||
|
||||
/* Did we already try/start sending HelloRequest? */
|
||||
if( ssl->out_left != 0 )
|
||||
return( ssl_flush_output( ssl ) );
|
||||
|
||||
return( ssl_write_hello_request( ssl ) );
|
||||
}
|
||||
#endif /* POLARSSL_SSL_SRV_C */
|
||||
|
Reference in New Issue
Block a user