25 lines
666 B
Diff
25 lines
666 B
Diff
|
--- rpmio/rpmpgp.c.orig 2008-10-28 16:14:18.000000000 +0000
|
||
|
+++ rpmio/rpmpgp.c 2008-10-28 16:09:51.000000000 +0000
|
||
|
@@ -876,6 +876,7 @@
|
||
|
const uint8_t *se, *h;
|
||
|
DIGEST_CTX ctx;
|
||
|
int rc = -1; /* assume failure. */
|
||
|
+ byte in[3];
|
||
|
|
||
|
if (!(val & 0x80))
|
||
|
return rc;
|
||
|
@@ -926,7 +927,12 @@
|
||
|
}
|
||
|
|
||
|
ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE);
|
||
|
- (void) rpmDigestUpdate(ctx, pkt, (se-pkt));
|
||
|
+ i = se - h;
|
||
|
+ in[0] = 0x99;
|
||
|
+ in[1] = i >> 8;
|
||
|
+ in[2] = i;
|
||
|
+ (void) rpmDigestUpdate(ctx, in, 3);
|
||
|
+ (void) rpmDigestUpdate(ctx, h, i);
|
||
|
(void) rpmDigestFinal(ctx, (void **)&d, &dlen, 0);
|
||
|
|
||
|
memmove(keyid, (d + (dlen-8)), 8);
|