OpenSSL 4.0 made ASN1_STRING opaque. serf directly accesses nm->d.ia5->data and nm->d.ia5->length which is no longer allowed.
Use ASN1_STRING_get0_data() and ASN1_STRING_length() accessor functions instead. These have been available since OpenSSL 1.1.0 so this is backward compatible. The fix is already in serf trunk (r1935023) but no new release has been made. Upstream-Status: Backport [https://svn.apache.org/repos/asf/serf/trunk r1935023] Signed-off-by: Jaipaul Cheernam <[email protected]> --- ...penSSL-4.0-use-ASN1_STRING-accessors.patch | 35 +++++++++++++++++++ meta/recipes-support/serf/serf_1.3.10.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-support/serf/serf/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch diff --git a/meta/recipes-support/serf/serf/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch b/meta/recipes-support/serf/serf/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch new file mode 100644 index 0000000000..2392cf1dca --- /dev/null +++ b/meta/recipes-support/serf/serf/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <[email protected]> +Date: Thu, 13 Aug 2026 11:52:00 +0000 +Subject: [PATCH] Fix build with OpenSSL 4.0: use ASN1_STRING accessors + +OpenSSL 4.0 made ASN1_STRING opaque. Direct access to struct members +(->data, ->length) is no longer possible. Use the accessor functions +ASN1_STRING_get0_data() and ASN1_STRING_length() instead. + +These accessors have been available since OpenSSL 1.1.0, so this change +is backward compatible. + +Upstream-Status: Backport [https://svn.apache.org/repos/asf/serf/trunk r1935023] +Signed-off-by: Jaipaul Cheernam <[email protected]> +--- + buckets/ssl_buckets.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/buckets/ssl_buckets.c ++++ b/buckets/ssl_buckets.c +@@ -567,11 +567,11 @@ + switch (nm->type) { + case GEN_DNS: + if (copy_action == ErrorOnNul && +- strlen(nm->d.ia5->data) != nm->d.ia5->length) ++ strlen((const char *)ASN1_STRING_get0_data(nm->d.ia5)) != (size_t)ASN1_STRING_length(nm->d.ia5)) + return SERF_ERROR_SSL_CERT_FAILED; + if (san_arr && *san_arr) +- p = pstrdup_escape_nul_bytes((const char *)nm->d.ia5->data, +- nm->d.ia5->length, ++ p = pstrdup_escape_nul_bytes((const char *)ASN1_STRING_get0_data(nm->d.ia5), ++ ASN1_STRING_length(nm->d.ia5), + pool); + break; + default: diff --git a/meta/recipes-support/serf/serf_1.3.10.bb b/meta/recipes-support/serf/serf_1.3.10.bb index c6b51452aa..fd3560876b 100644 --- a/meta/recipes-support/serf/serf_1.3.10.bb +++ b/meta/recipes-support/serf/serf_1.3.10.bb @@ -10,6 +10,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \ file://0003-gen_def.patch \ file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \ + file://0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch \ " SRC_URI[sha256sum] = "be81ef08baa2516ecda76a77adf7def7bc3227eeb578b9a33b45f7b41dc064e6"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#243401): https://lists.openembedded.org/g/openembedded-core/message/243401 Mute This Topic: https://lists.openembedded.org/mt/120745101/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
