Skip to contentSkip to conversation

package/openvpn: enable pam plugin support

PATCH New aduskett at gmail.com 2 participants 5 messages Oct 30, 2019 – Apr 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/openvpn: enable pam plugin support

From: Adam Duskett <[email protected]>

If the linux-pam package is selected, add the package to the dependency list and explicitly set --enable-plugin-auth-pam.

---
Changes v1 -> v2:
- Changed from an explicit option to an automatic one. (Arnout)
- Updated commit message to reflect the above.
- Switched tabs for spaces. (Arnout)

 package/openvpn/openvpn.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/openvpn/openvpn.mk +7 -1
index 277b072deb..8ee9c1a4b4 100644
@@ -11,7 +11,6 @@ OPENVPN_DEPENDENCIES = host-pkgconf openssl
 OPENVPN_LICENSE = GPL-2.0
 OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
 OPENVPN_CONF_OPTS = \
-	--disable-plugin-auth-pam \
 	--enable-iproute2 \
 	--with-crypto-library=openssl \
 	$(if $(BR2_STATIC_LIBS),--disable-plugins)
@@ -45,6 +44,13 @@ else
 OPENVPN_CONF_OPTS += --disable-selinux
 endif
 
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+OPENVPN_DEPENDENCIES += linux-pam
+OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
+else
+OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 OPENVPN_DEPENDENCIES += systemd
 OPENVPN_CONF_OPTS += --enable-systemd
Signature · 1 line
2.23.0
#1 lore raw

PATCH v2 1/1 pkcs11-helper: new package

From: Adam Duskett <[email protected]>

pkcs11-helper is a library that simplifies the interaction with PKCS#11 providers for end-user applications. Pkcs11-helper allows using multiple PKCS#11 providers at the same time, enumerating available token certificates, or selecting a certificate directly by serialized id, handling card removal and card insert events, handling card re-insert to a different slot, supporting session expiration and much more all using a simple API.

---
Changes v1 -> v2:
- Moved the pkcs11-helper- prefix from PKCS11_HELPER_VERSION to PKCS11_HELPER_SITE. (Arnout)
- Changed PKCS11_HELPER_LICENSE to read GPL-2.0 or BSD-3-Clause. (Arnout)
- Added COPYING.BSD and COPYING.GPL to PKCS11_HELPER_LICENSE_FILES. (Arnout)
- Removed --disable-dependency-tracking from PKCS11_HELPER_CONF_OPTS. (Arnout)

 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/pkcs11-helper/Config.in          | 51 ++++++++++++++++++++++++
 package/pkcs11-helper/pkcs11-helper.hash |  5 +++
 package/pkcs11-helper/pkcs11-helper.mk   | 50 +++++++++++++++++++++++
 5 files changed, 108 insertions(+)
 create mode 100644 package/pkcs11-helper/Config.in
 create mode 100644 package/pkcs11-helper/pkcs11-helper.hash
 create mode 100644 package/pkcs11-helper/pkcs11-helper.mk
DEVELOPERS +1 -0
index cdd44be37c..32e8d5ee8f 100644
@@ -52,6 +52,7 @@ F:	package/nginx-naxsi/
 F:	package/openjdk/
 F:	package/openjdk-bin/
 F:	package/php/
+F:	package/pkcs11-helper/
 F:	package/policycoreutils/
 F:	package/python3/
 F:	package/python-aioredis/
package/Config.in +1 -0
index dc5ec56d6b..c1f8d2dcbe 100644
@@ -1259,6 +1259,7 @@ menu "Crypto"
 	source "package/mbedtls/Config.in"
 	source "package/nettle/Config.in"
 	source "package/openssl/Config.in"
+	source "package/pkcs11-helper/Config.in"
 	source "package/rhash/Config.in"
 	source "package/tinydtls/Config.in"
 	source "package/tpm2-tss/Config.in"
package/pkcs11-helper/Config.in new file +51 -0

51 lines not on this page · raw message

package/pkcs11-helper/pkcs11-helper.hash new file +5 -0
new file mode 100644
index 0000000000..c0411a2f45
@@ -0,0 +1,5 @@
+# Locally computed
+sha256  fbcec9dd15a71d6ef22b09f63934c66d7d0292fefbaf3a60703ee4a9a73bf6a5  pkcs11-helper-1.25.1.tar.gz
+sha256  808705ac1daafe07a76431929575c5712a8693977a39ec9102aed25f030754d9  COPYING
+sha256  865496cf23a6c792739ff2f9ea11e95ac99db89cfe3780a295b4e1495a9c19fe  COPYING.BSD
+sha256  cd2e7d63a11058f19c58b06fb8c759140ce70788369dce6e6e9db40d3475021e  COPYING.GPL
package/pkcs11-helper/pkcs11-helper.mk new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.23.0
#2 lore raw

PATCH v2 1/1 pkcs11-helper: new package

Hello,

The commit title was not correct, should have been:

package/pkcs11-helper: new package

Quoted 17 lines · On Tue, 29 Oct 2019 17:56:03 -0700 aduskett at gmail.com wrote:
package/pkcs11-helper/Config.in new file +17 -0
+config BR2_PACKAGE_PKCS11_HELPER_GNUTLS_ENGINE
+	bool "gnutls engine support"
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_WCHAR
+	select BR2_PACKAGE_GNUTLS
+
+comment "gnutls support needs a toolchain w/ wchar, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+
+config BR2_PACKAGE_PKCS11_HELPER_MBEDTLS_ENGINE
+	bool "mbedtls engine support"
+	select BR2_PACKAGE_MBEDTLS
+
+config BR2_PACKAGE_PKCS11_HELPER_NSS_ENGINE
+	bool "nss engine support"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
+	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr

package/pkcs11-helper/Config.in line 49

Quoted 10 lines
package/pkcs11-helper/Config.in new file +10 -0
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_LIBNSS
+
+comment "nss support needs a toolchain w/ threads, dynamic library"
+	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+
+config BR2_PACKAGE_PKCS11_HELPER_OPENSSL_ENGINE
+	bool "openssl engine support"
+	select BR2_PACKAGE_OPENSSL

I have dropped all those sub-options, and replaced them by automatic detection in the .mk file: we enable the crypto backends depending on which packages are available.

Applied with those changes. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v2 1/1 package/openvpn: add pkcs11 support

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

If the pkcs11-helper package is selected, add the package to the dependency list and explicitly set --enable-pkcs11.

---
 package/openvpn/openvpn.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/openvpn/openvpn.mk +7 -0
index 8ee9c1a4b4..e966a3b628 100644
@@ -51,6 +51,13 @@ else
 OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
 endif
 
+ifeq ($(BR2_PACKAGE_PKCS11_HELPER),y)
+OPENVPN_DEPENDENCIES += pkcs11-helper
+OPENVPN_CONF_OPTS += --enable-pkcs11
+else
+OPENVPN_CONF_OPTS += --disable-pkcs11
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 OPENVPN_DEPENDENCIES += systemd
 OPENVPN_CONF_OPTS += --enable-systemd
Signature · 1 line
2.23.0
#4 lore raw

PATCH v2 1/1 package/openvpn: add pkcs11 support

Quoted 9 lines · On Tue, 29 Oct 2019 17:56:04 -0700 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

If the pkcs11-helper package is selected, add the package to the dependency list and explicitly set --enable-pkcs11.

---
 package/openvpn/openvpn.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com