diff options
author | David Shaw <[email protected]> | 2008-10-03 20:00:46 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2008-10-03 20:00:46 +0000 |
commit | 1b86ee9806f4fbb37a4499717c003b0eb837183a (patch) | |
tree | 292b46efca6716eae193fbb9501b6a7f5a9d1f35 /g10/photoid.c | |
parent | Add /daatfile command to gpg-connect-agent. (diff) | |
download | gnupg-1b86ee9806f4fbb37a4499717c003b0eb837183a.tar.gz gnupg-1b86ee9806f4fbb37a4499717c003b0eb837183a.zip |
* main.h, mainproc.c (check_sig_and_print), keylist.c
(list_keyblock_print), pkclist.c (do_edit_ownertrust), keyedit.c
(menu_showphoto), photoid.c (generate_photo_id, show_photos), misc.c
(pct_expando): Add %v and %V expandos so that displaying photo IDs can
show the attribute validity tag (%v) and string (%V). Originally by
Daniel Gillmor.
Diffstat (limited to 'g10/photoid.c')
-rw-r--r-- | g10/photoid.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/g10/photoid.c b/g10/photoid.c index f330f2eab..80a60635d 100644 --- a/g10/photoid.c +++ b/g10/photoid.c @@ -1,5 +1,5 @@ /* photoid.c - photo ID handling code - * Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2005, 2006, 2008 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -40,6 +40,7 @@ #include "main.h" #include "photoid.h" #include "ttyio.h" +#include "trustdb.h" /* Generate a new photo id packet, or return NULL if canceled */ PKT_user_id * @@ -159,7 +160,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name) "user" may not be able to dismiss a viewer window! */ if(opt.command_fd==-1) { - show_photos(uid->attribs,uid->numattribs,pk,NULL); + show_photos(uid->attribs,uid->numattribs,pk,NULL,uid); switch(cpr_get_answer_yes_no_quit("photoid.jpeg.okay", _("Is this photo correct (y/N/q)? "))) { @@ -282,8 +283,10 @@ static const char *get_default_photo_command(void) } #endif -void show_photos(const struct user_attribute *attrs, - int count,PKT_public_key *pk,PKT_secret_key *sk) +void +show_photos(const struct user_attribute *attrs, + int count,PKT_public_key *pk,PKT_secret_key *sk, + PKT_user_id *uid) { #ifndef DISABLE_PHOTO_VIEWER int i; @@ -294,6 +297,8 @@ void show_photos(const struct user_attribute *attrs, memset(&args,0,sizeof(args)); args.pk=pk; args.sk=sk; + args.validity_info=get_validity_info(pk,uid); + args.validity_string=get_validity_string(pk,uid); if(pk) keyid_from_pk(pk,kid); |