diff options
| author | David Shaw <[email protected]> | 2003-01-11 21:13:41 +0000 |
|---|---|---|
| committer | David Shaw <[email protected]> | 2003-01-11 21:13:41 +0000 |
| commit | 7a5c4d215cc1e0d40960c452c7e1977bc9043902 (patch) | |
| tree | 85d93136f0807a7c2f5dfac8a3add4656c50dd4f /g10/keyedit.c | |
| parent | * armor.c (armor_filter): Comment about PGP's end of line tab problem. (diff) | |
| download | gnupg-7a5c4d215cc1e0d40960c452c7e1977bc9043902.tar.gz gnupg-7a5c4d215cc1e0d40960c452c7e1977bc9043902.zip | |
* trustdb.c (get_validity_info, get_ownertrust_info, trust_letter):
Simplify by returning a ? for error directly.
* keyedit.c (show_key_with_all_names): Use get_validity_string and
get_ownertrust_string to show full word versions of trust (i.e. "full"
instead of 'f').
* trustdb.h, trustdb.c (get_ownertrust_string, get_validity_string): Same
as get_ownertrust_info, and get_validity_info, except returns a full
string.
* trustdb.c (get_ownertrust_with_min): New. Same as 'get_ownertrust' but
takes the min_ownertrust value into account.
Diffstat (limited to 'g10/keyedit.c')
| -rw-r--r-- | g10/keyedit.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c index 12d6f7c2b..e431bc1fc 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -1897,15 +1897,15 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, if( node->pkt->pkttype == PKT_PUBLIC_KEY || (with_subkeys && node->pkt->pkttype == PKT_PUBLIC_SUBKEY) ) { PKT_public_key *pk = node->pkt->pkt.public_key; - int otrust=0, trust=0; + const char *otrust="err",*trust="err"; if( node->pkt->pkttype == PKT_PUBLIC_KEY ) { /* do it here, so that debug messages don't clutter the * output */ static int did_warn = 0; - trust = get_validity_info (pk, NULL); - otrust = get_ownertrust_info (pk); + trust = get_validity_string (pk, NULL); + otrust = get_ownertrust_string (pk); /* Show a warning once */ if (!did_warn @@ -1947,20 +1947,28 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, (ulong)keyid_from_pk(pk,NULL), datestr_from_pk(pk), expirestr_from_pk(pk) ); - if( node->pkt->pkttype == PKT_PUBLIC_KEY ) { - tty_printf(_(" trust: %c/%c"), otrust, trust ); + tty_printf("\n"); + + if( node->pkt->pkttype == PKT_PUBLIC_KEY ) + { + tty_printf(" "); + tty_printf(_("trust: %-13s"), otrust); + tty_printf(_("validity: %s"), trust ); + tty_printf("\n"); if( node->pkt->pkttype == PKT_PUBLIC_KEY - && (get_ownertrust (pk)&TRUST_FLAG_DISABLED)) { - tty_printf("\n*** "); + && (get_ownertrust (pk)&TRUST_FLAG_DISABLED)) + { + tty_printf("*** "); tty_printf(_("This key has been disabled")); - } - - if( with_fpr ) { tty_printf("\n"); - print_fingerprint ( pk, NULL, 2 ); - } - } - tty_printf("\n"); + } + } + + if( node->pkt->pkttype == PKT_PUBLIC_KEY && with_fpr ) + { + print_fingerprint ( pk, NULL, 2 ); + tty_printf("\n"); + } } else if( node->pkt->pkttype == PKT_SECRET_KEY || (with_subkeys && node->pkt->pkttype == PKT_SECRET_SUBKEY) ) { |
