From: "cron2 (Code Review)" Date: Thu, 4 Jul 2024 06:11:39 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., max@...2606... Message-ID: <968bf55e713cf83661fa95d9e2d7cd23bab32065-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="S9Uj7juyo4k="; 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 , plaisthos , flichtenheld Cc: openvpn-devel --S9Uj7juyo4k= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= MaxF. ( http://gerrit.openvpn.net/c/openvpn/+/684?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos 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(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/84/684/2 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: newpatchset --S9Uj7juyo4k= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by MaxF.

View Change

The following approvals got outdated and = were removed: Code-Review+2 by plaisthos

mbedtls: Warn if --tls-version-min is too low
Recent versions of mbedtls only support TLS 1.2. When the minimum
v= ersion is set to TLS 1.0 or 1.1, log a warning and use 1.2 as the
actual= minimum version.

Change-Id: Ibc641388d8016533c94dfef3618376f6dfa91f= 4e
Signed-off-by: Max Fillinger <maximilian.fillinger@...2507...><= br>Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Message-Id: &l= t;20240703174158.7137-1-gert@...1296...>
URL: https://www.mail-archiv= e.com/openvpn-devel@lists.sourceforge.net/msg28865.html
Signed-off-by: G= ert Doering <gert@...1296...>
---
M src/openvpn/options.c
1 = file changed, 9 insertions(+), 0 deletions(-)

git pull ssh://gerr=
it.openvpn.net:29418/openvpn refs/changes/84/684/2
diff --git a/src=
/openvpn/options.c b/src/openvpn/options.c
index dbe1425..6= 4e67aa 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;
= }
+
<= span style=3D"color: hsl(120, 100%, 40%);">+#ifdef ENABLE_CRYPTO_MBEDTLS
+ if (ver < T= LS_VER_1_2)
+ = {
+ msg(M_= WARN, "--tls-version-min %s is not supported by mbedtls, using 1.2&quo= t;, p[1]);
+ = ver =3D TLS_VER_1_2;
+ }
+#endif=
+
= options->ssl_flags &=3D
~(SSLF_T= LS_VERSION_MIN_MASK << SSLF_TLS_VERSION_MIN_SHIFT);
= options->ssl_flags |=3D (ver << SSLF_TLS_VERSION_MIN_SHIFT= );

To view, visit change 684. 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: newpatchset
--S9Uj7juyo4k=--