From: "MaxF (Code Review)" Date: Fri, 14 Jun 2024 11:34:38 +0000 References: Reply-To: max@...2606..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <4ba969b0779fc939adaa9c78f50a41b7b4bb4483-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="QDklFgBLwcA="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: mbedtls: Remove support for old TLS versions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --QDklFgBLwcA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/682?usp=3Demail to review the following change. Change subject: mbedtls: Remove support for old TLS versions ...................................................................... mbedtls: Remove support for old TLS versions Recent versions of mbedtls have dropped support for TLS 1.0 and 1.1. Rather than checking which versions are supported, drop support for everything before 1.2. Change-Id: Ia3883a26ac26df6bbb5353fb074a2e0f814737be Signed-off-by: Max Fillinger --- M src/openvpn/ssl_mbedtls.c 1 file changed, 1 insertion(+), 20 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/682/1 diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index a68588e..e25fb84 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -1040,12 +1040,8 @@ { #if defined(MBEDTLS_SSL_PROTO_TLS1_2) return TLS_VER_1_2; -#elif defined(MBEDTLS_SSL_PROTO_TLS1_1) - return TLS_VER_1_1; -#elif defined(MBEDTLS_SSL_PROTO_TLS1) - return TLS_VER_1_0; #else /* defined(MBEDTLS_SSL_PROTO_TLS1_2) */ - #error "mbedtls is compiled without support for TLS 1.0, 1.1 and 1.2." + #error "mbedtls is compiled without support for TLS 1.2." #endif /* defined(MBEDTLS_SSL_PROTO_TLS1_2) */ } @@ -1067,27 +1063,12 @@ switch (tls_ver) { -#if defined(MBEDTLS_SSL_PROTO_TLS1) - case TLS_VER_1_0: - *major =3D MBEDTLS_SSL_MAJOR_VERSION_3; - *minor =3D MBEDTLS_SSL_MINOR_VERSION_1; - break; -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) - case TLS_VER_1_1: - *major =3D MBEDTLS_SSL_MAJOR_VERSION_3; - *minor =3D MBEDTLS_SSL_MINOR_VERSION_2; - break; -#endif - #if defined(MBEDTLS_SSL_PROTO_TLS1_2) case TLS_VER_1_2: *major =3D MBEDTLS_SSL_MAJOR_VERSION_3; *minor =3D MBEDTLS_SSL_MINOR_VERSION_3; break; #endif - default: msg(M_FATAL, "%s: invalid or unsupported TLS version %d", __fu= nc__, tls_ver); break; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/682?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia3883a26ac26df6bbb5353fb074a2e0f814737be Gerrit-Change-Number: 682 Gerrit-PatchSet: 1 Gerrit-Owner: MaxF Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --QDklFgBLwcA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

MaxF would like plaisthos and flichtenheld to review th= is change.

Vi= ew Change

mbedtls: Remove support for old TLS versions

Recent ve= rsions of mbedtls have dropped support for TLS 1.0 and 1.1.
Rather than = checking which versions are supported, drop support for
everything befor= e 1.2.

Change-Id: Ia3883a26ac26df6bbb5353fb074a2e0f814737be
Signe= d-off-by: Max Fillinger <maximilian.fillinger@...2507...>
---
M= src/openvpn/ssl_mbedtls.c
1 file changed, 1 insertion(+), 20 deletions(= -)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/8=
2/682/1
diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mb=
edtls.c
index a68588e..e25fb84 100644
--- a= /src/openvpn/ssl_mbedtls.c
+++ b/src/openvpn/ssl_mbedtls.c<= /span>
@@ -1040,12 +1040,8 @@
{
= #if defined(MBEDTLS_SSL_PROTO_TLS1_2)
return TLS_VER_1= _2;
-#elif defined(MBED= TLS_SSL_PROTO_TLS1_1)
-= return TLS_VER_1_1;
-#elif defined(MBEDTLS_SSL_PROTO_TLS1)
- return TLS_VER_1_0;
#else /* defined= (MBEDTLS_SSL_PROTO_TLS1_2) */
- #error "mbedtls is compiled without support for TLS 1.0, 1= .1 and 1.2."
+ = #error "mbedtls is compiled without support for TLS 1.2."
#endif /* defined(MBEDTLS_SSL_PROTO_TLS1_2) */
= }

@@ -1067,27 +1063,12 @@

switch (tls_ver)
{
= -#if defined(MBEDTLS_SSL_PROTO_TL= S1)
- case TLS_V= ER_1_0:
- *m= ajor =3D MBEDTLS_SSL_MAJOR_VERSION_3;
- *minor =3D MBEDTLS_SSL_MINOR_VERSION_1;<= br>- break;
= -#endif
-
-#if defined(MBEDTLS_SSL_PROTO_TLS1_1)
- case TLS_VER_1_1:
- *major =3D MBEDTLS_SSL_MAJOR_VERSION= _3;
- *minor= =3D MBEDTLS_SSL_MINOR_VERSION_2;
- break;
-#endif
-
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
= case TLS_VER_1_2:
*major =3D MBEDTLS_SSL_MAJOR= _VERSION_3;
*minor =3D MBEDTLS_SSL_MINOR_VERSI= ON_3;
break;
#endif-
defau= lt:
msg(M_FATAL, "%s: invalid or unsuppor= ted TLS version %d", __func__, tls_ver);
= break;

To view, visit change 682. To unsubsc= ribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia3883a26ac26df6bbb5353fb074= a2e0f814737be
Gerrit-Change-Number: 682
Gerrit-PatchSet: 1
Gerrit-Owner: MaxF <max@...2606...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--QDklFgBLwcA=--