rpm/rpm-4.14-disable-sha256hdr.patch
Panu Matilainen 14f55d6b22 Disable SHA256 header-only digest generation temporarily (#1480407)
There's a bug in rpm 4.13.x rpmkeys -K signature checking that chokes
on unknown tags it's supposed to ignore like older rpm versions do.
Unfortunately that means all active Fedora versions are affected,
so disabling the SHA256 header-only digest generation temporarily to
give time to deal with the other versions.
2017-08-11 09:51:16 +03:00

33 lines
1.0 KiB
Diff

diff --git a/lib/signature.c b/lib/signature.c
index b91baf628..ddfa969c9 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -120,6 +120,7 @@ rpmRC rpmGenerateSignature(char *SHA256, char *SHA1, uint8_t *MD5,
int gpgSize = rpmExpandNumeric("%{__gpg_reserved_space}");
/* Prepare signature */
+#if 0 /* rpm 4.13.x signature checking trips up on this, disable temporarily */
if (SHA256) {
rpmtdReset(&td);
td.tag = RPMSIGTAG_SHA256;
@@ -128,6 +129,7 @@ rpmRC rpmGenerateSignature(char *SHA256, char *SHA1, uint8_t *MD5,
td.data = SHA256;
headerPut(sig, &td, HEADERPUT_DEFAULT);
}
+#endif
if (SHA1) {
rpmtdReset(&td);
diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at
index bf6bfd01a..75b9bc110 100644
--- a/tests/rpmsigdig.at
+++ b/tests/rpmsigdig.at
@@ -123,7 +123,6 @@ runroot rpmkeys -Kv /build/RPMS/noarch/attrtest-1.0-1.noarch.rpm
[0],
[/build/RPMS/noarch/attrtest-1.0-1.noarch.rpm:
Header SHA1 digest: OK
- Header SHA256 digest: OK
Payload SHA256 digest: OK
MD5 digest: OK
],