package/libp11: bump version to 0.4.18

https://github.com/OpenSC/libp11/blob/libp11-0.4.18/NEWS

Removed all patches which are included in this release.

Switched to sha256 tarball hash provided by upstream.

Apply the fix for enginesdir to the newly introduced configure option
--with-modulesdir, added in version 0.4.14, as well:
8ff7952a81

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Bernd Kuhls
2026-04-20 19:34:12 +02:00
committed by Julien Olivain
parent a5366d13ba
commit fe7ad9e3a2
5 changed files with 5 additions and 113 deletions

View File

@@ -535,7 +535,6 @@ package/liboping/0002-Open-raw-sockets-when-adding-hosts-not-when-doing-th.patch
package/liboping/0003-Fix-compile-break-with-GCC-7-buffer-overflow-with-snprintf.patch lib_patch.Upstream package/liboping/0003-Fix-compile-break-with-GCC-7-buffer-overflow-with-snprintf.patch lib_patch.Upstream
package/liboping/0004-Fix-compile-error-on-GCC-7.patch lib_patch.Upstream package/liboping/0004-Fix-compile-error-on-GCC-7.patch lib_patch.Upstream
package/liboping/0005-src-oping.c-always-use-s-style-format-for-printf-sty.patch lib_patch.Upstream package/liboping/0005-src-oping.c-always-use-s-style-format-for-printf-sty.patch lib_patch.Upstream
package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch lib_patch.Upstream
package/libpthsem/0001-fix-build-on-linux-3.x-host.patch lib_patch.Upstream package/libpthsem/0001-fix-build-on-linux-3.x-host.patch lib_patch.Upstream
package/libressl/0001-always-expose-SSL_OP_NO_TLSv1_3.patch lib_patch.Upstream package/libressl/0001-always-expose-SSL_OP_NO_TLSv1_3.patch lib_patch.Upstream
package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch lib_patch.Upstream package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch lib_patch.Upstream

View File

@@ -1,42 +0,0 @@
From ba44b87318ed89e489fa3ce0a5d66002afa2bd6c Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 12 Aug 2022 11:54:54 +0200
Subject: [PATCH] src/p11_attr.c: fix build with gcc 4.8
Fix the following build failure with gcc 4.8 raised since version 0.4.12
and
https://github.com/OpenSC/libp11/commit/639a4b6463278c0119a2ec60b261da3e5330fb33:
p11_attr.c: In function 'pkcs11_zap_attrs':
p11_attr.c:167:2: error: 'for' loop initial declarations are only allowed in C99 mode
for (unsigned i = 0; i < 32; i++) {
^
p11_attr.c:167:2: note: use option -std=c99 or -std=gnu99 to compile your code
Fixes:
- http://autobuild.buildroot.org/results/4391020fb5738cc8c26dc53783a6228bbf76473a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/OpenSC/libp11/commit/ba44b87318ed89e489fa3ce0a5d66002afa2bd6c]
---
src/p11_attr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/p11_attr.c b/src/p11_attr.c
index d49456ff..d425241a 100644
--- a/src/p11_attr.c
+++ b/src/p11_attr.c
@@ -162,9 +162,11 @@ void pkcs11_addattr_obj(PKCS11_TEMPLATE *tmpl, int type, pkcs11_i2d_fn enc, void
void pkcs11_zap_attrs(PKCS11_TEMPLATE *tmpl)
{
+ unsigned int i;
+
if (!tmpl->allocated)
return;
- for (unsigned i = 0; i < 32; i++) {
+ for (i = 0; i < 32; i++) {
if (tmpl->allocated & (1<<i))
OPENSSL_free(tmpl->attrs[i].pValue);
}

View File

@@ -1,67 +0,0 @@
From 89ccb1f097f56a0933f881af051422b8d67e457f Mon Sep 17 00:00:00 2001
From: dlegault <dlegault@blackberry.com>
Date: Fri, 2 Sep 2022 12:01:23 -0400
Subject: [PATCH] Change bool attribute true/false names to _true/_false
This prevents conflicts with true/false defined in stdbool.h
fixes #472
Upstream: https://github.com/OpenSC/libp11/commit/89ccb1f097f56a0933f881af051422b8d67e457f
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
src/p11_attr.c | 6 +++---
src/p11_ec.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/p11_attr.c b/src/p11_attr.c
index d425241a..a420efad 100644
--- a/src/p11_attr.c
+++ b/src/p11_attr.c
@@ -123,9 +123,9 @@ unsigned int pkcs11_addattr(PKCS11_TEMPLATE *tmpl, int type, void *data, size_t
void pkcs11_addattr_bool(PKCS11_TEMPLATE *tmpl, int type, int value)
{
- static CK_BBOOL true = CK_TRUE;
- static CK_BBOOL false = CK_FALSE;
- pkcs11_addattr(tmpl, type, value ? &true : &false, sizeof(CK_BBOOL));
+ static CK_BBOOL _true = CK_TRUE;
+ static CK_BBOOL _false = CK_FALSE;
+ pkcs11_addattr(tmpl, type, value ? &_true : &_false, sizeof(CK_BBOOL));
}
void pkcs11_addattr_s(PKCS11_TEMPLATE *tmpl, int type, const char *s)
diff --git a/src/p11_ec.c b/src/p11_ec.c
index 4fb4efc3..16e3b3af 100644
--- a/src/p11_ec.c
+++ b/src/p11_ec.c
@@ -590,22 +590,22 @@ static int pkcs11_ecdh_derive(unsigned char **out, size_t *outlen,
CK_MECHANISM mechanism;
int rv;
- CK_BBOOL true = TRUE;
- CK_BBOOL false = FALSE;
+ CK_BBOOL _true = TRUE;
+ CK_BBOOL _false = FALSE;
CK_OBJECT_HANDLE newkey = CK_INVALID_HANDLE;
CK_OBJECT_CLASS newkey_class= CKO_SECRET_KEY;
CK_KEY_TYPE newkey_type = CKK_GENERIC_SECRET;
CK_ULONG newkey_len = key_len;
CK_OBJECT_HANDLE *tmpnewkey = (CK_OBJECT_HANDLE *)outnewkey;
CK_ATTRIBUTE newkey_template[] = {
- {CKA_TOKEN, &false, sizeof(false)}, /* session only object */
+ {CKA_TOKEN, &_false, sizeof(_false)}, /* session only object */
{CKA_CLASS, &newkey_class, sizeof(newkey_class)},
{CKA_KEY_TYPE, &newkey_type, sizeof(newkey_type)},
{CKA_VALUE_LEN, &newkey_len, sizeof(newkey_len)},
- {CKA_SENSITIVE, &false, sizeof(false) },
- {CKA_EXTRACTABLE, &true, sizeof(true) },
- {CKA_ENCRYPT, &true, sizeof(true)},
- {CKA_DECRYPT, &true, sizeof(true)}
+ {CKA_SENSITIVE, &_false, sizeof(_false) },
+ {CKA_EXTRACTABLE, &_true, sizeof(_true) },
+ {CKA_ENCRYPT, &_true, sizeof(_true)},
+ {CKA_DECRYPT, &_true, sizeof(_true)}
};
memset(&mechanism, 0, sizeof(mechanism));

View File

@@ -1,3 +1,4 @@
# From https://github.com/OpenSC/libp11/releases/tag/libp11-0.4.18
sha256 9292de67ca73aba1deacf577c9086b595765f36ef47712cfeb49fa31f6e772fb libp11-0.4.18.tar.gz
# Locally computed: # Locally computed:
sha256 1e1a2533b3fcc45fde4da64c9c00261b1047f14c3f911377ebd1b147b3321cfd libp11-0.4.12.tar.gz
sha256 d80c9d084ebfb50ea1ed91bfbc2410d6ce542097a32c43b00781b83adcb8c77f COPYING sha256 d80c9d084ebfb50ea1ed91bfbc2410d6ce542097a32c43b00781b83adcb8c77f COPYING

View File

@@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
LIBP11_VERSION = 0.4.12 LIBP11_VERSION = 0.4.18
LIBP11_SITE = https://github.com/OpenSC/libp11/releases/download/libp11-$(LIBP11_VERSION) LIBP11_SITE = https://github.com/OpenSC/libp11/releases/download/libp11-$(LIBP11_VERSION)
LIBP11_DEPENDENCIES = openssl host-pkgconf LIBP11_DEPENDENCIES = openssl host-pkgconf
LIBP11_INSTALL_STAGING = YES LIBP11_INSTALL_STAGING = YES
@@ -14,7 +14,8 @@ LIBP11_LICENSE_FILES = COPYING
# pkg-config returns a libcrypto enginesdir prefixed with the sysroot, # pkg-config returns a libcrypto enginesdir prefixed with the sysroot,
# so let's rip it out. # so let's rip it out.
LIBP11_CONF_OPTS = \ LIBP11_CONF_OPTS = \
--with-enginesdir=`$(PKG_CONFIG_HOST_BINARY) --variable enginesdir libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'` --with-enginesdir=`$(PKG_CONFIG_HOST_BINARY) --variable enginesdir libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'` \
--with-modulesdir=`$(PKG_CONFIG_HOST_BINARY) --variable modulesdir libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'`
ifeq ($(BR2_PACKAGE_P11_KIT),y) ifeq ($(BR2_PACKAGE_P11_KIT),y)
LIBP11_CONF_OPTS += --with-pkcs11-module=/usr/lib/p11-kit-proxy.so LIBP11_CONF_OPTS += --with-pkcs11-module=/usr/lib/p11-kit-proxy.so