diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/0003-xmlsec1-add-new-recipe.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/0003-xmlsec1-add-new-recipe.patch index 9a0752dec0..793c655dce 100644 --- a/meta-oe/recipes-support/xmlsec1/xmlsec1/0003-xmlsec1-add-new-recipe.patch +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/0003-xmlsec1-add-new-recipe.patch @@ -16,13 +16,16 @@ Signed-off-by: Jackie Huang Refreshed for xmlsec1 1.3.11 (examples/Makefile rewritten upstream). --- + examples/Makefile | 11 +++++++++++ + 1 file changed, 11 insertions(+) + diff --git a/examples/Makefile b/examples/Makefile -index dfba58e..f6f4d51 100644 +index fb656d5..3e7c9d3 100644 --- a/examples/Makefile +++ b/examples/Makefile -@@ -12,6 +12,12 @@ PROGRAMS = \ +@@ -17,6 +17,12 @@ PROGRAMS = \ $(PROGRAMS_DEC) - + # try to find pkg-config, if available +# OE: allow building from a separate build dir against the cross build tree +top_srcdir ?= .. @@ -30,20 +33,18 @@ index dfba58e..f6f4d51 100644 +CFLAGS += -I$(top_srcdir)/include +LDLIBS += -L$(top_builddir)/src/.libs + - XMLSEC_PKG_CONFIG = "xmlsec1" + XMLSEC_PKG_CONFIG = xmlsec1 PKG_CONFIG := $(shell command -v pkg-config 2> /dev/null) XMLSEC_CHECK := $(shell $(PKG_CONFIG) --exists $(XMLSEC_PKG_CONFIG) 2> /dev/null && echo "found") -@@ -40,6 +46,11 @@ endif - # rules - all: $(PROGRAMS) - +@@ -56,6 +62,11 @@ all: $(PROGRAMS) + %: %.c + $(CC) $(CFLAGS) -o $@ $< $(LDLIBS) + +DESTDIR = /usr/share/xmlsec1 +install-ptest: + if [ ! -d $(DESTDIR) ]; then mkdir -p $(DESTDIR); fi + cp * $(DESTDIR) + clean: - rm -rf $(PROGRAMS) - --- -2.34.1 + rm -rf $(PROGRAMS) *.o + diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/0008-unit_tests-guard-xmlDebugDumpDocument-with-LIBXML_DEB.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/0008-unit_tests-guard-xmlDebugDumpDocument-with-LIBXML_DEB.patch deleted file mode 100644 index 2f753db12c..0000000000 --- a/meta-oe/recipes-support/xmlsec1/xmlsec1/0008-unit_tests-guard-xmlDebugDumpDocument-with-LIBXML_DEB.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Khem Raj -Date: Tue, 24 Jun 2026 00:00:00 +0000 -Subject: [PATCH] unit_tests: guard xmlDebugDumpDocument with LIBXML_DEBUG_ENABLED - -libxml2 2.14 removed the tree-debugging module; in 2.15 LIBXML_DEBUG_ENABLED -is no longer defined and xmlDebugDumpDocument() is not declared. The transform -helpers unit test called it unconditionally, which fails to compile with a -strict compiler (-Werror=implicit-function-declaration). Only emit the debug -dump when the libxml2 debug module is available. - -Upstream-Status: Submitted [https://github.com/lsh123/xmlsec/issues] - -Signed-off-by: Khem Raj ---- ---- a/apps/unit_tests/transform_helpers_unit_tests.c -+++ b/apps/unit_tests/transform_helpers_unit_tests.c -@@ -288,7 +288,9 @@ - nonceContent = xmlNodeGetContent(nonceNode); - if((nonceContent == NULL) || (xmlStrcmp(nonceContent, BAD_CAST "000102030405060708090a0b") != 0)) { - testLog("Error: ChaCha20-Poly1305 params write serialized unexpected nonce\n"); -+#ifdef LIBXML_DEBUG_ENABLED - xmlDebugDumpDocument(stdout, doc); -+#endif /* LIBXML_DEBUG_ENABLED */ - - xmlFree(nonceContent); - xmlFreeDoc(doc); diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/0009-oss-fuzz-enc-Skip-the-DES-key-when-DES-is-disabled.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/0009-oss-fuzz-enc-Skip-the-DES-key-when-DES-is-disabled.patch new file mode 100644 index 0000000000..7be1bc922e --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/0009-oss-fuzz-enc-Skip-the-DES-key-when-DES-is-disabled.patch @@ -0,0 +1,40 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 12 Nov 2026 00:00:00 -0800 +Subject: [PATCH] oss-fuzz: enc: Skip the DES key when DES is disabled + +The encryption fuzzer refers to xmlSecOpenSSLKeyDataDesId +unconditionally, so it fails to build with --disable-des: + + oss-fuzz/xmlsec_enc_target.c:108:13: error: use of undeclared identifier 'xmlSecOpenSSLKeyDataDesId' + +Guard it with XMLSEC_NO_DES like the rest of the apps. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- +--- a/apps/oss-fuzz/xmlsec_enc_target.c ++++ b/apps/oss-fuzz/xmlsec_enc_target.c +@@ -104,10 +104,20 @@ + int i; + + for (i = 0; i < G_SYM_NKEYS; ++i) { +- xmlSecKeyDataId id = g_sym_keys[i].is_des ? ++ xmlSecKeyDataId id; ++ xmlSecKeyPtr key; ++ ++#ifndef XMLSEC_NO_DES ++ id = g_sym_keys[i].is_des ? + xmlSecOpenSSLKeyDataDesId : + xmlSecOpenSSLKeyDataAesId; +- xmlSecKeyPtr key = xmlSecKeyReadMemory(id, ++#else /* XMLSEC_NO_DES */ ++ if (g_sym_keys[i].is_des) { ++ continue; ++ } ++ id = xmlSecOpenSSLKeyDataAesId; ++#endif /* XMLSEC_NO_DES */ ++ key = xmlSecKeyReadMemory(id, + (const xmlSecByte*)g_sym_keys[i].material, + g_sym_keys[i].size); + diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.12.bb b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.13.bb similarity index 90% rename from meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.12.bb rename to meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.13.bb index b46e76a24d..a06ec311b9 100644 --- a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.12.bb +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.13.bb @@ -8,7 +8,7 @@ HOMEPAGE = "http://www.aleksey.com/xmlsec/" DEPENDS = "libtool libxml2 libxslt zlib" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=352791d62092ea8104f085042de7f4d0" +LIC_FILES_CHKSUM = "file://COPYING;md5=9d595462ce402837a45beefc1ef6c70a" SECTION = "libs" @@ -18,11 +18,11 @@ SRC_URI = "https://github.com/lsh123/xmlsec/releases/download/${PV}/${BP}.tar.gz file://0003-xmlsec1-add-new-recipe.patch \ file://0005-nss-nspr-fix-for-multilib.patch \ file://0006-xmlsec1-Fix-configure-QA-error-caused-by-host-lookup.patch \ - file://0008-unit_tests-guard-xmlDebugDumpDocument-with-LIBXML_DEB.patch \ + file://0009-oss-fuzz-enc-Skip-the-DES-key-when-DES-is-disabled.patch \ file://run-ptest \ " -SRC_URI[sha256sum] = "24045199af12d93fe5fdbbbf7e386e823e4842071e9432e2b90ac108b889a923" +SRC_URI[sha256sum] = "7e500061eed734c55d74c786998e7562e55b1aaa72a2dff8ce3130b4c5b832d5" UPSTREAM_CHECK_URI = "https://github.com/lsh123/xmlsec/releases" UPSTREAM_CHECK_REGEX = "releases/tag/(?P\d+(\.\d+)+)"