From: "MaxF (Code Review)" Date: Tue, 17 Feb 2026 11:56:29 +0000 References: Reply-To: max@...2606..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="dw7U1h9Ap34="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Unbreak Mbed TLS 4 build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --dw7U1h9Ap34= 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/+/1538?usp=3Demail to review the following change. Change subject: Unbreak Mbed TLS 4 build ...................................................................... Unbreak Mbed TLS 4 build The previous Mbed TLS 4 change removed the mbedtls/version.h include from syshead.h. But this include in mbedtls_compat.h where it's needed. Also fix a warning by removing a size_t < 0 comparison. Change-Id: Ia5d330fe5c922aaa6948c1fb05c9a4947c833311 --- M src/openvpn/crypto_mbedtls.c M src/openvpn/mbedtls_compat.h 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/38/1538/1 diff --git a/src/openvpn/crypto_mbedtls.c b/src/openvpn/crypto_mbedtls.c index cba6bb5..e8931d7 100644 --- a/src/openvpn/crypto_mbedtls.c +++ b/src/openvpn/crypto_mbedtls.c @@ -700,7 +700,7 @@ md_full(const char *mdname, const uint8_t *src, size_t src_len, uint8_t *d= st) { const md_info_t *md =3D md_get(mdname); - if (md =3D=3D NULL || src_len < 0) + if (md =3D=3D NULL) { return false; } diff --git a/src/openvpn/mbedtls_compat.h b/src/openvpn/mbedtls_compat.h index 667529e..50739b6 100644 --- a/src/openvpn/mbedtls_compat.h +++ b/src/openvpn/mbedtls_compat.h @@ -36,6 +36,7 @@ #include #include +#include #if MBEDTLS_VERSION_NUMBER < 0x04000000 #include -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1538?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: Ia5d330fe5c922aaa6948c1fb05c9a4947c833311 Gerrit-Change-Number: 1538 Gerrit-PatchSet: 1 Gerrit-Owner: MaxF Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --dw7U1h9Ap34= 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

Unbreak Mbed TLS 4 build

The previou= s Mbed TLS 4 change removed the mbedtls/version.h include
from syshead.h= . But this include in mbedtls_compat.h where it's needed.

Also f= ix a warning by removing a size_t < 0 comparison.

Change-Id: Ia5d= 330fe5c922aaa6948c1fb05c9a4947c833311
---
M src/openvpn/crypto_mbedtl= s.c
M src/openvpn/mbedtls_compat.h
2 files changed, 2 insertions(+), = 1 deletion(-)

git pull ssh://gerrit.openvpn.net:=
29418/openvpn refs/changes/38/1538/1
diff --git a/src/openvpn/crypt=
o_mbedtls.c b/src/openvpn/crypto_mbedtls.c
index cba6bb5..e= 8931d7 100644
--- a/src/openvpn/crypto_mbedtls.c
= +++ b/src/openvpn/crypto_mbedtls.c
@@ -700,7 +700,7 @= @
md_full(const char *mdname, const uint8_t *src, size_t s= rc_len, uint8_t *dst)
{
const md_info= _t *md =3D md_get(mdname);
- if (md =3D=3D NULL || src_len < 0)
+ if (md =3D=3D NULL)
{
return false;
}
diff --git a/src/openvpn/mbedtls_compat.h b/src/openvpn/mbedtls_compat.h<= /span>
index 667529e..50739b6 100644
--- a/src/ope= nvpn/mbedtls_compat.h
+++ b/src/openvpn/mbedtls_compat.h
@@ -36,6 +36,7 @@

#include= <mbedtls/asn1.h>
#include <mbedtls/pk.h>

+#include <mbedtls/ver= sion.h>

#if MBEDTLS_VERSION_NUMBER &l= t; 0x04000000
#include <mbedtls/ctr_drbg.h>

To view, visit change 1538. To unsubscribe, or for = help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia5d330fe5c922aaa6948c1fb05c= 9a4947c833311
Gerrit-Change-Number: 1538
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...>
= --dw7U1h9Ap34=--