public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/khealthcertificate] rawhide: Fix for building on OpenSSL 4.0
@ 2026-07-03 20:32 Steve Cossette
  0 siblings, 0 replies; only message in thread
From: Steve Cossette @ 2026-07-03 20:32 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/khealthcertificate
Branch : rawhide
Commit : 68b52dc984194e21cd91128efa396067cf31c4df
Author : Steve Cossette <farchord@gmail.com>
Date   : 2026-07-03T16:32:39-04:00
Stats  : +73/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/khealthcertificate/c/68b52dc984194e21cd91128efa396067cf31c4df?branch=rawhide

Log:
Fix for building on OpenSSL 4.0

---
diff --git a/23.patch b/23.patch
new file mode 100644
index 0000000..1e7cb51
--- /dev/null
+++ b/23.patch
@@ -0,0 +1,68 @@
+From a9ba7f016641002f2d49c4a3d67dda1aec3fc8fd Mon Sep 17 00:00:00 2001
+From: Hadi Chokr <hadichokr@icloud.com>
+Date: Fri, 3 Jul 2026 20:13:59 +0200
+Subject: [PATCH] Fix compiling against OpenSSL 4.0.
+
+Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
+---
+ src/lib/icao/icaovdsparser.cpp                 | 2 +-
+ src/lib/nl-coronacheck/nlcoronacheckparser.cpp | 6 ++++--
+ src/lib/openssl/asn1_p.h                       | 4 ++--
+ 3 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/lib/icao/icaovdsparser.cpp b/src/lib/icao/icaovdsparser.cpp
+index 39a9b23..8264cd1 100644
+--- a/src/lib/icao/icaovdsparser.cpp
++++ b/src/lib/icao/icaovdsparser.cpp
+@@ -85,7 +85,7 @@ static KHealthCertificate::SignatureValidation verifyCertificate(const openssl::
+     if (!keyId) {
+         return KHealthCertificate::InvalidSignature;
+     }
+-    const auto keyIdStr = QString::fromUtf8(QByteArray(reinterpret_cast<const char*>(keyId->data), keyId->length).toHex());
++    const auto keyIdStr = QString::fromUtf8(QByteArray(reinterpret_cast<const char*>(ASN1_STRING_get0_data(keyId)), ASN1_STRING_length(keyId)).toHex());
+     qCDebug(Log) << keyIdStr;
+ 
+     // single certificate file for keyId
+diff --git a/src/lib/nl-coronacheck/nlcoronacheckparser.cpp b/src/lib/nl-coronacheck/nlcoronacheckparser.cpp
+index ea13e04..95fd72e 100644
+--- a/src/lib/nl-coronacheck/nlcoronacheckparser.cpp
++++ b/src/lib/nl-coronacheck/nlcoronacheckparser.cpp
+@@ -34,9 +34,11 @@ static QByteArray nlDecodeAsn1ByteArray(const ASN1::Object &obj)
+     }
+     auto bn = openssl::bn_ptr(BN_new());
+     BN_zero(bn.get());
+-    for (auto i = 0; i < ai->length; ++i) {
++    const auto *aiData = ASN1_STRING_get0_data(ai.get());
++    const auto aiLength = ASN1_STRING_length(ai.get());
++    for (auto i = 0; i < aiLength; ++i) {
+         BN_mul_word(bn.get(), 1 << 8);
+-        BN_add_word(bn.get(), ai->data[i]);
++        BN_add_word(bn.get(), aiData[i]);
+     }
+     BN_div_word(bn.get(), 2);
+     return Bignum::toByteArray(bn);
+diff --git a/src/lib/openssl/asn1_p.h b/src/lib/openssl/asn1_p.h
+index 59958c6..ae33233 100644
+--- a/src/lib/openssl/asn1_p.h
++++ b/src/lib/openssl/asn1_p.h
+@@ -86,7 +86,7 @@ public:
+         }
+         auto it = begin();
+         const auto os = openssl::asn1_octet_string_ptr(d2i_ASN1_OCTET_STRING(nullptr, &it, size()));
+-        return QByteArray(reinterpret_cast<const char*>(os->data), os->length);
++        return QByteArray(reinterpret_cast<const char*>(ASN1_STRING_get0_data(os.get())), ASN1_STRING_length(os.get()));
+     }
+ 
+     inline QByteArray readPrintableString() const
+@@ -96,7 +96,7 @@ public:
+         }
+         auto it = begin();
+         const auto ps = openssl::asn1_printable_string_ptr(d2i_ASN1_PRINTABLESTRING(nullptr, &it, size()));
+-        return QByteArray(reinterpret_cast<const char*>(ps->data), ps->length);
++        return QByteArray(reinterpret_cast<const char*>(ASN1_STRING_get0_data(ps.get())), ASN1_STRING_length(ps.get()));
+     }
+ private:
+     int m_tag = 0;
+-- 
+GitLab
+

diff --git a/khealthcertificate.spec b/khealthcertificate.spec
index cb438f2..15c7a28 100644
--- a/khealthcertificate.spec
+++ b/khealthcertificate.spec
@@ -6,6 +6,11 @@ Summary:        Handling of digital vaccination, test and recovery certificates.
 Url:            https://invent.kde.org/pim/khealthcertificate
 Source:         https://download.kde.org/%{stable_kf6}/release-service/%{version}/src/%{name}-%{version}.tar.xz
 
+# Upstream fixes
+# Fix for building on OpenSSL 4.0
+# https://invent.kde.org/pim/khealthcertificate/-/merge_requests/23
+Patch0:        23.patch
+
 BuildRequires: extra-cmake-modules
 BuildRequires: kf6-rpm-macros
 BuildRequires: gcc-c++

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-03 20:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-03 20:32 [rpms/khealthcertificate] rawhide: Fix for building on OpenSSL 4.0 Steve Cossette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox