From aeab252fef5ac96f253191765eadc183aeac164c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 25 Mar 2015 19:38:23 +0100 Subject: [PATCH] Quit using deprecated ssl_set_bio() in programs --- programs/ssl/mini_client.c | 2 +- programs/ssl/ssl_client1.c | 3 +-- programs/ssl/ssl_fork_server.c | 3 +-- programs/ssl/ssl_mail_client.c | 3 +-- programs/ssl/ssl_pthread_server.c | 3 +-- programs/ssl/ssl_server.c | 3 +-- programs/x509/cert_app.c | 3 +-- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/programs/ssl/mini_client.c b/programs/ssl/mini_client.c index de4fb327d..b83ccd93b 100644 --- a/programs/ssl/mini_client.c +++ b/programs/ssl/mini_client.c @@ -234,7 +234,7 @@ int main( void ) goto exit; } - ssl_set_bio( &ssl, net_recv, &server_fd, net_send, &server_fd ); + ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); if( ssl_handshake( &ssl ) != 0 ) { diff --git a/programs/ssl/ssl_client1.c b/programs/ssl/ssl_client1.c index 4cd2cc4f8..c7eb3bdc9 100644 --- a/programs/ssl/ssl_client1.c +++ b/programs/ssl/ssl_client1.c @@ -176,8 +176,7 @@ int main( void ) ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); ssl_set_dbg( &ssl, my_debug, stdout ); - ssl_set_bio( &ssl, net_recv, &server_fd, - net_send, &server_fd ); + ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); /* * 4. Handshake diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index 7813d41e3..217851f53 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -276,8 +276,7 @@ int main( void ) ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); ssl_set_dbg( &ssl, my_debug, stdout ); - ssl_set_bio( &ssl, net_recv, &client_fd, - net_send, &client_fd ); + ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv, NULL, 0 ); ssl_set_ca_chain( &ssl, srvcert.next, NULL, NULL ); if( ( ret = ssl_set_own_cert( &ssl, &srvcert, &pkey ) ) != 0 ) diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 2e354a790..a68af7536 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -613,8 +613,7 @@ int main( int argc, char *argv[] ) ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); ssl_set_dbg( &ssl, my_debug, stdout ); - ssl_set_bio( &ssl, net_recv, &server_fd, - net_send, &server_fd ); + ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) ssl_set_ciphersuites( &ssl, opt.force_ciphersuite ); diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index c4a93c391..56b30564a 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -197,8 +197,7 @@ static void *handle_ssl_connection( void *data ) polarssl_printf( " [ #%d ] ok\n", thread_id ); - ssl_set_bio( &ssl, net_recv, &client_fd, - net_send, &client_fd ); + ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv, NULL, 0 ); polarssl_printf( " [ #%d ] ok\n", thread_id ); diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c index e38d3e229..6932221fd 100644 --- a/programs/ssl/ssl_server.c +++ b/programs/ssl/ssl_server.c @@ -251,8 +251,7 @@ reset: goto exit; } - ssl_set_bio( &ssl, net_recv, &client_fd, - net_send, &client_fd ); + ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv, NULL, 0 ); polarssl_printf( " ok\n" ); diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c index 9d8588c0d..5836c1f3f 100644 --- a/programs/x509/cert_app.c +++ b/programs/x509/cert_app.c @@ -439,8 +439,7 @@ int main( int argc, char *argv[] ) ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); ssl_set_dbg( &ssl, my_debug, stdout ); - ssl_set_bio( &ssl, net_recv, &server_fd, - net_send, &server_fd ); + ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); if( ( ret = ssl_set_own_cert( &ssl, &clicert, &pkey ) ) != 0 ) {