All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
To: openembedded-core@lists.openembedded.org
Subject: [RFC v4 3/6] socat: fix build with OpenSSL 4.0
Date: Sat, 22 Aug 2026 19:51:57 +0200	[thread overview]
Message-ID: <20260822175200.57534-4-jaipaul.cheernam@est.tech> (raw)
In-Reply-To: <20260822175200.57534-1-jaipaul.cheernam@est.tech>

OpenSSL 4.0 made ASN1_STRING opaque. socat directly accesses
pName->d.iPAddress->data and pName->d.iPAddress->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.

Upstream-Status: Submitted [socat@dest-unreach.org]
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 ...penSSL-4.0-use-ASN1_STRING-accessors.patch | 31 +++++++++++++++++++
 .../socat/socat_1.8.1.3.bb                    |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-connectivity/socat/files/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch

diff --git a/meta/recipes-connectivity/socat/files/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch b/meta/recipes-connectivity/socat/files/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch
new file mode 100644
index 0000000000..5e021d66c5
--- /dev/null
+++ b/meta/recipes-connectivity/socat/files/0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Thu, 13 Aug 2026 07:00: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: Submitted [socat@dest-unreach.org]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ xio-openssl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/xio-openssl.c
++++ b/xio-openssl.c
+@@ -1898,8 +1898,8 @@
+ 		  case GEN_IPADD:
+ 		     {
+ 			/* binary address format */
+-			const unsigned char *data = pName->d.iPAddress->data;
+-			size_t len = pName->d.iPAddress->length;
++			const unsigned char *data = ASN1_STRING_get0_data(pName->d.iPAddress);
++			size_t len = ASN1_STRING_length(pName->d.iPAddress);
+ 			char aBuffer[INET6_ADDRSTRLEN]; 	/* canonical peername */
+ 			struct in6_addr ip6bin;
+ 
diff --git a/meta/recipes-connectivity/socat/socat_1.8.1.3.bb b/meta/recipes-connectivity/socat/socat_1.8.1.3.bb
index e485c7d28d..025b478392 100644
--- a/meta/recipes-connectivity/socat/socat_1.8.1.3.bb
+++ b/meta/recipes-connectivity/socat/socat_1.8.1.3.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
            file://0001-fix-compile-procan.c-failed.patch \
+           file://0001-Fix-build-with-OpenSSL-4.0-use-ASN1_STRING-accessors.patch \
 "
 
 SRC_URI[sha256sum] = "25bc6476292b2e614220989c77b0b6fca87bb2525d9747b31a6639b1fb602418"


  parent reply	other threads:[~2026-08-22 17:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  5:18 [RFC 0/7] openssl: upgrade to 4.0.1 and fix dependent recipes Jaipaul Cheernam
2026-08-14  5:18 ` [PATCH 1/7] openssl: upgrade 3.5.7 -> 4.0.1 Jaipaul Cheernam
2026-08-15 16:20   ` [OE-core] " Mathieu Dubois-Briand
2026-08-14  5:18 ` [PATCH 2/7] python3: backport OpenSSL 4.0 support from upstream Jaipaul Cheernam
2026-08-14  5:18 ` [PATCH 3/7] socat: fix build with OpenSSL 4.0 Jaipaul Cheernam
2026-08-14  5:18 ` [PATCH 4/7] rust: Upgrade 1.96.1 -> 1.97.1 Jaipaul Cheernam
2026-08-15 16:11   ` [OE-core] " Mathieu Dubois-Briand
2026-08-14  5:18 ` [PATCH 5/7] serf: fix build with OpenSSL 4.0 Jaipaul Cheernam
2026-08-14  5:18 ` [PATCH 6/7] u-boot-tools: " Jaipaul Cheernam
2026-08-14 11:12   ` [OE-core] " Alexander Kanavin
2026-08-21 10:44     ` Quentin Schulz
2026-08-15 16:14   ` Mathieu Dubois-Briand
2026-08-14  5:18 ` [PATCH 7/7] kea: " Jaipaul Cheernam
2026-08-14 11:14   ` [OE-core] " Alexander Kanavin
2026-08-20 18:10 ` [RFC v2 0/6] openssl: upgrade to 4.0.1 and fix dependent recipes Jaipaul Cheernam
2026-08-20 18:10   ` [RFC v2 1/6] openssl: upgrade 3.5.7 -> 4.0.1 Jaipaul Cheernam
2026-08-21 17:52     ` [OE-core] " Khem Raj
2026-08-20 18:10   ` [RFC v2 2/6] python3: backport OpenSSL 4.0 support from upstream Jaipaul Cheernam
2026-08-20 18:10   ` [RFC v2 3/6] socat: fix build with OpenSSL 4.0 Jaipaul Cheernam
2026-08-20 18:10   ` [RFC v2 4/6] serf: " Jaipaul Cheernam
2026-08-20 18:10   ` [RFC v2 5/6] u-boot: " Jaipaul Cheernam
2026-08-21 10:52     ` [OE-core] " Quentin Schulz
2026-08-22 14:02       ` Jaipaul Cheernam
2026-08-24 10:59         ` Quentin Schulz
2026-08-20 18:10   ` [RFC v2 6/6] kea: " Jaipaul Cheernam
2026-08-21 21:17   ` [OE-core] [RFC v2 0/6] openssl: upgrade to 4.0.1 and fix dependent recipes Richard Purdie
2026-08-22 14:31 ` [OE-core][RFC v3 0/6] openssl: upgrade 3.5.7 -> 4.0.1 Jaipaul Cheernam
2026-08-22 14:31   ` [OE-core][RFC v3 1/6] " Jaipaul Cheernam
2026-08-22 14:31   ` [OE-core][RFC v3 2/6] python3: backport OpenSSL 4.0 support from upstream Jaipaul Cheernam
2026-08-22 14:31   ` [OE-core][RFC v3 3/6] socat: fix build with OpenSSL 4.0 Jaipaul Cheernam
2026-08-22 14:31   ` [OE-core][RFC v3 4/6] serf: " Jaipaul Cheernam
2026-08-22 14:31   ` [OE-core][RFC v3 5/6] u-boot: " Jaipaul Cheernam
2026-08-22 14:31   ` [OE-core][RFC v3 6/6] kea: " Jaipaul Cheernam
2026-08-22 17:51 ` [RFC v4 0/6] openssl: upgrade 3.5.7 -> 4.0.1 Jaipaul Cheernam
2026-08-22 17:51   ` [RFC v4 1/6] " Jaipaul Cheernam
2026-08-23  6:56     ` [OE-core] " Khem Raj
2026-08-23  6:57       ` Khem Raj
2026-08-22 17:51   ` [RFC v4 2/6] python3: backport OpenSSL 4.0 support from upstream Jaipaul Cheernam
2026-08-22 17:51   ` Jaipaul Cheernam [this message]
2026-08-22 17:51   ` [RFC v4 4/6] serf: fix build with OpenSSL 4.0 Jaipaul Cheernam
2026-08-22 17:51   ` [RFC v4 5/6] u-boot: " Jaipaul Cheernam
2026-08-22 17:52   ` [RFC v4 6/6] kea: " Jaipaul Cheernam
2026-08-23  7:02   ` [OE-core] [RFC v4 0/6] openssl: upgrade 3.5.7 -> 4.0.1 Richard Purdie
2026-08-24 14:16     ` Ahmad Fatoum

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=20260822175200.57534-4-jaipaul.cheernam@est.tech \
    --to=jaipaul.cheernam@est.tech \
    --cc=openembedded-core@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.