mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 22:15:07 +00:00
Use ssl_set_bio_timeout() in test client/server
This commit is contained in:
parent
57fa314412
commit
a014829024
|
@ -942,9 +942,15 @@ int main( int argc, char *argv[] )
|
||||||
ssl_set_dbg( &ssl, my_debug, stdout );
|
ssl_set_dbg( &ssl, my_debug, stdout );
|
||||||
|
|
||||||
if( opt.nbio == 2 )
|
if( opt.nbio == 2 )
|
||||||
ssl_set_bio( &ssl, my_recv, &server_fd, my_send, &server_fd );
|
ssl_set_bio_timeout( &ssl, &server_fd, my_send, my_recv, NULL, 0 );
|
||||||
else
|
else
|
||||||
ssl_set_bio( &ssl, net_recv, &server_fd, net_send, &server_fd );
|
ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv,
|
||||||
|
#if defined(POLARSSL_HAVE_TIME)
|
||||||
|
net_recv_timeout,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
|
0 );
|
||||||
|
|
||||||
#if defined(POLARSSL_SSL_SESSION_TICKETS)
|
#if defined(POLARSSL_SSL_SESSION_TICKETS)
|
||||||
if( ( ret = ssl_set_session_tickets( &ssl, opt.tickets ) ) != 0 )
|
if( ( ret = ssl_set_session_tickets( &ssl, opt.tickets ) ) != 0 )
|
||||||
|
|
|
@ -1591,9 +1591,15 @@ reset:
|
||||||
}
|
}
|
||||||
|
|
||||||
if( opt.nbio == 2 )
|
if( opt.nbio == 2 )
|
||||||
ssl_set_bio( &ssl, my_recv, &client_fd, my_send, &client_fd );
|
ssl_set_bio_timeout( &ssl, &client_fd, my_send, my_recv, NULL, 0 );
|
||||||
else
|
else
|
||||||
ssl_set_bio( &ssl, net_recv, &client_fd, net_send, &client_fd );
|
ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv,
|
||||||
|
#if defined(POLARSSL_HAVE_TIME)
|
||||||
|
net_recv_timeout,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
|
0 );
|
||||||
|
|
||||||
#if defined(POLARSSL_SSL_DTLS_HELLO_VERIFY)
|
#if defined(POLARSSL_SSL_DTLS_HELLO_VERIFY)
|
||||||
if( opt.transport == SSL_TRANSPORT_DATAGRAM )
|
if( opt.transport == SSL_TRANSPORT_DATAGRAM )
|
||||||
|
|
Loading…
Reference in a new issue