From: "MaxF (Code Review)" Date: Mon, 20 Apr 2026 20:51:46 +0000 References: Reply-To: max@...2606..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <47e300f887942a8821fe1c5e7c94e8d801e25281-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="R7x8f90rsyU="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Mbed TLS: Error out if we have no valid tls-groups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --R7x8f90rsyU= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1633?usp=3Demail to review the following change. Change subject: Mbed TLS: Error out if we have no valid tls-groups ...................................................................... Mbed TLS: Error out if we have no valid tls-groups Previously, when no valid groups were specified with the tls-groups option, the Mbed TLS build of OpenVPN would start up and run, but fail to complete a handshake, while the OpenSSL build would exit with an error. This commit changes the behavior of the Mbed TLS build to match the OpenSSL version. Change-Id: Ica5f37e525c3812609021750ecd3986c1420e2a4 Signed-off-by: Max Fillinger --- M src/openvpn/ssl_mbedtls.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/33/1633/1 diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index 85c771a..8a0f7d2 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -450,6 +450,12 @@ } } + /* Check if any groups were valid. */ + if (i =3D=3D 0) + { + msg(M_FATAL, "Error: All groups in \"%s\" are invalid or unsupport= ed.", groups); + } + /* Recent mbedtls versions state that the list of groups must be termi= nated * with 0. Older versions state that it must be terminated with MBEDTL= S_ECP_DP_NONE * which is also 0, so this works either way. */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1633?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ica5f37e525c3812609021750ecd3986c1420e2a4 Gerrit-Change-Number: 1633 Gerrit-PatchSet: 1 Gerrit-Owner: MaxF Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --R7x8f90rsyU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

MaxF would like plaisthos to review this change.

V= iew Change

Mbed TLS: Error out if we have no valid tls=
-groups

Previously, when no valid groups were specified with the tls= -groups
option, the Mbed TLS build of OpenVPN would start up and run, bu= t fail
to complete a handshake, while the OpenSSL build would exit with = an
error. This commit changes the behavior of the Mbed TLS build to matc= h
the OpenSSL version.

Change-Id: Ica5f37e525c3812609021750ecd398= 6c1420e2a4
Signed-off-by: Max Fillinger <maximilian.fillinger@...2925...= ...>
---
M src/openvpn/ssl_mbedtls.c
1 file changed, 6 insertio= ns(+), 0 deletions(-)

git pull ssh://gerrit.open=
vpn.net:29418/openvpn refs/changes/33/1633/1
diff --git a/src/openv=
pn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c
index 85c771a.= .8a0f7d2 100644
--- a/src/openvpn/ssl_mbedtls.c
<= span>+++ b/src/openvpn/ssl_mbedtls.c
@@ -450,6 +450,12 @@
}
}
+ /* Check if any groups w= ere valid. */
+ if= (i =3D=3D 0)
+ {<= /span>
+ msg(M_FATAL,= "Error: All groups in \"%s\" are invalid or unsupported.&qu= ot;, groups);
+ }<= /span>
+
= /* Recent mbedtls versions state that the list of groups must be terminat= ed
* with 0. Older versions state that it must be ter= minated with MBEDTLS_ECP_DP_NONE
* which is also 0, s= o this works either way. */

To view, vi= sit chan= ge 1633. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ica5f37e525c3812609021750ecd= 3986c1420e2a4
Gerrit-Change-Number: 1633
Gerrit-PatchSet: 1
Gerrit-Owner: MaxF <max@...2606...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --R7x8f90rsyU=--