Change requirements for setting timer callback
The code wants timer callbacks to be set (checked in fetch_input()), and can't
easily check whether we're using nbio, so it seems easier to require the
callbacks to be always set rather than only with nbio as was previously done.
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index bf209e8..b2c140f 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -3600,17 +3600,14 @@
opt.nbio == 0 ? mbedtls_net_recv_timeout : NULL );
#if defined(MBEDTLS_TIMING_C)
- if( opt.nbio != 0 && opt.read_timeout != 0 )
- {
#if !defined(MBEDTLS_SSL_CONF_SET_TIMER) && \
!defined(MBEDTLS_SSL_CONF_GET_TIMER)
- mbedtls_ssl_set_timer_cb( &ssl, &timer,
- mbedtls_timing_set_delay,
- mbedtls_timing_get_delay );
+ mbedtls_ssl_set_timer_cb( &ssl, &timer,
+ mbedtls_timing_set_delay,
+ mbedtls_timing_get_delay );
#else
- mbedtls_ssl_set_timer_cb_ctx( &ssl, &timer );
+ mbedtls_ssl_set_timer_cb_ctx( &ssl, &timer );
#endif
- }
#endif /* MBEDTLS_TIMING_C */
mbedtls_printf( " ok\n" );