From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>,
Alistair Francis <alistair.francis@wdc.com>,
Martin Jansa <martin.jansa@gmail.com>
Subject: [meta-oe][PATCH 3/3] libspdm: Fix build with openssl 3.5
Date: Fri, 11 Apr 2025 18:03:10 -0700 [thread overview]
Message-ID: <20250412010310.1167351-3-raj.khem@gmail.com> (raw)
In-Reply-To: <20250412010310.1167351-1-raj.khem@gmail.com>
Backport new API signature, since the vendored version of openssl in
libspdm is 3.0.14, asn1.h has to sync for providing it.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Alistair Francis <alistair.francis@wdc.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
---
...port-API-introduced-in-openssl-3.5.0.patch | 33 +++++++++++++++++++
.../recipes-support/libspdm/libspdm_3.7.0.bb | 3 +-
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/libspdm/libspdm/0001-Backport-API-introduced-in-openssl-3.5.0.patch
diff --git a/meta-oe/recipes-support/libspdm/libspdm/0001-Backport-API-introduced-in-openssl-3.5.0.patch b/meta-oe/recipes-support/libspdm/libspdm/0001-Backport-API-introduced-in-openssl-3.5.0.patch
new file mode 100644
index 0000000000..2df9a18c68
--- /dev/null
+++ b/meta-oe/recipes-support/libspdm/libspdm/0001-Backport-API-introduced-in-openssl-3.5.0.patch
@@ -0,0 +1,33 @@
+From 92f6c3d8fa26d9019ba27e0c1aa894517ada93b9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 11 Apr 2025 17:47:05 -0700
+Subject: [PATCH] Backport API introduced in openssl 3.5.0
+
+This commit [1] introduced this new API which is used by pem.h from
+openssl and it should be provided by asn1.h which is vendored here so
+it goes out of sync and causes build errors e.g
+
+In file included from ./os_stub/cryptlib_openssl/pk/x509.c:18:
+/usr/include/openssl/pem.h:399:28: error: unknown type name 'OSSL_i2d_of_void_ctx'
+ 399 | int PEM_ASN1_write_bio_ctx(OSSL_i2d_of_void_ctx *i2d, void *vctx,
+
+[1] https://github.com/openssl/openssl/commit/35f6e7ea02b599d5aaf220b4720cbadd946d8023
+
+Upstream-Status: Submitted [https://github.com/DMTF/libspdm/pull/3033]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ os_stub/openssllib/openssl_gen/openssl/asn1.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/os_stub/openssllib/openssl_gen/openssl/asn1.h b/os_stub/openssllib/openssl_gen/openssl/asn1.h
+index a90152ee..fcfbe42e 100644
+--- a/os_stub/openssllib/openssl_gen/openssl/asn1.h
++++ b/os_stub/openssllib/openssl_gen/openssl/asn1.h
+@@ -368,6 +368,7 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
+
+ typedef void *d2i_of_void(void **, const unsigned char **, long);
+ typedef int i2d_of_void(const void *, unsigned char **);
++typedef int OSSL_i2d_of_void_ctx(const void *, unsigned char **, void *vctx);
+
+ /*-
+ * The following macros and typedefs allow an ASN1_ITEM
diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.7.0.bb b/meta-oe/recipes-support/libspdm/libspdm_3.7.0.bb
index a3012e10bd..e5915aa795 100644
--- a/meta-oe/recipes-support/libspdm/libspdm_3.7.0.bb
+++ b/meta-oe/recipes-support/libspdm/libspdm_3.7.0.bb
@@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7"
DEPENDS = "openssl"
-SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https"
+SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https \
+ file://0001-Backport-API-introduced-in-openssl-3.5.0.patch"
SRCREV = "1be116c7b7713fa9003e1bd53b53a34758549eb9"
S = "${WORKDIR}/git"
prev parent reply other threads:[~2025-04-12 1:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 1:03 [meta-openembedded][PATCH 1/3] layers: Add whinlatter (5.3) to compatible layer series Khem Raj
2025-04-12 1:03 ` [meta-oe][PATCH 2/3] kernel-selftest: Convert to use a dedicated UNPACKDIR Khem Raj
2025-04-12 1:03 ` Khem Raj [this message]
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=20250412010310.1167351-3-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.