public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/subscription-manager] rawhide: Add OpenSSL 4.0 compatibility patch
Date: Fri, 12 Jun 2026 19:56:39 GMT	[thread overview]
Message-ID: <178129419931.1.6245317714053832655.rpms-subscription-manager-bcb09f0aca94@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/subscription-manager
Branch : rawhide
Commit : bcb09f0aca94e59db2ade2b4f15b5aa994c96ffb
Author : Pavol Žáčik <pzacik@redhat.com>
Date   : 2026-06-12T15:56:09-04:00
Stats  : +67/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/subscription-manager/c/bcb09f0aca94e59db2ade2b4f15b5aa994c96ffb?branch=rawhide

Log:
Add OpenSSL 4.0 compatibility patch

---
diff --git a/0001-Fix-OpenSSL-4.0-compatibility.patch b/0001-Fix-OpenSSL-4.0-compatibility.patch
new file mode 100644
index 0000000..3536561
--- /dev/null
+++ b/0001-Fix-OpenSSL-4.0-compatibility.patch
@@ -0,0 +1,60 @@
+From a7702dda6f556ee2d5173f4a3d937ac0b06c8aaa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= <pzacik@redhat.com>
+Date: Mon, 11 May 2026 15:00:34 +0200
+Subject: [PATCH] Fix OpenSSL 4.0 compatibility
+
+Use ASN1_STRING accessor functions instead of
+direct field access.
+---
+ src/certificate.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/certificate.c b/src/certificate.c
+index 92c5af4..2da5156 100644
+--- a/src/certificate.c
++++ b/src/certificate.c
+@@ -239,14 +239,14 @@ get_extension_by_object (X509 *x509, ASN1_OBJECT *obj, char **output)
+ 	if (pos < 0) {
+ 		return 0;
+ 	}
+-	X509_EXTENSION *ext = X509_get_ext (x509, pos);
++	const X509_EXTENSION *ext = X509_get_ext (x509, pos);
+ 
+ 	int tag;
+ 	long len;
+ 	int tc;
+-	const unsigned char *p = X509_EXTENSION_get_data(ext)->data;
++	const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext));
+ 
+-	ASN1_get_object (&p, &len, &tag, &tc, X509_EXTENSION_get_data(ext)->length);
++	ASN1_get_object (&p, &len, &tag, &tc, ASN1_STRING_length(X509_EXTENSION_get_data(ext)));
+ 
+ 	size_t size;
+ 	switch (tag) {
+@@ -258,8 +258,8 @@ get_extension_by_object (X509 *x509, ASN1_OBJECT *obj, char **output)
+ 							  (ASN1_UTF8STRING));
+ 				*output = strndup ((const char *)
+ 						   ASN1_STRING_get0_data (str),
+-						   str->length);
+-				size = str->length;
++						   ASN1_STRING_length(str));
++				size = ASN1_STRING_length(str);
+ 				ASN1_UTF8STRING_free (str);
+ 				return size;
+ 			}
+@@ -269,9 +269,9 @@ get_extension_by_object (X509 *x509, ASN1_OBJECT *obj, char **output)
+ 					ASN1_item_unpack (X509_EXTENSION_get_data(ext),
+ 							  ASN1_ITEM_rptr
+ 							  (ASN1_OCTET_STRING));
+-				*output = malloc (octstr->length);
+-				memcpy (*output, octstr->data, octstr->length);
+-				size = octstr->length;
++				*output = malloc (ASN1_STRING_length(octstr));
++				memcpy (*output, ASN1_STRING_get0_data(octstr), ASN1_STRING_length(octstr));
++				size = ASN1_STRING_length(octstr);
+ 				ASN1_OCTET_STRING_free (octstr);
+ 				return size;
+ 			}
+-- 
+2.53.0
+

diff --git a/subscription-manager.spec b/subscription-manager.spec
index 46860b7..7da1711 100644
--- a/subscription-manager.spec
+++ b/subscription-manager.spec
@@ -96,7 +96,7 @@
 
 Name: subscription-manager
 Version: 1.30.14
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Tools and libraries for subscription and repository management
 %if 0%{?suse_version}
 Group:   Productivity/Networking/System
@@ -113,6 +113,8 @@ URL:     http://www.candlepinproject.org/
 # tito build --tag subscription-manager-$VERSION-$RELEASE --tgz
 Source0: %{name}-%{version}.tar.gz
 
+Patch0: 0001-Fix-OpenSSL-4.0-compatibility.patch
+
 # Especially for the OpenSuse Build Service we need to have another lint config
 %if 0%{?suse_version}
 Source2: subscription-manager-rpmlintrc
@@ -360,6 +362,7 @@ cloud metadata and signatures.
 
 %prep
 %setup -q
+%autopatch -p1
 
 %build
 make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \
@@ -736,6 +739,9 @@ rm -f /var/lib/rhsm/cache/rhsm_icon.json
 rm -f /var/lib/rhsm/cache/content_access_mode.json
 
 %changelog
+* Fri Jun 12 2026 Pavol Žáčik <pzacik@redhat.com> - 1.30.14-3
+- Add OpenSSL 4.0 compatibility patch
+
 * Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 1.30.14-2
 - Rebuilt for Python 3.15
 

                 reply	other threads:[~2026-06-12 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178129419931.1.6245317714053832655.rpms-subscription-manager-bcb09f0aca94@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox