diff mbox series

[meta-networking,RFC,13/20] civetweb: fix build with OpenSSL 4.0

Message ID 20260827185324.78997-14-jaipaul.cheernam@est.tech
State New
Headers show
Series Fix OpenSSL 4.0.1 build failures across meta-openembedded | expand

Commit Message

Jaipaul Cheernam Aug. 27, 2026, 6:53 p.m. UTC
OpenSSL 4.0 adds const qualifiers to X509_NAME returns.

Upstream-Status: Submitted [https://github.com/civetweb/civetweb/pull/1423]
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 .../0001-Fix-compilation-with-openssl-4.patch | 27 +++++++++++++++++++
 .../civetweb/civetweb_1.16.bb                 |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/civetweb/civetweb/0001-Fix-compilation-with-openssl-4.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Fix-compilation-with-openssl-4.patch b/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Fix-compilation-with-openssl-4.patch
new file mode 100644
index 0000000000..134760d8ea
--- /dev/null
+++ b/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Fix-compilation-with-openssl-4.patch
@@ -0,0 +1,27 @@ 
+From b3449269bbf13852824d19f164d00810432649d0 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Thu, 20 Aug 2026 21:04:22 +0200
+Subject: [PATCH] Fix compilation with openssl 4
+
+X509_get_subject_name() and X509_get_issuer_name() now return const.
+Upstream-Status: Submitted [https://github.com/civetweb/civetweb/pull/1423]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ src/civetweb.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/civetweb.c b/src/civetweb.c
+index f6a60e214..e093e094e 100644
+--- a/src/civetweb.c
++++ b/src/civetweb.c
+@@ -17125,8 +17125,8 @@ ssl_get_client_cert_info(const struct mg_connection *conn,
+ 		const EVP_MD *digest = EVP_get_digestbyname("sha1");
+ 
+ 		/* Get Subject and issuer */
+-		X509_NAME *subj = X509_get_subject_name(cert);
+-		X509_NAME *iss = X509_get_issuer_name(cert);
++		const X509_NAME *subj = X509_get_subject_name(cert);
++		const X509_NAME *iss = X509_get_issuer_name(cert);
+ 
+ 		/* Get serial number */
+ 		ASN1_INTEGER *serial = X509_get_serialNumber(cert);
diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb b/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb
index 0e13bc6deb..d9ca7ccd53 100644
--- a/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb
+++ b/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb
@@ -8,6 +8,7 @@  SRCREV = "b6ef58f4c4c7fbe90fd1065bccf45b143345f1a6"
 PV .= "+git"
 SRC_URI = "git://github.com/civetweb/civetweb.git;branch=master;protocol=https \
            file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \
+           file://0001-Fix-compilation-with-openssl-4.patch \
            "
 
 CVE_STATUS[CVE-2025-55763] = "fixed-version: The vulnerability is fixed in the used revision"