summaryrefslogtreecommitdiff
path: root/rpmio/rpmpgp.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-11-07 12:52:42 +0200
committerPanu Matilainen <pmatilai@redhat.com>2011-11-07 12:52:42 +0200
commitb04cdcb459e80e9bc03701e3e575411bf44aba72 (patch)
treeada7d8d3c7c0b6de08dcc9cb397949485b0ac77d /rpmio/rpmpgp.c
parentf3a8970e73172939f501bd7186dd23a8d2449d42 (diff)
downloadrpm-b04cdcb459e80e9bc03701e3e575411bf44aba72.tar.gz
rpm-b04cdcb459e80e9bc03701e3e575411bf44aba72.tar.bz2
rpm-b04cdcb459e80e9bc03701e3e575411bf44aba72.zip
Add a dumb API to retrieve pubkey / signature params from pgpDig
Diffstat (limited to 'rpmio/rpmpgp.c')
-rw-r--r--rpmio/rpmpgp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
index 467c45c21..b14640e15 100644
--- a/rpmio/rpmpgp.c
+++ b/rpmio/rpmpgp.c
@@ -873,6 +873,22 @@ pgpDig pgpFreeDig(pgpDig dig)
return dig;
}
+pgpDigParams pgpDigGetParams(pgpDig dig, unsigned int pkttype)
+{
+ pgpDigParams params = NULL;
+ if (dig) {
+ switch (pkttype) {
+ case PGPTAG_SIGNATURE:
+ params = &dig->signature;
+ break;
+ case PGPTAG_PUBLIC_KEY:
+ params = &dig->pubkey;
+ break;
+ }
+ }
+ return params;
+}
+
int pgpPrtPkts(const uint8_t * pkts, size_t pktlen, pgpDig dig, int printing)
{
const uint8_t *p = pkts;