mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Split ssl_set_read_timeout() out of bio_timeout()
This commit is contained in:
parent
cc3195e81f
commit
97fd52c529
13 changed files with 39 additions and 26 deletions
|
|
@ -1119,16 +1119,16 @@ int main( int argc, char *argv[] )
|
|||
mbedtls_ssl_set_dbg( &conf, my_debug, stdout );
|
||||
|
||||
if( opt.nbio == 2 )
|
||||
mbedtls_ssl_set_bio_timeout( &ssl, &server_fd, my_send, my_recv, NULL,
|
||||
opt.read_timeout );
|
||||
mbedtls_ssl_set_bio_timeout( &ssl, &server_fd, my_send, my_recv, NULL );
|
||||
else
|
||||
mbedtls_ssl_set_bio_timeout( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv,
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
opt.nbio == 0 ? mbedtls_net_recv_timeout : NULL,
|
||||
opt.nbio == 0 ? mbedtls_net_recv_timeout : NULL
|
||||
#else
|
||||
NULL,
|
||||
NULL
|
||||
#endif
|
||||
opt.read_timeout );
|
||||
);
|
||||
mbedtls_ssl_set_read_timeout( &conf, opt.read_timeout );
|
||||
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
if( ( ret = mbedtls_ssl_set_session_tickets( &conf, opt.tickets ) ) != 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue