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 <jaipaul.cheernam@est.tech>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Jaipaul Cheernam
2026-08-27 23:33:15 -07:00
committed by Khem Raj
parent bf9adc2954
commit 0978404d83
2 changed files with 28 additions and 0 deletions
@@ -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);
@@ -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"