Bug#1138336: svxlink: FTBFS with openssl 4.0
Ravi Kant Sharma <[email protected]> Fri, 19 Jun 2026 17:00:14 +0200
| Newsgroups | gmane.linux.debian.devel.ham |
|---|---|
| Message-ID | <178188121447.1530516.4634382644092173691.reportbug__11936.2603569002$1781881413$gmane$org@dragon0> |
Package: svxlink Followup-For: Bug #1138336 X-Debbugs-Cc: [email protected] Control: tags -1 patch ftbfs Dear Maintainer, Please find attached a patch that fixes this issue. -- System Information: Debian Release: trixie/sid APT prefers noble-updates APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'), (100, 'noble-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.8.0-117-generic (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
fix-for-openssl4-compat.patch
(text/plain, 3.5 KB)
Description: Fix OpenSSL 4.0 compatibility in async SSL code
Handle const X509_NAME_ENTRY/ASN1_STRING return values and const_cast
X509_NAME accessors when mutating, to match OpenSSL 4.0 API changes.
Forwarded: https://github.com/sm0svx/svxlink/pull/775
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2154883
Bug-Debian: https://bugs.debian.org/1138336
Last-Update: 2026-06-19
Index: svxlink/src/async/core/AsyncSslCertSigningReq.h
===================================================================
--- svxlink.orig/src/async/core/AsyncSslCertSigningReq.h 2026-06-19 13:35:55.000000000 +0200
+++ svxlink/src/async/core/AsyncSslCertSigningReq.h 2026-06-19 15:10:17.136197858 +0200
@@ -292,7 +292,7 @@
bool addSubjectName(const std::string& field, const std::string& value)
{
assert(m_req != nullptr);
- X509_NAME* name = X509_REQ_get_subject_name(m_req);
+ X509_NAME* name = const_cast<X509_NAME*>(X509_REQ_get_subject_name(m_req));
if (name == nullptr)
{
name = X509_NAME_new();
@@ -404,8 +404,8 @@
//int lastpos = X509_NAME_get_index_by_NID(subj, NID_commonName, -1);
if (lastpos >= 0)
{
- X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, lastpos);
- ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
+ const X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, lastpos);
+ const ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
cn = reinterpret_cast<const char*>(ASN1_STRING_get0_data(d));
}
return cn;
Index: svxlink/src/async/core/AsyncSslX509.h
===================================================================
--- svxlink.orig/src/async/core/AsyncSslX509.h 2026-06-19 13:35:55.000000000 +0200
+++ svxlink/src/async/core/AsyncSslX509.h 2026-06-19 15:10:17.130197828 +0200
@@ -354,8 +354,8 @@
#endif
if (lastpos >= 0)
{
- X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, lastpos);
- ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
+ const X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, lastpos);
+ const ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
cn = reinterpret_cast<const char*>(ASN1_STRING_get0_data(d));
}
return cn;
@@ -712,7 +712,7 @@
{
// FIXME: Error handling
assert(m_cert != nullptr);
- X509_NAME* name = X509_get_issuer_name(m_cert);
+ X509_NAME* name = const_cast<X509_NAME*>(X509_get_issuer_name(m_cert));
if (name == nullptr)
{
name = X509_NAME_new();
@@ -735,7 +735,7 @@
{
// FIXME: Error handling
assert(m_cert != nullptr);
- X509_NAME* name = X509_get_subject_name(m_cert);
+ X509_NAME* name = const_cast<X509_NAME*>(X509_get_subject_name(m_cert));
if (name == nullptr)
{
name = X509_NAME_new();
Index: svxlink/src/async/demo/AsyncSslTcpServer_demo.cpp
===================================================================
--- svxlink.orig/src/async/demo/AsyncSslTcpServer_demo.cpp 2026-06-19 13:35:55.000000000 +0200
+++ svxlink/src/async/demo/AsyncSslTcpServer_demo.cpp 2026-06-19 15:10:17.141197883 +0200
@@ -86,8 +86,8 @@
{
break;
}
- X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, lastpos);
- ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
+ const X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, lastpos);
+ const ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
const unsigned char* str = (ASN1_STRING_get0_data(d));
std::cout << "### CN=" << str << std::endl;
}