public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/opensips] rawhide: Fix FTBFS
@ 2026-06-24 19:13 Peter Lemenkov
0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-06-24 19:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/opensips
Branch : rawhide
Commit : b8ea87edc60a0a2222dc24f8f6b608ca9c47db14
Author : Peter Lemenkov <lemenkov@gmail.com>
Date : 2026-06-24T20:51:40+02:00
Stats : +79/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/opensips/c/b8ea87edc60a0a2222dc24f8f6b608ca9c47db14?branch=rawhide
Log:
Fix FTBFS
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
diff --git a/opensips-0011-Fix-build-with-OpenSSL-3.x-replace-direct-ASN1_STRIN.patch b/opensips-0011-Fix-build-with-OpenSSL-3.x-replace-direct-ASN1_STRIN.patch
new file mode 100644
index 0000000..72ca87f
--- /dev/null
+++ b/opensips-0011-Fix-build-with-OpenSSL-3.x-replace-direct-ASN1_STRIN.patch
@@ -0,0 +1,78 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Wed, 24 Jun 2026 20:29:45 +0200
+Subject: [PATCH] Fix build with OpenSSL 3.x: replace direct ASN1_STRING member
+ access
+
+OpenSSL 3.x made ASN1_STRING (struct asn1_string_st) an opaque type.
+Replace all direct ->data and ->length member access with the public
+accessor API (ASN1_STRING_get0_data, ASN1_STRING_length), available
+since OpenSSL 1.1.0.
+
+Fixes build on Fedora 45 (OpenSSL 3.5.x, GCC 16).
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Assisted-by: Claude (Anthropic) <https://claude.ai>
+
+diff --git a/modules/identity/identity.c b/modules/identity/identity.c
+index f4a350a53c..a1b17b9d03 100644
+--- a/modules/identity/identity.c
++++ b/modules/identity/identity.c
+@@ -1420,13 +1420,13 @@ static time_t parseX509Date(ASN1_STRING * dateString)
+ return -1;
+ }
+
+- if((ASN1_UTCTIME_check(dateString)) && (dateString->length == 13))
++ if((ASN1_UTCTIME_check(dateString)) && (ASN1_STRING_length(dateString) == 13))
+ {
+ /* UTCTIME string, GMT
+ YYMMDDhhmmssZ
+ */
+
+- tmp = dateString->data;
++ tmp = (char *)ASN1_STRING_get0_data(dateString);
+
+ tmDate.tm_year = (tmp[0] - '0') * 10 + (tmp[1] - '0');
+ if(tmDate.tm_year < 50) //see chap. 4.1.2.5.1, rfc 3280
+@@ -1444,12 +1444,12 @@ static time_t parseX509Date(ASN1_STRING * dateString)
+ }
+
+ /* needed for years >= 2050 */
+- if ((ASN1_GENERALIZEDTIME_check(dateString)) && (dateString->length == 15))
++ if ((ASN1_GENERALIZEDTIME_check(dateString)) && (ASN1_STRING_length(dateString) == 15))
+ {
+ /* GENERALIZEDTIME string; GMT
+ YYYYMMDDhhmmssZ
+ */
+- tmp = dateString->data;
++ tmp = (char *)ASN1_STRING_get0_data(dateString);
+
+ tmDate.tm_year = (tmp[0] - '0') * 1000 +
+ (tmp[1] - '0') * 100 + (tmp[2] - '0') * 10 + (tmp[3] - '0') - 1900;
+diff --git a/modules/tls_openssl/openssl_tls_vars.c b/modules/tls_openssl/openssl_tls_vars.c
+index 0ac39f7648..859ae75fe7 100644
+--- a/modules/tls_openssl/openssl_tls_vars.c
++++ b/modules/tls_openssl/openssl_tls_vars.c
+@@ -324,8 +324,8 @@ int openssl_tls_var_alt(int ind, void *ssl, str *res)
+ case GEN_EMAIL:
+ case GEN_DNS:
+ case GEN_URI:
+- text.s = (char*)nm->d.ia5->data;
+- text.len = nm->d.ia5->length;
++ text.s = (char*)ASN1_STRING_get0_data(nm->d.ia5);
++ text.len = ASN1_STRING_length(nm->d.ia5);
+ if (text.len >= 1024) {
+ LM_ERR("alternative subject text too long\n");
+ goto err;
+@@ -337,9 +337,9 @@ int openssl_tls_var_alt(int ind, void *ssl, str *res)
+ break;
+
+ case GEN_IPADD:
+- ip.len = nm->d.iPAddress->length;
++ ip.len = ASN1_STRING_length(nm->d.iPAddress);
+ ip.af = (ip.len == 16) ? AF_INET6 : AF_INET;
+- memcpy(ip.u.addr, nm->d.iPAddress->data, ip.len);
++ memcpy(ip.u.addr, ASN1_STRING_get0_data(nm->d.iPAddress), ip.len);
+ text.s = ip_addr2a(&ip);
+ text.len = strlen(text.s);
+ memcpy(buf, text.s, text.len);
diff --git a/opensips.spec b/opensips.spec
index dddcc13..17a12ec 100644
--- a/opensips.spec
+++ b/opensips.spec
@@ -20,6 +20,7 @@ Patch: opensips-0007-Fix-const-correctness-warnings-in-HTTP-and-FreeSWITC.patch
Patch: opensips-0008-Fix-uninitialized-va_list-warning-on-ppc64le-and-i68.patch
Patch: opensips-0009-Fix-pointer-truncation-warning-on-32-bit-architectur.patch
Patch: opensips-0010-Fix-C90-style-declaration-warnings-in-snmpstats-modu.patch
+Patch: opensips-0011-Fix-build-with-OpenSSL-3.x-replace-direct-ASN1_STRIN.patch
URL: https://opensips.org
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 19:13 [rpms/opensips] rawhide: Fix FTBFS Peter Lemenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox