public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Simo Sorce <simo@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/tpm2-pkcs11] f44: OpenSSL 4 build fixes
Date: Mon, 10 Aug 2026 10:33:04 GMT	[thread overview]
Message-ID: <178635798426.1.2446222883596713237.rpms-tpm2-pkcs11-4c11b65b488c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/tpm2-pkcs11
            Branch : f44
            Commit : 4c11b65b488c784587c24ec752db4dc87ebb0fda
            Author : Simo Sorce <simo@redhat.com>
            Date   : 2026-04-17T17:07:08-04:00
            Stats  : +49/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/tpm2-pkcs11/c/4c11b65b488c784587c24ec752db4dc87ebb0fda?branch=f44

            Log:
            OpenSSL 4 build fixes

Signed-off-by: Simo Sorce <simo@redhat.com>

---
diff --git a/0001-Use-ASN1_STRING-accessors-for-compatibility.patch b/0001-Use-ASN1_STRING-accessors-for-compatibility.patch
new file mode 100644
index 0000000..caa6280
--- /dev/null
+++ b/0001-Use-ASN1_STRING-accessors-for-compatibility.patch
@@ -0,0 +1,43 @@
+From 20f906e23ae9b51e0cb39aed6f3d5a7b388c09be Mon Sep 17 00:00:00 2001
+From: Simo Sorce <simo@redhat.com>
+Date: Fri, 17 Apr 2026 17:05:33 -0400
+Subject: [PATCH] Use ASN1_STRING accessors for compatibility
+
+Replace direct access to the data and length members of ASN1_OCTET_STRING with
+ASN1_STRING_get0_data() and ASN1_STRING_length(). This prevents build errors
+by ensuring compatibility with OpenSSL 1.1.0 and later, which makes these
+structures opaque.
+
+Co-authored-by: Gemini <gemini@google.com>
+Signed-off-by: Simo Sorce <simo@redhat.com>
+---
+ src/lib/ssl_util.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/ssl_util.c b/src/lib/ssl_util.c
+index b53485b..672f884 100644
+--- a/src/lib/ssl_util.c
++++ b/src/lib/ssl_util.c
+@@ -198,7 +198,7 @@ static CK_RV get_EC_evp_pubkey(CK_ATTRIBUTE_PTR ecparams, CK_ATTRIBUTE_PTR ecpoi
+     }
+ 
+     if (OSSL_PARAM_BLD_push_octet_string(bld, OSSL_PKEY_PARAM_PUB_KEY,
+-    		os->data, os->length) != 1) {
++    		ASN1_STRING_get0_data(os), ASN1_STRING_length(os)) != 1) {
+     	SSL_UTIL_LOGE("OSSL_PARAM_BLD_push_octet_string(OSSL_PKEY_PARAM_PUB_KEY)");
+     	goto out;
+     }
+@@ -312,8 +312,8 @@ static CK_RV get_EC_evp_pubkey(CK_ATTRIBUTE_PTR ecparams, CK_ATTRIBUTE_PTR ecpoi
+     x = ecpoint->pValue;
+     ASN1_OCTET_STRING *os = d2i_ASN1_OCTET_STRING(NULL, &x, ecpoint->ulValueLen);
+     if (os) {
+-        x = os->data;
+-        k = o2i_ECPublicKey(&ecc, &x, os->length);
++        x = ASN1_STRING_get0_data(os);
++        k = o2i_ECPublicKey(&ecc, &x, ASN1_STRING_length(os));
+         ASN1_STRING_free(os);
+         if (!k) {
+             SSL_UTIL_LOGE("Could not update key with EC Points");
+-- 
+2.53.0
+

diff --git a/tpm2-pkcs11.spec b/tpm2-pkcs11.spec
index 1d86a69..f845738 100644
--- a/tpm2-pkcs11.spec
+++ b/tpm2-pkcs11.spec
@@ -2,7 +2,7 @@
 
 Name:		tpm2-pkcs11
 Version:	1.9.1
-Release:	7%{?candidate:.%{candidate}}%{?dist}
+Release:	8%{?candidate:.%{candidate}}%{?dist}
 Summary:	PKCS#11 interface for TPM 2.0 hardware
 
 License:	BSD-2-Clause
@@ -12,6 +12,8 @@ Source1:	https://github.com/tpm2-software/%{name}/releases/download/%{version}%{
 # William Roberts (Bill Roberts) key from pgp.mit.edu
 Source2:	gpgkey-8E1F50C1.gpg
 
+Patch1:         0001-Use-ASN1_STRING-accessors-for-compatibility.patch
+
 BuildRequires:	gcc
 BuildRequires:	make
 BuildRequires:	python3
@@ -111,6 +113,9 @@ make check
 
 
 %changelog
+* Fri Apr 17 2026 Simo Sorce <ssorce@redhat.com> - 1.9.1-8
+- OpenSSL 4 build fixes
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

                 reply	other threads:[~2026-08-10 10:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178635798426.1.2446222883596713237.rpms-tpm2-pkcs11-4c11b65b488c@fedoraproject.org \
    --to=simo@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox