From 0de074fbc16c861c90ddd0971307c608953cc79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 14 May 2015 12:58:01 +0200 Subject: [PATCH] Use rarely used conf function to cover them --- library/ssl_tls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 39796f8f0..19d359ad1 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -6649,8 +6649,10 @@ int mbedtls_ssl_config_defaults( mbedtls_ssl_config *conf, int ret; #endif - conf->endpoint = endpoint; - conf->transport = transport; + /* Use the functions here so that they are covered in tests, + * but otherwise access member directly for efficiency */ + mbedtls_ssl_conf_endpoint( conf, endpoint ); + mbedtls_ssl_conf_transport( conf, transport ); conf->min_major_ver = MBEDTLS_SSL_MAJOR_VERSION_3; conf->min_minor_ver = MBEDTLS_SSL_MINOR_VERSION_1; /* TLS 1.0 */