diff mbox series

[meta-security] tpm2-pkcs11: Upgrade 1.9.2 -> 1.10.1

Message ID 20260907071440.1685177-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-security] tpm2-pkcs11: Upgrade 1.9.2 -> 1.10.1 | expand

Commit Message

Khem Raj Sept. 7, 2026, 7:14 a.m. UTC
Fixes the build against OpenSSL 4.0, which completes the opaquing of
struct asn1_string_st:

  src/lib/ssl_util.c:201:9: error: incomplete definition of type
      'ASN1_OCTET_STRING' (aka 'struct asn1_string_st')

Upstream switched both call sites in ssl_util.c to the
ASN1_STRING_get0_data()/ASN1_STRING_length() accessors, so the upgrade
is all that is needed, no local patch.

Drop 0001-src-lib-tpm-return-NULL-for-twist-on-auth-failure.patch, it is
already applied upstream in this release (PR #923) and now fails to
apply.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 ...eturn-NULL-for-twist-on-auth-failure.patch | 28 -------------------
 ...-pkcs11_1.9.2.bb => tpm2-pkcs11_1.10.1.bb} |  3 +-
 2 files changed, 1 insertion(+), 30 deletions(-)
 delete mode 100644 meta-tpm/recipes-tpm2/tpm2-pkcs11/files/0001-src-lib-tpm-return-NULL-for-twist-on-auth-failure.patch
 rename meta-tpm/recipes-tpm2/tpm2-pkcs11/{tpm2-pkcs11_1.9.2.bb => tpm2-pkcs11_1.10.1.bb} (91%)
diff mbox series

Patch

diff --git a/meta-tpm/recipes-tpm2/tpm2-pkcs11/files/0001-src-lib-tpm-return-NULL-for-twist-on-auth-failure.patch b/meta-tpm/recipes-tpm2/tpm2-pkcs11/files/0001-src-lib-tpm-return-NULL-for-twist-on-auth-failure.patch
deleted file mode 100644
index 2992b11..0000000
--- a/meta-tpm/recipes-tpm2/tpm2-pkcs11/files/0001-src-lib-tpm-return-NULL-for-twist-on-auth-failure.patch
+++ /dev/null
@@ -1,28 +0,0 @@ 
-From 0db779aecaae93633be963ffb8fdb097c85cc166 Mon Sep 17 00:00:00 2001
-From: Peter Marko <peter.marko@siemens.com>
-Date: Thu, 9 Apr 2026 00:00:00 +0000
-Subject: [PATCH] src/lib/tpm: return NULL for twist on auth failure
-
-`tpm_unseal` returns `twist` (a const char pointer alias). Returning
-`false` in the error path is a type mismatch that fails with stricter
-compiler settings. Return `NULL` instead.
-
-Upstream-Status: Submitted [https://github.com/tpm2-software/tpm2-pkcs11/pull/923]
-Signed-off-by: Peter Marko <peter.marko@siemens.com>
----
- src/lib/tpm.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/tpm.c b/src/lib/tpm.c
-index 5fff5d5..c51d984 100644
---- a/src/lib/tpm.c
-+++ b/src/lib/tpm.c
-@@ -1037,7 +1037,7 @@ twist tpm_unseal(tpm_ctx *ctx, uint32_t handle, twist objauth) {
- 
-     bool result = set_esys_auth(ctx->esys_ctx, handle, objauth);
-     if (!result) {
--        return false;
-+        return NULL;
-     }
- 
-     TPM2B_SENSITIVE_DATA *unsealed_data = NULL;
diff --git a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.2.bb b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.10.1.bb
similarity index 91%
rename from meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.2.bb
rename to meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.10.1.bb
index 1a671bc..b5bf6c1 100644
--- a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.2.bb
+++ b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.10.1.bb
@@ -8,9 +8,8 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=0fc19f620a102768d6dbd1e7166e78ab"
 DEPENDS = "autoconf-archive pkgconfig sqlite3 openssl libtss2-dev tpm2-tools libyaml p11-kit python3-setuptools-native"
 
 SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz"
-SRC_URI += "file://0001-src-lib-tpm-return-NULL-for-twist-on-auth-failure.patch"
 
-SRC_URI[sha256sum] = "1bdabdaed6a5fa4ce8a1e82307f4612c30e30b0a0415e1bc7d9c30f713227480"
+SRC_URI[sha256sum] = "f3315d17811f918779a1046ba20e49060a40b2b586a06ab013ff8c8da53752e4"
 
 UPSTREAM_CHECK_URI = "https://github.com/tpm2-software/${BPN}/releases"