diff options
| author | David Shaw <[email protected]> | 2004-10-06 21:50:23 +0000 |
|---|---|---|
| committer | David Shaw <[email protected]> | 2004-10-06 21:50:23 +0000 |
| commit | b1e2c5398fb7467d3a72072a0da65424b30de937 (patch) | |
| tree | fc435c0cba7819ff6d8e555c9f01fd05738a3257 /g10/keylist.c | |
| parent | * keyedit.c (sign_uids, ask_revoke_sig): Improve translatability of user (diff) | |
| download | gnupg-b1e2c5398fb7467d3a72072a0da65424b30de937.tar.gz gnupg-b1e2c5398fb7467d3a72072a0da65424b30de937.zip | |
* helptext.c, pkclist.c (do_we_trust): It is not possible to get here with
a revoked or expired key, so BUG() that case. Remove question about
overriding revoked/expired. Also --keyid-format-ify. (do_we_trust_pre):
Use print_pubkey_info() instead of printing the info ourselves.
* passphrase.c (passphrase_to_dek): Improve translatability of user ID
prompts.
* keylist.c (print_pubkey_info): Use the user ID the pk was selected by,
if any.
Diffstat (limited to 'g10/keylist.c')
| -rw-r--r-- | g10/keylist.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index ec19d9b54..f5578c28e 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -119,7 +119,7 @@ print_seckey_info (PKT_secret_key *sk) keyid_from_sk (sk, keyid); p=get_user_id_native(keyid); - tty_printf ("\nsec %4u%c/%s %s %s\n", + tty_printf ("\nsec %4u%c/%s %s %s\n", nbits_from_sk (sk), pubkey_letter (sk->pubkey_algo), keystr(keyid), datestr_from_sk (sk), p); @@ -137,15 +137,21 @@ print_pubkey_info (FILE *fp, PKT_public_key *pk) char *p; keyid_from_pk (pk, keyid); - p=get_user_id_native(keyid); + + /* If the pk was chosen by a particular user ID, that is the one to + print. */ + if(pk->user_id) + p=utf8_to_native(pk->user_id->name,pk->user_id->len,0); + else + p=get_user_id_native(keyid); if (fp) - fprintf (fp, "pub %4u%c/%s %s %s\n", + fprintf (fp, "pub %4u%c/%s %s %s\n", nbits_from_pk (pk), pubkey_letter (pk->pubkey_algo), keystr(keyid), datestr_from_pk (pk), p); else - tty_printf ("\npub %4u%c/%s %s %s\n", + tty_printf ("\npub %4u%c/%s %s %s\n", nbits_from_pk (pk), pubkey_letter (pk->pubkey_algo), keystr(keyid), datestr_from_pk (pk), p); |
