aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/gpg.c2
-rw-r--r--g10/gpgv.c8
-rw-r--r--g10/keylist.c18
-rw-r--r--g10/options.h1
-rw-r--r--g10/test-stubs.c9
5 files changed, 28 insertions, 10 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 29b7eb55d..bba486aea 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2109,6 +2109,8 @@ parse_list_options(char *str)
N_("show preferences")},
{"show-pref-verbose", LIST_SHOW_PREF_VERBOSE, NULL,
N_("show preferences")},
+ {"show-ownertrust", LIST_SHOW_OWNERTRUST, NULL,
+ N_("show ownertrust")},
{"show-only-fpr-mbox",LIST_SHOW_ONLY_FPR_MBOX, NULL,
NULL},
{"sort-sigs", LIST_SORT_SIGS, NULL,
diff --git a/g10/gpgv.c b/g10/gpgv.c
index c3b09f752..50ec3917a 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -426,6 +426,14 @@ get_ownertrust (ctrl_t ctrl, PKT_public_key *pk)
return TRUST_UNKNOWN;
}
+const char *
+get_ownertrust_string (ctrl_t ctrl, PKT_public_key *pk, int no_create)
+{
+ (void)ctrl;
+ (void)pk;
+ (void)no_create;
+ return "";
+}
/* Stubs:
* Because we only work with trusted keys, it does not make sense to
diff --git a/g10/keylist.c b/g10/keylist.c
index d0ebfc86f..cc1e23d7f 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -2520,6 +2520,11 @@ print_key_line (ctrl_t ctrl, estream_t fp, PKT_public_key *pk, int secret)
tty_fprintf (fp, " [%s]", usagestr_from_pk (pk, 0));
}
+ if (pk->flags.primary && (opt.list_options & LIST_SHOW_OWNERTRUST))
+ {
+ tty_fprintf (fp, " [%s]", get_ownertrust_string (ctrl, pk, 0));
+ }
+
if (pk->flags.revoked)
{
tty_fprintf (fp, " [");
@@ -2539,21 +2544,14 @@ print_key_line (ctrl_t ctrl, estream_t fp, PKT_public_key *pk, int secret)
tty_fprintf (fp, "]");
}
-#if 0
- /* I need to think about this some more. It's easy enough to
- include, but it looks sort of confusing in the listing... */
- if (opt.list_options & LIST_SHOW_VALIDITY)
- {
- int validity = get_validity (ctrl, pk, NULL, NULL, 0);
- tty_fprintf (fp, " [%s]", trust_value_to_string (validity));
- }
-#endif
-
if (pk->pubkey_algo >= 100)
tty_fprintf (fp, " [experimental algorithm %d]", pk->pubkey_algo);
tty_fprintf (fp, "\n");
+ if (pk->flags.primary && pk_is_disabled (pk))
+ es_fprintf (es_stdout, " *** %s\n", _("This key has been disabled"));
+
/* if the user hasn't explicitly asked for human-readable
fingerprints, show compact fpr of primary key: */
if (pk->flags.primary &&
diff --git a/g10/options.h b/g10/options.h
index 458180c7a..50fa4ad86 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -442,6 +442,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
#define LIST_SHOW_PREF (1<<14)
#define LIST_SHOW_PREF_VERBOSE (1<<15)
#define LIST_SHOW_UNUSABLE_SIGS (1<<16)
+#define LIST_SHOW_OWNERTRUST (1<<19)
#define VERIFY_SHOW_PHOTOS (1<<0)
#define VERIFY_SHOW_POLICY_URLS (1<<1)
diff --git a/g10/test-stubs.c b/g10/test-stubs.c
index d9bead754..00145c12b 100644
--- a/g10/test-stubs.c
+++ b/g10/test-stubs.c
@@ -155,6 +155,15 @@ get_ownertrust_info (ctrl_t ctrl, PKT_public_key *pk, int no_create)
return '?';
}
+const char *
+get_ownertrust_string (ctrl_t ctrl, PKT_public_key *pk, int no_create)
+{
+ (void)ctrl;
+ (void)pk;
+ (void)no_create;
+ return "";
+}
+
unsigned int
get_ownertrust (ctrl_t ctrl, PKT_public_key *pk)
{