diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-11-07 12:52:42 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-11-07 12:52:42 +0200 |
commit | b04cdcb459e80e9bc03701e3e575411bf44aba72 (patch) | |
tree | ada7d8d3c7c0b6de08dcc9cb397949485b0ac77d /rpmio/rpmpgp.c | |
parent | f3a8970e73172939f501bd7186dd23a8d2449d42 (diff) | |
download | librpm-tizen-b04cdcb459e80e9bc03701e3e575411bf44aba72.tar.gz librpm-tizen-b04cdcb459e80e9bc03701e3e575411bf44aba72.tar.bz2 librpm-tizen-b04cdcb459e80e9bc03701e3e575411bf44aba72.zip |
Add a dumb API to retrieve pubkey / signature params from pgpDig
Diffstat (limited to 'rpmio/rpmpgp.c')
-rw-r--r-- | rpmio/rpmpgp.c | 16 |
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; |