Use pgpDigGetParams() in pgpVerifySig() compat wrapper too
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 9 Nov 2011 07:37:15 +0000 (09:37 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 9 Nov 2011 07:37:15 +0000 (09:37 +0200)
- The fewer places that "know" about pgpDig allocation internals the better...

rpmio/rpmpgp.c

index 43e6c5d..cd0ddd7 100644 (file)
@@ -1041,7 +1041,8 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CTX hashctx)
     if (dig == NULL || hashctx == NULL)
        return RPMRC_FAIL;
 
-    return pgpVerifySignature(&dig->pubkey, &dig->signature, hashctx);
+    return pgpVerifySignature(pgpDigGetParams(dig, PGPTAG_PUBLIC_KEY),
+                             pgpDigGetParams(dig, PGPTAG_SIGNATURE), hashctx);
 }
 
 static pgpArmor decodePkts(uint8_t *b, uint8_t **pkt, size_t *pktlen)