public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/librhsm] f43: OpenSSL 4.0 build fixes
@ 2026-06-19 8:50 Simo Sorce
0 siblings, 0 replies; only message in thread
From: Simo Sorce @ 2026-06-19 8:50 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/librhsm
Branch : f43
Commit : 4bdb34450c4dad81d80ac46c2af9086581b7be3e
Author : Simo Sorce <simo@redhat.com>
Date : 2026-06-19T10:49:42+02:00
Stats : +49/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/librhsm/c/4bdb34450c4dad81d80ac46c2af9086581b7be3e?branch=f43
Log:
OpenSSL 4.0 build fixes
Signed-off-by: Simo Sorce <simo@redhat.com>
---
diff --git a/0001-Use-OpenSSL-accessors-for-ASN1-structures.patch b/0001-Use-OpenSSL-accessors-for-ASN1-structures.patch
new file mode 100644
index 0000000..4cfe34e
--- /dev/null
+++ b/0001-Use-OpenSSL-accessors-for-ASN1-structures.patch
@@ -0,0 +1,42 @@
+From e8b6048a252f149778525ef87f9500b16cad194e Mon Sep 17 00:00:00 2001
+From: Simo Sorce <simo@redhat.com>
+Date: Mon, 27 Apr 2026 18:51:30 -0400
+Subject: [PATCH] Use OpenSSL accessors for ASN1 structures
+
+Replace direct field access of ASN1_OCTET_STRING with the
+ASN1_STRING_get0_data and ASN1_STRING_length accessor functions. The
+X509_EXTENSION pointer is also marked as const. This ensures compatibility
+with newer OpenSSL versions (4.0+) where these structures are opaque.
+
+Co-authored-by: Gemini <gemini@google.com>
+Signed-off-by: Simo Sorce <simo@redhat.com>
+---
+ rhsm/rhsm-product-certificate.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/rhsm/rhsm-product-certificate.c b/rhsm/rhsm-product-certificate.c
+index e24e2ab..06ac3c0 100644
+--- a/rhsm/rhsm-product-certificate.c
++++ b/rhsm/rhsm-product-certificate.c
+@@ -109,15 +109,15 @@ x509_get_ext_data_by_oid (X509 *cert,
+ return NULL;
+ }
+
+- X509_EXTENSION *ext = X509_get_ext (cert, loc);
++ const X509_EXTENSION *ext = X509_get_ext (cert, loc);
+ ASN1_OCTET_STRING *octet_str = X509_EXTENSION_get_data (ext);
+ if (octet_str == NULL)
+ return NULL;
+
+- const unsigned char *data = octet_str->data;
++ const unsigned char *data = ASN1_STRING_get0_data (octet_str);
+ long len;
+ int tag, xclass;
+- int ret = ASN1_get_object (&data, &len, &tag, &xclass, octet_str->length);
++ int ret = ASN1_get_object (&data, &len, &tag, &xclass, ASN1_STRING_length (octet_str));
+ /* FIXME: is it proper way of handling error of ASN1_get_object() ? */
+ if (ret & 0x80)
+ {
+--
+2.53.0
+
diff --git a/librhsm.spec b/librhsm.spec
index c6a1e61..64ea1fa 100644
--- a/librhsm.spec
+++ b/librhsm.spec
@@ -1,6 +1,6 @@
Name: librhsm
Version: 0.0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Red Hat Subscription Manager library
License: LGPL-2.1-or-later
URL: https://github.com/rpm-software-management/librhsm
@@ -9,6 +9,9 @@ Source1: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz.a
# Key exported from Petr Pisar's keyring
Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg
+#OpenSSL 4.0 build fixes
+Patch1: 0001-Use-OpenSSL-accessors-for-ASN1-structures.patch
+
BuildRequires: gnupg2
BuildRequires: meson >= 0.37.0
BuildRequires: gcc
@@ -50,6 +53,9 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%{_libdir}/pkgconfig/%{name}.pc
%changelog
+* Mon Apr 27 2026 Simo Sorce <simo@redhat.com> - 0.0.4-2
+- OpenSSL 4.0 build fixes
+
* Fri Oct 17 2025 Petr Pisar <ppisar@redhat.com> - 0.0.4-1
- 0.0.4 bump
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-19 8:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 8:50 [rpms/librhsm] f43: OpenSSL 4.0 build fixes Simo Sorce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox