[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.15-4-g0bdf121
by Werner Koch
cvs at cvs.gnupg.org
Fri Oct 18 10:25:40 CEST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-1-4 has been updated
via 0bdf121d1dcf98d7df28af67272caaac07f6f581 (commit)
from 9d89564a4255d58b7e26c6845bcea69ec5b0214f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0bdf121d1dcf98d7df28af67272caaac07f6f581
Author: Werner Koch <wk at gnupg.org>
Date: Fri Oct 18 10:24:32 2013 +0200
Print the keyid for key packets with --list-packets.
* g10/parse-packet.c (parse_key): Add keyid printing.
--
This is backport from GnuPG-2. Note that the --list-packets command
is for debugging only and not part iof the stable API.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index b22c63f..dcda8ef 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1621,6 +1621,7 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen,
int npkey, nskey;
int is_v4=0;
int rc=0;
+ u32 keyid[2];
version = iobuf_get_noeof(inp); pktlen--;
if( pkttype == PKT_PUBLIC_SUBKEY && version == '#' ) {
@@ -1718,7 +1719,6 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen,
unknown_pubkey_warning( algorithm );
}
-
if( pkttype == PKT_SECRET_KEY || pkttype == PKT_SECRET_SUBKEY ) {
PKT_secret_key *sk = pkt->pkt.secret_key;
byte temp[16];
@@ -1743,6 +1743,9 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen,
}
if (rc) /* one of the MPIs were bad */
goto leave;
+ if (list_mode && npkey)
+ keyid_from_sk (sk, keyid);
+
sk->protect.algo = iobuf_get_noeof(inp); pktlen--;
sk->protect.sha1chk = 0;
if( sk->protect.algo ) {
@@ -1973,8 +1976,15 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen,
}
if (rc)
goto leave;
+
+ if (list_mode)
+ keyid_from_pk (pk, keyid);
}
+ if (list_mode && npkey)
+ fprintf (listfp, "\tkeyid: %08lX%08lX\n",
+ (ulong) keyid[0], (ulong) keyid[1]);
+
leave:
iobuf_skip_rest(inp, pktlen, 0);
return rc;
-----------------------------------------------------------------------
Summary of changes:
g10/parse-packet.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list