mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-25 15:27:03 +01:00
* options.skel: Sample photo viewers for Win32.
* misc.c (pct_expando): Use the seckey for %k/%K if the pubkey is not available. * photoid.h, photoid.c (show_photos): Include the seckey in case a user tries to view a photo on a secret key, and change all callers in keyedit.c (menu_showphoto), keylist.c (list_keyblock_print), and photoid.c (generate_photo_id).
This commit is contained in:
parent
e96f8f1fe0
commit
cd2450f41f
@ -1,3 +1,15 @@
|
||||
2002-06-03 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* options.skel: Sample photo viewers for Win32.
|
||||
|
||||
* misc.c (pct_expando): Use the seckey for %k/%K if the pubkey is
|
||||
not available.
|
||||
|
||||
* photoid.h, photoid.c (show_photos): Include the seckey in case a
|
||||
user tries to view a photo on a secret key, and change all callers
|
||||
in keyedit.c (menu_showphoto), keylist.c (list_keyblock_print),
|
||||
and photoid.c (generate_photo_id).
|
||||
|
||||
2002-06-02 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* photoid.c (show_photos): Work properly when not called with a
|
||||
|
@ -3116,7 +3116,7 @@ menu_showphoto( KBNODE keyblock )
|
||||
"key 0x%08lX (uid %d)\n"),
|
||||
image_type_to_string(type,1),
|
||||
(ulong)size,(ulong)keyid[1],count);
|
||||
show_photos(&uid->attribs[i],1,pk);
|
||||
show_photos(&uid->attribs[i],1,pk,NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
||||
|
||||
if(opt.show_photos && node->pkt->pkt.user_id->attribs!=NULL)
|
||||
show_photos(node->pkt->pkt.user_id->attribs,
|
||||
node->pkt->pkt.user_id->numattribs,pk);
|
||||
node->pkt->pkt.user_id->numattribs,pk,sk);
|
||||
}
|
||||
else if( node->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
||||
u32 keyid2[2];
|
||||
|
@ -464,6 +464,9 @@ pct_expando(const char *string,struct expando_args *args)
|
||||
if(args->sk)
|
||||
keyid_from_sk(args->sk,sk_keyid);
|
||||
|
||||
if(!args->pk && args->sk)
|
||||
keyid_from_sk(args->sk,pk_keyid);
|
||||
|
||||
while(*ch!='\0')
|
||||
{
|
||||
char *str=NULL;
|
||||
|
@ -171,6 +171,12 @@ lock-once
|
||||
#
|
||||
# Use your MIME handler to view photos:
|
||||
# photo-viewer "metamail -q -d -b -c %T -s 'KeyID 0x%k' -f GnuPG"
|
||||
#
|
||||
# Use the Win32 registry to pick a viewer for you:
|
||||
# On Win95/98/Me (also the default on Win32):
|
||||
# photo-viewer "start /w"
|
||||
# On NT/2k/XP:
|
||||
# photo-viewer "cmd /c start /w"
|
||||
|
||||
|
||||
# Passphrase agent
|
||||
|
@ -120,7 +120,7 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
|
||||
parse_attribute_subpkts(uid);
|
||||
make_attribute_uidname(uid);
|
||||
|
||||
show_photos(uid->attribs,uid->numattribs,pk);
|
||||
show_photos(uid->attribs,uid->numattribs,pk,NULL);
|
||||
switch(cpr_get_answer_yes_no_quit("photoid.jpeg.okay",
|
||||
_("Is this photo correct (y/N/q)? ")))
|
||||
{
|
||||
@ -215,7 +215,7 @@ char *image_type_to_string(byte type,int style)
|
||||
}
|
||||
|
||||
void show_photos(const struct user_attribute *attrs,
|
||||
int count,PKT_public_key *pk)
|
||||
int count,PKT_public_key *pk,PKT_secret_key *sk)
|
||||
{
|
||||
int i;
|
||||
struct expando_args args;
|
||||
@ -224,9 +224,12 @@ void show_photos(const struct user_attribute *attrs,
|
||||
|
||||
memset(&args,0,sizeof(args));
|
||||
args.pk=pk;
|
||||
args.sk=sk;
|
||||
|
||||
if(pk)
|
||||
keyid_from_pk(pk,kid);
|
||||
else if(sk)
|
||||
keyid_from_sk(sk,kid);
|
||||
|
||||
for(i=0;i<count;i++)
|
||||
if(attrs[i].type==ATTRIB_IMAGE &&
|
||||
|
@ -8,6 +8,7 @@
|
||||
PKT_user_id *generate_photo_id(PKT_public_key *pk);
|
||||
int parse_image_header(const struct user_attribute *attr,byte *type,u32 *len);
|
||||
char *image_type_to_string(byte type,int style);
|
||||
void show_photos(const struct user_attribute *attrs,int count,PKT_public_key *pk);
|
||||
void show_photos(const struct user_attribute *attrs,
|
||||
int count,PKT_public_key *pk,PKT_secret_key *sk);
|
||||
|
||||
#endif /* !_PHOTOID_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user