summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Pflug <f.pflug@pengutronix.de>2026-05-13 16:44:31 +0200
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-05-13 20:46:50 -0700
commit3608cfdc5b3374ffe31bae81ce25ec69d9d20252 (patch)
tree1942b7c5c14f6a9804d0cfd92ff5d878e8284233
parent37408fe618d4edbf5d86e8e9bc7ae1e3c0b70d5e (diff)
downloadmeta-openembedded-3608cfdc5b3374ffe31bae81ce25ec69d9d20252.tar.gz
pkcs11-provider: fix build error on 32 bit systems
PKCS11 Provider did not build on 32 bit systems. Fixed Upstream with https://github.com/openssl-projects/pkcs11-provider/pull/689 Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
-rw-r--r--meta-oe/recipes-support/pkcs11-provider/files/0001-Fix-i686-build-failures-in-cipher.c.patch62
-rw-r--r--meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_1.2.bb1
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/pkcs11-provider/files/0001-Fix-i686-build-failures-in-cipher.c.patch b/meta-oe/recipes-support/pkcs11-provider/files/0001-Fix-i686-build-failures-in-cipher.c.patch
new file mode 100644
index 0000000000..479608b8f3
--- /dev/null
+++ b/meta-oe/recipes-support/pkcs11-provider/files/0001-Fix-i686-build-failures-in-cipher.c.patch
@@ -0,0 +1,62 @@
1From aec4fe7e3c4d18cd5d0f98168df5884a141c6b69 Mon Sep 17 00:00:00 2001
2From: Simo Sorce <simo@redhat.com>
3Date: Thu, 19 Feb 2026 16:08:56 -0500
4Subject: [PATCH] Fix i686 build failures in cipher.c
5
6Update AEAD functions to use CK_ULONG pointers for lengths and
7introduce a temporary size_t variable for OSSL_PARAM calls. This
8corrects pointer type mismatches that caused build failures in
9Fedora Rawhide i686 scratch builds.
10
11Upstream-Status: Backport [aec4fe7e3c4d18cd5d0f98168df5884a141c6b69]
12
13Signed-off-by: Simo Sorce <simo@redhat.com>
14---
15 src/cipher.c | 11 ++++++-----
16 1 file changed, 6 insertions(+), 5 deletions(-)
17
18diff --git a/src/cipher.c b/src/cipher.c
19index faaa51b..4ccd3ad 100644
20--- a/src/cipher.c
21+++ b/src/cipher.c
22@@ -867,7 +867,7 @@ static CK_RV tls_aead_get_data(CK_MECHANISM_PTR mech, data_buffer *explicitiv,
23
24 static CK_RV tls_pre_aead(struct p11prov_cipher_ctx *cctx,
25 const unsigned char **in, size_t *inl,
26- unsigned char **out, size_t *outl)
27+ unsigned char **out, CK_ULONG *outl)
28 {
29 data_buffer iv = { 0 };
30 data_buffer tag = { 0 };
31@@ -906,7 +906,7 @@ static CK_RV tls_pre_aead(struct p11prov_cipher_ctx *cctx,
32 }
33
34 static CK_RV tls_post_aead(struct p11prov_cipher_ctx *cctx, unsigned char *out,
35- size_t *outl)
36+ CK_ULONG *outl)
37 {
38 data_buffer explicitiv = { 0 };
39 data_buffer tag = { 0 };
40@@ -1475,15 +1475,16 @@ static int p11prov_common_set_ctx_params(void *vctx, const OSSL_PARAM params[])
41 return RET_OSSL_ERR;
42 }
43
44- int ret = OSSL_PARAM_get_octet_string(
45- p, (void **)&gcm->pIv, gcm->ulIvLen, &gcm->ulIvFixedBits);
46+ size_t iv_size;
47+ int ret = OSSL_PARAM_get_octet_string(p, (void **)&gcm->pIv,
48+ gcm->ulIvLen, &iv_size);
49 if (ret != RET_OSSL_OK || gcm->pIv == NULL) {
50 P11PROV_raise(ctx->provctx, CKR_HOST_MEMORY,
51 "Memory allocation failed");
52 return RET_OSSL_ERR;
53 }
54
55- gcm->ulIvFixedBits = BYTES_TO_BITS(gcm->ulIvFixedBits);
56+ gcm->ulIvFixedBits = BYTES_TO_BITS(iv_size);
57 gcm->ivGenerator = CKG_GENERATE_COUNTER;
58 } else {
59 P11PROV_raise(ctx->provctx, CKR_MECHANISM_PARAM_INVALID,
60--
612.47.3
62
diff --git a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_1.2.bb b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_1.2.bb
index 1bdb4445e5..d95706d9e3 100644
--- a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_1.2.bb
+++ b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_1.2.bb
@@ -19,6 +19,7 @@ SRCREV = "c7a5c8b62a0ff012b16574f01651254ef7e664ee"
19 19
20SRC_URI = "git://github.com/latchset/${BPN}.git;branch=main;protocol=https" 20SRC_URI = "git://github.com/latchset/${BPN}.git;branch=main;protocol=https"
21 21
22SRC_URI += "file://0001-Fix-i686-build-failures-in-cipher.c.patch"
22 23
23inherit meson pkgconfig 24inherit meson pkgconfig
24 25