File 0001-Fix-signfiles-regression-from-13a02b15d6552bc8e44023.patch of Package rpm

From e69b79fa7d4757983873083a0f12164a1ad1a70b Mon Sep 17 00:00:00 2001
Message-ID: <e69b79fa7d4757983873083a0f12164a1ad1a70b.1718086167.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 11 Jun 2024 08:51:58 +0300
Subject: [PATCH] Fix signfiles regression from
 13a02b15d6552bc8e440235b846ea5257514d397

The sneaky construct hid more than just values starting from 1: there's
no value 4 in rpmHashAlgo enum, so skipping that causes all the later
hash names to be off by one.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2291183
---
 sign/rpmsignfiles.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sign/rpmsignfiles.c b/sign/rpmsignfiles.c
index ecd49aac5..9095d9a27 100644
--- a/sign/rpmsignfiles.c
+++ b/sign/rpmsignfiles.c
@@ -23,6 +23,7 @@ static const char *hash_algo_name[] = {
     "md5", 	/* RPM_HASH_MD5 */
     "sha1", 	/* RPM_HASH_SHA1 */
     "rmd160",	/* RPM_HASH_RIPEMD160 */
+    "reserved1",/* reserved */
     "md2",	/* RPM_HASH_MD2 */
     "tgr192", 	/* RPM_HASH_TIGER192 */
     "haval5160",/* RPM_HASH_HAVAL_5_160 */
-- 
2.45.1

openSUSE Build Service is sponsored by