Fix parsing of pubkey signature packets. Ick.
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 8 May 2009 12:01:15 +0000 (15:01 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 8 May 2009 12:15:41 +0000 (15:15 +0300)
- busted all the way from commit bcb226480d0b60a8667eade77d81c29de4c3d6c9
(cherry picked from commit 5023d0a4e84e2877e3c715b57bd362f95f12ef06)

rpmio/rpmpgp.c

index 47cc764..fb2b5a4 100644 (file)
@@ -644,13 +644,13 @@ static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype,
     return 0;
 }
 
-static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, pgpDig _dig)
+static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen,
+                    pgpDig _dig, pgpDigParams _digp)
 {
     uint8_t version = h[0];
     uint8_t * p;
     size_t plen;
     int rc;
-    pgpDigParams _digp = _dig ? &_dig->signature : NULL;
 
     switch (version) {
     case 3:
@@ -1176,7 +1176,7 @@ static int pgpPrtPkt(const uint8_t *pkt, size_t pleft,
     h = pkt + 1 + plen;
     switch (tag) {
     case PGPTAG_SIGNATURE:
-       rc = pgpPrtSig(tag, h, hlen, _dig);
+       rc = pgpPrtSig(tag, h, hlen, _dig, _digp);
        break;
     case PGPTAG_PUBLIC_KEY:
        /* Get the public key fingerprint. */