mbedtls_ssl_config min_tls_version, max_tls_version
Store the TLS version in tls_version instead of major, minor version num
Note: existing application use which accesses the struct member
(using MBEDTLS_PRIVATE) is not compatible on little-endian platforms,
but is compatible on big-endian platforms. For systems supporting
only TLSv1.2, the underlying values are the same (=> 3).
New setter functions are more type-safe,
taking argument as enum mbedtls_ssl_protocol_version:
mbedtls_ssl_conf_max_tls_version()
mbedtls_ssl_conf_min_tls_version()
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
diff --git a/library/ssl_client.c b/library/ssl_client.c
index 39b65e8..6177906 100644
--- a/library/ssl_client.c
+++ b/library/ssl_client.c
@@ -864,8 +864,8 @@
}
else
{
- ssl->minor_ver = ssl->conf->max_minor_ver;
- ssl->handshake->min_minor_ver = ssl->conf->min_minor_ver;
+ ssl->minor_ver = ssl->conf->max_tls_version & 0xFF;
+ ssl->handshake->min_minor_ver = ssl->conf->min_tls_version & 0xFF;
}
}