summaryrefslogtreecommitdiff
path: root/rpmio/rpmpgp.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-04-07 14:46:06 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-04-08 12:00:11 +0300
commit87c4eee816a4ddd4291cf1211c0290f3a731be73 (patch)
tree8c50fc4664958dcb31ce200a78c9f9d71ccf34bb /rpmio/rpmpgp.c
parentae7ef1a43328dce9ddc09a509fa4627ef70cd634 (diff)
downloadrpm-87c4eee816a4ddd4291cf1211c0290f3a731be73.tar.gz
Axe pgpDig and related APIs
These haven't been used by rpm in years but have been left to linger, perhaps for too long. Bye now.
Diffstat (limited to 'rpmio/rpmpgp.c')
-rw-r--r--rpmio/rpmpgp.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
index 3d773d2f7..cf827d6d2 100644
--- a/rpmio/rpmpgp.c
+++ b/rpmio/rpmpgp.c
@@ -993,13 +993,6 @@ static int pgpPrtPkt(struct pgpPkt *p, pgpDigParams _digp)
return rc;
}
-pgpDig pgpNewDig(void)
-{
- pgpDig dig = xcalloc(1, sizeof(*dig));
-
- return dig;
-}
-
pgpDigParams pgpDigParamsFree(pgpDigParams digp)
{
if (digp) {
@@ -1012,43 +1005,6 @@ pgpDigParams pgpDigParamsFree(pgpDigParams digp)
return NULL;
}
-void pgpCleanDig(pgpDig dig)
-{
- if (dig != NULL) {
- pgpDigParamsFree(dig->signature);
- pgpDigParamsFree(dig->pubkey);
- memset(dig, 0, sizeof(*dig));
- }
- return;
-}
-
-pgpDig pgpFreeDig(pgpDig dig)
-{
- if (dig != NULL) {
-
- /* DUmp the signature/pubkey data. */
- pgpCleanDig(dig);
- dig = _free(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 pgpDigParamsCmp(pgpDigParams p1, pgpDigParams p2)
{
int rc = 1; /* assume different, eg if either is NULL */
@@ -1349,30 +1305,6 @@ int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen,
return rc;
}
-int pgpPrtPkts(const uint8_t * pkts, size_t pktlen, pgpDig dig, int printing)
-{
- int rc;
- pgpDigParams digp = NULL;
-
- _print = printing;
-
- rc = pgpPrtParams(pkts, pktlen, 0, &digp);
-
- if (dig && rc == 0) {
- if (digp->tag == PGPTAG_SIGNATURE) {
- pgpDigParamsFree(dig->signature);
- dig->signature = digp;
- } else {
- pgpDigParamsFree(dig->pubkey);
- dig->pubkey = digp;
- }
- } else {
- pgpDigParamsFree(digp);
- }
-
- return rc;
-}
-
char *pgpIdentItem(pgpDigParams digp)
{
char *id = NULL;
@@ -1447,15 +1379,6 @@ exit:
}
-rpmRC pgpVerifySig(pgpDig dig, DIGEST_CTX hashctx)
-{
- if (dig == NULL || hashctx == NULL)
- return RPMRC_FAIL;
-
- return pgpVerifySignature(pgpDigGetParams(dig, PGPTAG_PUBLIC_KEY),
- pgpDigGetParams(dig, PGPTAG_SIGNATURE), hashctx);
-}
-
static pgpArmor decodePkts(uint8_t *b, uint8_t **pkt, size_t *pktlen)
{
const char * enc = NULL;