mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 15:45:37 +01:00
Actually use the READ_TIMEOUT_MS in the sample DTLS client and server
Signed-off-by: Ryan LaPointe <ryan@ryanlapointe.org>
This commit is contained in:
parent
d61fa61bef
commit
a7e586bc2f
2
ChangeLog.d/dtls_sample_use_read_timeout.txt
Normal file
2
ChangeLog.d/dtls_sample_use_read_timeout.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Changes
|
||||||
|
* Fix the setting of the read timeout in the DTLS sample programs.
|
@ -218,6 +218,7 @@ int main( int argc, char *argv[] )
|
|||||||
mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL );
|
mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL );
|
||||||
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
||||||
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
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 )
|
if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 )
|
||||||
{
|
{
|
||||||
|
@ -250,6 +250,7 @@ int main( void )
|
|||||||
|
|
||||||
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
||||||
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
||||||
|
mbedtls_ssl_conf_read_timeout( &conf, READ_TIMEOUT_MS );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||||
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
||||||
|
Loading…
Reference in New Issue
Block a user