mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-09-29 01:10:21 +00:00
spdm-emu: Switch default crypto backend to mbedtls and update to latest tip
The openssl backend no longer compiles against openssl 4.x. OpenSSL 4.0
made struct asn1_string_st opaque (asn1.h only forward declares it now),
while libspdm's cryptlib_openssl still reaches into ASN1_INTEGER and
ASN1_TIME members directly:
libspdm/os_stub/cryptlib_openssl/pk/x509.c:814:51: error: incomplete
definition of type 'ASN1_INTEGER' (aka 'struct asn1_string_st')
libspdm/os_stub/cryptlib_openssl/pk/x509.c:1131:14: error: invalid
application of 'sizeof' to an incomplete type 'ASN1_TIME'
make the crypto backend a PACKAGECONFIG choice and default to mbedtls,
which builds fine. openssl stays selectable for anyone still on openssl
3.x, and the two options are marked as mutually exclusive.
While at it, update SRCREV to the current tip of main, which carries 41
commits including a build refactor, TPM support, Linux kernel MCTP stack
support and several libspdm syncs.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ed4cfe4688e1ac2cc2e6748766571949"
|
||||
|
||||
SRC_URI = "gitsm://github.com/DMTF/spdm-emu;protocol=https;branch=main"
|
||||
|
||||
SRCREV = "5fca359b15e4edd4f070ca83c9da02799b6f78ae"
|
||||
SRCREV = "ea77f25410cc01098320c0b44b3e150192ec4d5e"
|
||||
# Upstream release tags are "X.Y.Z" (newest 3.8.0).
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
|
||||
# PV is "git" (AUTOINC recipe with no numeric PV), so the resolved tag (3.8.0)
|
||||
@@ -16,9 +16,14 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
inherit cmake pkgconfig systemd
|
||||
|
||||
DEPENDS = "openssl"
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
|
||||
# Use mbedtls until openssl build is fixed.
|
||||
# see https://github.com/DMTF/libspdm/issues/3752
|
||||
|
||||
PACKAGECONFIG ??= "mbedtls ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
|
||||
PACKAGECONFIG[systemd] = "-DENABLE_SYSTEMD=ON,-DENABLE_SYSTEMD=OFF,systemd"
|
||||
PACKAGECONFIG[openssl] = "-DCRYPTO=openssl -DENABLE_BINARY_BUILD=1,,openssl,,,mbedtls"
|
||||
# ENABLE_BINARY_BUILD=0 makes libspdm compile its own bundled mbedtls
|
||||
PACKAGECONFIG[mbedtls] = "-DCRYPTO=mbedtls -DENABLE_BINARY_BUILD=0,,,,,openssl"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "spdm-responder-emu.service"
|
||||
|
||||
@@ -45,8 +50,6 @@ EXTRA_OECMAKE += "\
|
||||
-DARCH=${@get_spdm_multiarch(d)} \
|
||||
-DTOOLCHAIN=NONE \
|
||||
-DTARGET=Release \
|
||||
-DCRYPTO=openssl \
|
||||
-DENABLE_BINARY_BUILD=1 \
|
||||
-DCOMPILED_LIBCRYPTO_PATH=${libdir} \
|
||||
-DCOMPILED_LIBSSL_PATH=${libdir} \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user