From 1ca297dd9cd5daaab9be45d210f0f4df814cea03 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 16 Nov 2024 13:27:45 -0800 Subject: tls: remove support for TLS 1.0 and 1.1. Those old algorithms are not used anywhere, and are not recommended. TLS 1.2 support has been prevalent for over a decade. --- src/supplemental/tls/mbedtls/tls.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'src/supplemental/tls/mbedtls') diff --git a/src/supplemental/tls/mbedtls/tls.c b/src/supplemental/tls/mbedtls/tls.c index 3dd39f7f..8b62cd7f 100644 --- a/src/supplemental/tls/mbedtls/tls.c +++ b/src/supplemental/tls/mbedtls/tls.c @@ -467,9 +467,8 @@ config_init(nng_tls_engine_config *cfg, enum nng_tls_mode mode) mbedtls_ssl_conf_authmode(&cfg->cfg_ctx, auth_mode); - // Default: we *require* TLS v1.2 or newer, which is also known as - // SSL v3.3. As of this writing, Mbed TLS still does not support - // version 1.3, and we would want to test it before enabling it here. + // We *require* TLS v1.2 or newer, which is also known as SSL + // v3.3. cfg->min_ver = MBEDTLS_SSL_MINOR_VERSION_3; #ifdef MBEDTLS_SSL_PROTO_TLS1_3 cfg->max_ver = MBEDTLS_SSL_MINOR_VERSION_4; @@ -689,16 +688,6 @@ config_version(nng_tls_engine_config *cfg, nng_tls_version min_ver, return (NNG_ENOTSUP); } switch (min_ver) { -#ifdef MBEDTLS_SSL_MINOR_VERSION_1 - case NNG_TLS_1_0: - v1 = MBEDTLS_SSL_MINOR_VERSION_1; - break; -#endif -#ifdef MBEDTLS_SSL_MINOR_VERSION_2 - case NNG_TLS_1_1: - v1 = MBEDTLS_SSL_MINOR_VERSION_2; - break; -#endif #ifdef MBEDTLS_SSL_MINOR_VERSION_3 case NNG_TLS_1_2: v1 = MBEDTLS_SSL_MINOR_VERSION_3; @@ -716,16 +705,6 @@ config_version(nng_tls_engine_config *cfg, nng_tls_version min_ver, } switch (max_ver) { -#ifdef MBEDTLS_SSL_MINOR_VERSION_1 - case NNG_TLS_1_0: - v2 = MBEDTLS_SSL_MINOR_VERSION_1; - break; -#endif -#ifdef MBEDTLS_SSL_MINOR_VERSION_2 - case NNG_TLS_1_1: - v2 = MBEDTLS_SSL_MINOR_VERSION_2; - break; -#endif #ifdef MBEDTLS_SSL_MINOR_VERSION_3 case NNG_TLS_1_2: v2 = MBEDTLS_SSL_MINOR_VERSION_3; -- cgit v1.2.3-70-g09d2