From: "cron2 (Code Review)" Date: Thu, 4 Jul 2024 06:11:41 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., max@...2606... Message-ID: <968bf55e713cf83661fa95d9e2d7cd23bab32065-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="wXsuQ+zCtf0="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: mbedtls: Warn if --tls-version-min is too low List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: MaxF Cc: plaisthos , flichtenheld , openvpn-devel --wXsuQ+zCtf0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/68= 4?usp=3Demail ) Change subject: mbedtls: Warn if --tls-version-min is too low ...................................................................... mbedtls: Warn if --tls-version-min is too low Recent versions of mbedtls only support TLS 1.2. When the minimum version is set to TLS 1.0 or 1.1, log a warning and use 1.2 as the actual minimum version. Change-Id: Ibc641388d8016533c94dfef3618376f6dfa91f4e Signed-off-by: Max Fillinger Acked-by: Arne Schwabe Message-Id: <20240703174158.7137-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 865.html Signed-off-by: Gert Doering --- M src/openvpn/options.c 1 file changed, 9 insertions(+), 0 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index dbe1425..64e67aa 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -8942,6 +8942,15 @@ msg(msglevel, "unknown tls-version-min parameter: %s", p[1]); goto err; } + +#ifdef ENABLE_CRYPTO_MBEDTLS + if (ver < TLS_VER_1_2) + { + msg(M_WARN, "--tls-version-min %s is not supported by mbedtls,= using 1.2", p[1]); + ver =3D TLS_VER_1_2; + } +#endif + options->ssl_flags &=3D ~(SSLF_TLS_VERSION_MIN_MASK << SSLF_TLS_VERSION_MIN_SHIFT); options->ssl_flags |=3D (ver << SSLF_TLS_VERSION_MIN_SHIFT); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/684?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: Ibc641388d8016533c94dfef3618376f6dfa91f4e Gerrit-Change-Number: 684 Gerrit-PatchSet: 2 Gerrit-Owner: MaxF Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --wXsuQ+zCtf0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

mbedtls: Warn if --tls-version-min is too low<=
br>
Recent versions of mbedtls only support TLS 1.2. When the minimumversion is set to TLS 1.0 or 1.1, log a warning and use 1.2 as the
actu= al minimum version.

Change-Id: Ibc641388d8016533c94dfef3618376f6dfa9= 1f4e
Signed-off-by: Max Fillinger <maximilian.fillinger@...2507...>= ;
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Message-Id: = <20240703174158.7137-1-gert@...1296...>
URL: https://www.mail-arch= ive.com/openvpn-devel@lists.sourceforge.net/msg28865.html
Signed-off-by:= Gert Doering <gert@...1296...>
---
M src/openvpn/options.c
= 1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index dbe1425..64e67aa 100644
--- a/src/openvpn/options.= c
+++ b/src/openvpn/options.c
@@ -8942,6 +8= 942,15 @@
msg(msglevel, "unknown tls-vers= ion-min parameter: %s", p[1]);
goto err;<= /span>
}
+
+#ifdef ENABL= E_CRYPTO_MBEDTLS
+ = if (ver < TLS_VER_1_2)
+ {
= + msg(M_WARN, "--tls-version-min %s is not supported by mbe= dtls, using 1.2", p[1]);
+ ver =3D TLS_VER_1_2;
+ }
+#endif
+=
options->ssl_flags &=3D
= ~(SSLF_TLS_VERSION_MIN_MASK << SSLF_TLS_VERSION_MIN_SHIFT)= ;
options->ssl_flags |=3D (ver << SSLF_TL= S_VERSION_MIN_SHIFT);

To view, visit change 684<= /a>. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc641388d8016533c94dfef3618= 376f6dfa91f4e
Gerrit-Change-Number: 684
Gerrit-PatchSet: 2
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-MessageType: merged
--wXsuQ+zCtf0=--