summaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-04-12 17:53:17 +0200
committerWerner Koch <wk@gnupg.org>2018-04-12 17:53:17 +0200
commit69c3e7acb744e1e5606a4d946e3b948704cfbbae (patch)
tree0fb5262f3fa11a04442f3408e453c2c8927b984a /g10/mainproc.c
parentgpg: Extend the ERRSIG status line with a fingerprint. (diff)
downloadgnupg2-69c3e7acb744e1e5606a4d946e3b948704cfbbae.tar.xz
gnupg2-69c3e7acb744e1e5606a4d946e3b948704cfbbae.zip
gpg: Extend the "sig" record in --list-mode.
* g10/getkey.c (get_user_id_string): Add arg R_NOUID. Change call callers. (get_user_id): Add arg R_NOUID. Change call callers. * g10/mainproc.c (issuer_fpr_string): Make global. * g10/keylist.c (list_keyblock_colon): Print a '?' for a missing key also in --list-mode. Print the "issuer fpr" field also if there is an issuer fingerprint subpacket. -- Scripts used to rely on the "User ID not found" string even in the --with-colons listing. However, that is not a good idea because that string is subject to translations etc. Now we have an explicit way of telling that a key is missing. For example: gpg --list-sigs --with-colons | \ awk -F: '$1=="sig" && $2=="?" {if($13){print $13}else{print $5}}' Prints all keyids or fingerprint of signing keys for which we do not have the key in our local keyring. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r--g10/mainproc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 85828274f..49e728656 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -1209,7 +1209,7 @@ list_node (CTX c, kbnode_t node)
}
else if (!opt.fast_list_mode)
{
- p = get_user_id (c->ctrl, sig->keyid, &n);
+ p = get_user_id (c->ctrl, sig->keyid, &n, NULL);
es_write_sanitized (es_stdout, p, n,
opt.with_colons?":":NULL, NULL );
xfree (p);
@@ -1630,7 +1630,8 @@ issuer_fpr_raw (PKT_signature *sig, size_t *r_len)
/* Return the ISSUER fingerprint string in human readbale format if
* available. Caller must release the string. */
-static char *
+/* FIXME: Move to another file. */
+char *
issuer_fpr_string (PKT_signature *sig)
{
const byte *p;