Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Fedora Release Engineering
6f2c0c2a4f Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 06:22:33 +00:00
Yaakov Selkowitz
adbd35f109 Rebuilt for openssl 4.0 2026-06-12 19:45:41 -04:00
Pavol Žáčik
928fafa059 Add OpenSSL 4.0 compatibility patch 2026-05-11 11:57:29 +02:00
Fedora Release Engineering
fee12e45eb Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 17:52:05 +00:00
Fedora Release Engineering
a88e6881b2 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 18:07:35 +00:00
Fedora Release Engineering
4563180dd7 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 10:22:33 +00:00
2 changed files with 59 additions and 1 deletions

View file

@ -0,0 +1,55 @@
From 7f6aae0cc929818a07ffcdbfbfbcd18b4c8352ee 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 11:29:28 +0200
Subject: [PATCH] Fix OpenSSL 4.0 compatibility
Use const qualifiers and ASN1_STRING accessor functions.
---
external/libstb-secvar/src/crypto_openssl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/external/libstb-secvar/src/crypto_openssl.c b/external/libstb-secvar/src/crypto_openssl.c
index e6dd5e5..9fe8303 100644
--- a/external/libstb-secvar/src/crypto_openssl.c
+++ b/external/libstb-secvar/src/crypto_openssl.c
@@ -124,7 +124,7 @@ err_out:
int crypto_x509_get_sig_len (crypto_x509_t *x509)
{
int rc;
- ASN1_BIT_STRING *sig;
+ const ASN1_BIT_STRING *sig;
sig = X509_get0_pubkey_bitstr (x509);
if (!sig)
@@ -139,7 +139,7 @@ int crypto_x509_get_sig_len (crypto_x509_t *x509)
return rc;
}
- return sig->length;
+ return ASN1_STRING_length(sig);
}
int crypto_x509_oid_is_pkcs1_sha256 (crypto_x509_t *x509)
@@ -262,7 +262,7 @@ int crypto_pkcs7_signed_hash_verify (crypto_pkcs7_t *pkcs7, crypto_x509_t *x509,
unsigned char *hash, int hash_len)
{
int exp_size, md_nid, num_signers, rc = ERR_R_INTERNAL_ERROR;
- unsigned char *exp_sig;
+ const unsigned char *exp_sig;
EVP_PKEY *pk;
EVP_PKEY_CTX *pk_ctx;
X509_ALGOR *alg;
@@ -346,8 +346,8 @@ int crypto_pkcs7_signed_hash_verify (crypto_pkcs7_t *pkcs7, crypto_x509_t *x509,
goto out;
}
- exp_size = signer_info->enc_digest->length;
- exp_sig = signer_info->enc_digest->data;
+ exp_size = ASN1_STRING_length(signer_info->enc_digest);
+ exp_sig = ASN1_STRING_get0_data(signer_info->enc_digest);
if (exp_size <= 0 || !exp_sig)
{
--
2.53.0

View file

@ -7,6 +7,8 @@ URL: https://github.com/open-power/secvarctl
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/ibm/libstb-secvar/archive/ce98be9d15ac2df062726b4451f0ec0c0b27fbf2.tar.gz
Patch0: 0001-Fix-OpenSSL-4.0-compatibility.patch
BuildRequires: gcc
BuildRequires: cmake
BuildRequires: openssl-devel
@ -23,8 +25,9 @@ commands, with the keys efficiently. It is supporting automate process of the
both host and guest secure boot keys.
%prep
%autosetup -p1
%autosetup -N
tar xf %{SOURCE1} -C external/libstb-secvar --strip-components=1
%autopatch -p1
%build
%cmake -DCMAKE_BUILD_TYPE=Release