From 0978404d83fa9bc7475760a8ead64f48e8011a0d Mon Sep 17 00:00:00 2001 From: Jaipaul Cheernam Date: Thu, 27 Aug 2026 20:53:17 +0200 Subject: [PATCH] civetweb: fix build with OpenSSL 4.0 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 Signed-off-by: Khem Raj --- .../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 --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 +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 +--- + 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"