From a7e586bc2fb2f4eee7ff4e2b3df95e229f4573f2 Mon Sep 17 00:00:00 2001 From: Ryan LaPointe Date: Mon, 1 Mar 2021 10:02:35 -0500 Subject: [PATCH] Actually use the READ_TIMEOUT_MS in the sample DTLS client and server Signed-off-by: Ryan LaPointe --- ChangeLog.d/dtls_sample_use_read_timeout.txt | 2 ++ programs/ssl/dtls_client.c | 1 + programs/ssl/dtls_server.c | 1 + 3 files changed, 4 insertions(+) create mode 100644 ChangeLog.d/dtls_sample_use_read_timeout.txt diff --git a/ChangeLog.d/dtls_sample_use_read_timeout.txt b/ChangeLog.d/dtls_sample_use_read_timeout.txt new file mode 100644 index 000000000..e3150d6ef --- /dev/null +++ b/ChangeLog.d/dtls_sample_use_read_timeout.txt @@ -0,0 +1,2 @@ +Changes + * Fix the setting of the read timeout in the DTLS sample programs. diff --git a/programs/ssl/dtls_client.c b/programs/ssl/dtls_client.c index 69d4f3392..fa7a0875a 100644 --- a/programs/ssl/dtls_client.c +++ b/programs/ssl/dtls_client.c @@ -218,6 +218,7 @@ int main( int argc, char *argv[] ) mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); + mbedtls_ssl_conf_read_timeout( &conf, READ_TIMEOUT_MS ); if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) { diff --git a/programs/ssl/dtls_server.c b/programs/ssl/dtls_server.c index 8339d9d11..c3b073e4c 100644 --- a/programs/ssl/dtls_server.c +++ b/programs/ssl/dtls_server.c @@ -250,6 +250,7 @@ int main( void ) mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); + mbedtls_ssl_conf_read_timeout( &conf, READ_TIMEOUT_MS ); #if defined(MBEDTLS_SSL_CACHE_C) mbedtls_ssl_conf_session_cache( &conf, &cache,