Revert "Take advantage of pgpDigParamsCmp() in rpmKeyringLookup()"
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 8 Nov 2011 13:08:01 +0000 (15:08 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 8 Nov 2011 13:08:01 +0000 (15:08 +0200)
- This only "works" because of other brokenness in the sig/key
  parsing, revert while we can
- This reverts commit 4c51eff3f0fa5e67494b6b192aa1c087f57abed6.

rpmio/rpmkeyring.c

index 0ff4eb3..30aa61a 100644 (file)
@@ -224,8 +224,10 @@ rpmRC rpmKeyringLookup(rpmKeyring keyring, pgpDig sig)
            int pktrc = pgpPrtPkts(key->pkt, key->pktlen, sig, 0);
            pgpDigParams pubp = pgpDigGetParams(sig, PGPTAG_PUBLIC_KEY);
            /* Do the parameters match the signature? */
-           if (pubp && pktrc == 0 && pgpDigParamsCmp(sigp, pubp) == 0)
+           if (pubp && pktrc == 0 && sigp->pubkey_algo == pubp->pubkey_algo &&
+               memcmp(sigp->signid, pubp->signid, sizeof(sigp->signid)) == 0) {
                res = RPMRC_OK;
+           }
        }
     }