From 69c3e7acb744e1e5606a4d946e3b948704cfbbae Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 12 Apr 2018 17:53:17 +0200 Subject: 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 --- g10/passphrase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g10/passphrase.c') diff --git a/g10/passphrase.c b/g10/passphrase.c index ffdcdf2bd..10574ec6a 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -488,7 +488,7 @@ gpg_format_keydesc (ctrl_t ctrl, PKT_public_key *pk, int mode, int escaped) && pk->keyid[1] != pk->main_keyid[1]); algo_name = openpgp_pk_algo_name (pk->pubkey_algo); timestr = strtimestamp (pk->timestamp); - uid = get_user_id (ctrl, is_subkey? pk->main_keyid:pk->keyid, &uidlen); + uid = get_user_id (ctrl, is_subkey? pk->main_keyid:pk->keyid, &uidlen, NULL); orig_codeset = i18n_switchto_utf8 (); -- cgit v1.2.3