From be9b626c1d0976dfb80195ffe081137ffbd63a82 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 17 Oct 2002 13:48:43 +0000 Subject: [PATCH] * pkclist.c (do_edit_ownertrust): Show all user IDs. This should be enhanced to also show the current trust level. Suggested by Florian Weimer. --- g10/ChangeLog | 6 ++++++ g10/pkclist.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/g10/ChangeLog b/g10/ChangeLog index fa29afee1..d4221d1c3 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2002-10-17 Werner Koch + + * pkclist.c (do_edit_ownertrust): Show all user IDs. This should + be enhanced to also show the current trust level. Suggested by + Florian Weimer. + 2002-10-17 David Shaw * g10.c (main): Handle --strict and --no-strict from the command diff --git a/g10/pkclist.c b/g10/pkclist.c index 5bb5446d6..cb1c506e3 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -35,6 +35,7 @@ #include "trustdb.h" #include "ttyio.h" #include "status.h" +#include "photoid.h" #include "i18n.h" @@ -255,6 +256,8 @@ do_edit_ownertrust (PKT_public_key *pk, int mode, { if( !mode ) { + KBNODE keyblock, un; + tty_printf(_("No trust value assigned to:\n" "%4u%c/%08lX %s \""), nbits_from_pk( pk ), pubkey_letter( pk->pubkey_algo ), @@ -263,6 +266,32 @@ do_edit_ownertrust (PKT_public_key *pk, int mode, tty_print_utf8_string( p, n ), m_free(p); tty_printf("\"\n"); + + keyblock = get_pubkeyblock (keyid); + if (!keyblock) + BUG (); + for (un=keyblock; un; un = un->next) { + if (un->pkt->pkttype != PKT_USER_ID ) + continue; + if (un->pkt->pkt.user_id->is_revoked ) + continue; + if (un->pkt->pkt.user_id->is_expired ) + continue; + /* Only skip textual primaries */ + if (un->pkt->pkt.user_id->is_primary && + !un->pkt->pkt.user_id->attrib_data ) + continue; + + if(opt.show_photos && un->pkt->pkt.user_id->attrib_data) + show_photos(un->pkt->pkt.user_id->attribs, + un->pkt->pkt.user_id->numattribs,pk,NULL); + + tty_printf (" %s", _(" aka \"")); + tty_print_utf8_string (un->pkt->pkt.user_id->name, + un->pkt->pkt.user_id->len ); + tty_printf("\"\n"); + } + print_fingerprint (pk, NULL, 2); tty_printf("\n"); }