mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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.
This commit is contained in:
parent
8b3b70499a
commit
7a5c4d215c
4 changed files with 100 additions and 50 deletions
|
@ -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 );
|
||||
if( node->pkt->pkttype == PKT_PUBLIC_KEY
|
||||
&& (get_ownertrust (pk)&TRUST_FLAG_DISABLED)) {
|
||||
tty_printf("\n*** ");
|
||||
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 )
|
||||
{
|
||||
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("*** ");
|
||||
tty_printf(_("This key has been disabled"));
|
||||
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) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue