Skip to contentSkip to conversation

Change in openvpn[master]: Do not check for pkcs11-helper when pkcs11 is not enabled

Openvpn-devel plaisthos (Code Review) 1 participant 6 messages Jul 14, 2025 – Jul 16, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1752495948000.I152577b7d9b3b3a0d298971f47ba412d3f43d50d@...2715...

#1 lore raw

Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email

to review the following change.

Change subject: Do not check for pkcs11-helper when pkcs11 is not enabled
......................................................................

Do not check for pkcs11-helper when pkcs11 is not enabled

On my system with mac and homebrew this pulls in a version from homebrew that adds OpenSSL paths/flags from homebrew as well. Those flags then end up in various other locations.

Change-Id I152577b7d9b3b3a0d298971f47ba412d3f43d50d

---
M configure.ac

1 file changed, 8 insertions(+), 6 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/85/1085/1

configure.ac +8 -6
index 51c20ef..c1ee69c 100644
@@ -798,12 +798,14 @@
 		;;
 esac
 
-PKG_CHECK_MODULES(
-	[PKCS11_HELPER],
-	[libpkcs11-helper-1 >= 1.11],
-	[have_pkcs11_helper="yes"],
-	[]
-)
+if test "${enable_pkcs11}" = "yes"; then
+    PKG_CHECK_MODULES(
+        [PKCS11_HELPER],
+        [libpkcs11-helper-1 >= 1.11],
+        [have_pkcs11_helper="yes"],
+        []
+    )
+fi
 
 
 if test "$enable_dco" != "no"; then

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I152577b7d9b3b3a0d298971f47ba412d3f43d50d
Gerrit-Change-Number: 1085
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email )

Change subject: Do not check for pkcs11-helper when pkcs11 is not enabled
......................................................................

Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1:
We should dig deeper. Why does mbedtls configure code include PKCS11_HELPER flags?

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I152577b7d9b3b3a0d298971f47ba412d3f43d50d
Gerrit-Change-Number: 1085
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Mon, 14 Jul 2025 12:36:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email )

Change subject: Do not check for pkcs11-helper when pkcs11 is not enabled
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:

Quoted 1 line

We should dig deeper. […]

This is not limited to mbed TLS.

The test ldflags/cflags will also automatically add the PKCS11 LIBS/CFLAG flags if they are present.

TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS} ${OPTIONAL_LIBCAPNG_LIBS}" TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS} ${OPTIONAL_LIBCAPNG_CFLAGS}"

It felt easier to just not do the pkg config check and define the variables then do an if/fi around all the other uses.

For mbed + pkcs11, see this commit: https://github.com/openvpn/openvpn/commit/9a3f670248d6f519a399e65a7232e2196b5115db

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I152577b7d9b3b3a0d298971f47ba412d3f43d50d
Gerrit-Change-Number: 1085
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 14 Jul 2025 12:48:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment

#4 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email )

Change subject: Do not check for pkcs11-helper when pkcs11 is not enabled
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:
The initial reason for this weird behavior is commit 9a3f670248d6f519a399e65a7232e2196b5115db: "Fixed autoconf script to properly detect missing pkcs11 with polarssl." (from 2013). So probably that whole code needs a careful look.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I152577b7d9b3b3a0d298971f47ba412d3f43d50d
Gerrit-Change-Number: 1085
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 14 Jul 2025 12:51:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

#5 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email )

Change subject: Do not check for pkcs11-helper when pkcs11 is not enabled
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:

Quoted 1 line

The initial reason for this weird behavior is commit 9a3f670248d6f519a399e65a7232e2196b5115db: "Fixe […]

Proposing http://gerrit.openvpn.net/c/openvpn/+/1088 instead.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I152577b7d9b3b3a0d298971f47ba412d3f43d50d
Gerrit-Change-Number: 1085
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Wed, 16 Jul 2025 14:09:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment

#6 lore raw
In reply to a message not in the archive

plaisthos has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email )

Change subject: Do not check for pkcs11-helper when pkcs11 is not enabled
......................................................................

Abandoned

In favour of #1088
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1085?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I152577b7d9b3b3a0d298971f47ba412d3f43d50d
Gerrit-Change-Number: 1085
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: abandon