aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/tls/mbedtls
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-16 13:27:45 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-16 13:53:28 -0800
commit1ca297dd9cd5daaab9be45d210f0f4df814cea03 (patch)
treea02dfe064e3a768b976407af62ab988202dcef9c /src/supplemental/tls/mbedtls
parent9ecd18c0089195ad914f68137e7671c267e55a99 (diff)
downloadnng-1ca297dd9cd5daaab9be45d210f0f4df814cea03.tar.gz
nng-1ca297dd9cd5daaab9be45d210f0f4df814cea03.tar.bz2
nng-1ca297dd9cd5daaab9be45d210f0f4df814cea03.zip
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.
Diffstat (limited to 'src/supplemental/tls/mbedtls')
-rw-r--r--src/supplemental/tls/mbedtls/tls.c25
1 files changed, 2 insertions, 23 deletions
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;