aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-05-13 11:42:34 +0000
committerWerner Koch <[email protected]>2009-05-13 11:42:34 +0000
commita766a37290cf334d5eead1041ea271a5d714d66f (patch)
treec3b804cebf89ec95903775e9e1ebb4ec5ea86257 /g10/parse-packet.c
parentFix bug 1045. (diff)
downloadgnupg-a766a37290cf334d5eead1041ea271a5d714d66f.tar.gz
gnupg-a766a37290cf334d5eead1041ea271a5d714d66f.zip
Print keyid in gpg --list-packets.
Add some not yet code to app-nks.c Changed batch mode expiration time computation
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r--g10/parse-packet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 57f94cd85..fd01e7635 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1672,6 +1672,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
int npkey, nskey;
int is_v4=0;
int rc=0;
+ u32 keyid[2];
(void)hdr;
@@ -1997,6 +1998,9 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
fprintf (listfp, "\tchecksum: %04hx\n", sk->csum);
}
}
+
+ if (list_mode)
+ keyid_from_sk (sk, keyid);
}
else {
PKT_public_key *pk = pkt->pkt.public_key;
@@ -2021,8 +2025,14 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
}
if (rc)
goto leave;
+ if (list_mode)
+ keyid_from_pk (pk, keyid);
}
+ if (list_mode)
+ fprintf (listfp, "\tkeyid: %08lX%08lX\n",
+ (ulong)keyid[0], (ulong)keyid[1]);
+
leave:
iobuf_skip_rest(inp, pktlen, 0);
return rc;