From: "flichtenheld (Code Review)" Date: Mon, 8 Dec 2025 16:59:38 +0000 References: Reply-To: frank@...2641..., openvpn-devel@lists.sourceforge.net Message-ID: <1c607a74fb6db5c3f9abe24e3de68396b847a5fb-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="IPNDRxb9r3E="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[release/2.6]: configure.ac: Remove use of PKCS11_HELPER_LIBS in mbedTLS checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openvpn-devel --IPNDRxb9r3E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, plaisthos. flichtenheld has uploaded this change for review. ( http://gerrit.openvpn.n= et/c/openvpn/+/1423?usp=3Demail ) Change subject: configure.ac: Remove use of PKCS11_HELPER_LIBS in mbedTLS c= hecks ...................................................................... configure.ac: Remove use of PKCS11_HELPER_LIBS in mbedTLS checks This code was copied over and over since many years, since commit 9a3f670248d6f519a399e65a7232e2196b5115db ("Fixed autoconf script to properly detect missing pkcs11 with polarssl"). It is unclear what exact purpose it served back then but probably it is obsolete. It is definitely wrong since it means that you get PKCS11_HELPER_LIBS even if you do not specify --enable-pkcs11. Change-Id: I317be5253d6563906dd3826421dc81f737beba76 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Message-Id: <20250716151857.385959-1-frank@...2641...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 187.html Signed-off-by: Gert Doering (cherry picked from commit ed690d1d58792f70b86b75b00c09df2ad96babca) --- M configure.ac 1 file changed, 8 insertions(+), 12 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/1423/1 diff --git a/configure.ac b/configure.ac index 307329d..e77fd47 100644 --- a/configure.ac +++ b/configure.ac @@ -801,14 +801,6 @@ ;; esac -PKG_CHECK_MODULES( - [PKCS11_HELPER], - [libpkcs11-helper-1 >=3D 1.11], - [have_pkcs11_helper=3D"yes"], - [] -) - - if test "$enable_dco" !=3D "no"; then enable_dco_arg=3D"$enable_dco" if test "${enable_iproute2}" =3D "yes"; then @@ -1022,13 +1014,12 @@ [mbedtls_ssl_init], [MBEDTLS_LIBS=3D"-lmbedtls -lmbedx509 -lmbedcrypto"], [AC_MSG_ERROR([Could not find mbed TLS.])], - [${PKCS11_HELPER_LIBS}] ) fi fi - CFLAGS=3D"${MBEDTLS_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}" - LIBS=3D"${MBEDTLS_LIBS} ${PKCS11_HELPER_LIBS} ${LIBS}" + CFLAGS=3D"${MBEDTLS_CFLAGS} ${CFLAGS}" + LIBS=3D"${MBEDTLS_LIBS} ${LIBS}" AC_MSG_CHECKING([mbedtls version]) AC_COMPILE_IFELSE( @@ -1399,7 +1390,12 @@ fi if test "${enable_pkcs11}" =3D "yes"; then - test "${have_pkcs11_helper}" !=3D "yes" && AC_MSG_ERROR([PKCS11 enabled b= ut libpkcs11-helper is missing]) + PKG_CHECK_MODULES( + [PKCS11_HELPER], + [libpkcs11-helper-1 >=3D 1.11], + [have_pkcs11_helper=3D"yes"], + [AC_MSG_ERROR([PKCS11 enabled but libpkcs11-helper is missing])] + ) OPTIONAL_PKCS11_HELPER_CFLAGS=3D"${PKCS11_HELPER_CFLAGS}" OPTIONAL_PKCS11_HELPER_LIBS=3D"${PKCS11_HELPER_LIBS}" AC_DEFINE([ENABLE_PKCS11], [1], [Enable PKCS11]) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1423?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: release/2.6 Gerrit-Change-Id: I317be5253d6563906dd3826421dc81f737beba76 Gerrit-Change-Number: 1423 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: cron2 --IPNDRxb9r3E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: cron2, plaisthos.

flichtenheld has uploaded this change for review.

View Ch= ange

configure.ac: Remove use of PKCS11_HELPER_LIBS in=
 mbedTLS checks

This code was copied over and over since many years,=
since commit 9a3f670248d6f519a399e65a7232e2196b5115db
("Fixed a= utoconf script to properly detect missing pkcs11
with polarssl"). I= t is unclear what exact purpose it
served back then but probably it is o= bsolete. It is
definitely wrong since it means that you get
PKCS11_HE= LPER_LIBS even if you do not specify
--enable-pkcs11.

Change-Id: = I317be5253d6563906dd3826421dc81f737beba76
Signed-off-by: Frank Lichtenhe= ld <frank@...2641...>
Acked-by: Arne Schwabe <arne-openvpn@...1386...= 227...>
Message-Id: <20250716151857.385959-1-frank@...2641...><= br>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/ms= g32187.html
Signed-off-by: Gert Doering <gert@...1296...>
(cher= ry picked from commit ed690d1d58792f70b86b75b00c09df2ad96babca)
---
M= configure.ac
1 file changed, 8 insertions(+), 12 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/chan=
ges/23/1423/1
diff --git a/configure.ac b/configure.ac
index 307329d..e77fd47 100644
--- a/configure.ac=
+++ b/configure.ac
@@ -801,14 +801,6 @@ ;;
esac

-PKG_CHECK_MODULES(
- [PKCS11_HELPER],
- [libpkcs11-helper-1 >=3D 1.11],
- [have_pkcs11_helper=3D"yes&quo= t;],
- []
-)
-
-<= /span>
if test "$enable_dco" !=3D "no"; then<= /span>
enable_dco_arg=3D"$enable_dco"
= if test "${enable_iproute2}" =3D "yes"; then@@ -1022,13 +1014,12 @@
[mbedtls_ssl_init],

[MBEDTLS_LIBS=3D"-lmbedtls -lmbedx509 -lmbedcrypto&= quot;],
[AC_MSG_ERROR([Could not find mbed TLS.])],
- [${PKCS11_HELPER_LIB= S}]
)
fi
fi=

- CFLAGS=3D= "${MBEDTLS_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}"
<= span style=3D"color: hsl(0, 100%, 40%);">- LIBS=3D"${MBEDTLS_LIBS} ${P= KCS11_HELPER_LIBS} ${LIBS}"

+ CFLAGS=3D"${MBEDTLS_CFLAGS} ${CFLAGS}"
+ LIBS=3D"${MBEDTLS_LIBS} ${= LIBS}"

AC_MSG_CHECKING([mbedtls ve= rsion])
AC_COMPILE_IFELSE(
@@ -1399,7 +13= 90,12 @@
fi

if test &qu= ot;${enable_pkcs11}" =3D "yes"; then
- test "${have_pkcs11_helper}" != =3D "yes" && AC_MSG_ERROR([PKCS11 enabled but libpkcs11-h= elper is missing])
+ = PKG_CHECK_MODULES(
+ = [PKCS11_HELPER],
+ = [libpkcs11-helper-1 >=3D 1.11],
+ [have_pkcs11_helper=3D"yes"],
+ [AC_MSG_ERROR([PKCS11 enabled but li= bpkcs11-helper is missing])]
+ )
OPTIONAL_PKCS11_HELPER_CFLAGS=3D"${PKCS1= 1_HELPER_CFLAGS}"
OPTIONAL_PKCS11_HELPER_LIBS=3D&quo= t;${PKCS11_HELPER_LIBS}"
AC_DEFINE([ENABLE_PKCS11], = [1], [Enable PKCS11])

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I317be5253d6563906dd3826421d= c81f737beba76
Gerrit-Change-Number: 1423
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
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: cron2 <gert@...1296...>= ;
= --IPNDRxb9r3E=--