1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* photoid.c (get_default_photo_command, show_photos): Honor

FIXED_PHOTO_VIEWER and DISABLE_PHOTO_VIEWER.

* mainproc.c (check_sig_and_print): Use --show-photos to show photos when
verifying a sig made by a key with a photo.

* keyserver.c (parse_keyserver_uri): Properly parse a URI with no :port
section and an empty file path, but with a terminating '/'.
(keyserver_work): Honor DISABLE_KEYSERVER_HELPERS.

* hkp.c (hkp_ask_import): Display keyserver URI as a URI, but only if
verbose.

* exec.c, g10.c: USE_EXEC_PATH -> FIXED_EXEC_PATH
This commit is contained in:
David Shaw 2002-07-04 16:06:38 +00:00
parent 5d74fb31d8
commit 32b11e4501
7 changed files with 46 additions and 6 deletions

View file

@ -218,6 +218,7 @@ char *image_type_to_string(byte type,int style)
return string;
}
#if !defined(FIXED_PHOTO_VIEWER) && !defined(DISABLE_PHOTO_VIEWER)
static const char *get_default_photo_command(void)
{
#if defined(HAVE_DOSISH_SYSTEM)
@ -240,10 +241,12 @@ static const char *get_default_photo_command(void)
return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
#endif
}
#endif
void show_photos(const struct user_attribute *attrs,
int count,PKT_public_key *pk,PKT_secret_key *sk)
{
#ifndef DISABLE_PHOTO_VIEWER
int i;
struct expando_args args;
u32 len;
@ -266,8 +269,12 @@ void show_photos(const struct user_attribute *attrs,
struct exec_info *spawn;
int offset=attrs[i].len-len;
#ifdef FIXED_PHOTO_VIEWER
opt.photo_viewer=FIXED_PHOTO_VIEWER;
#else
if(!opt.photo_viewer)
opt.photo_viewer=get_default_photo_command();
#endif
/* make command grow */
command=pct_expando(opt.photo_viewer,&args);
@ -320,4 +327,5 @@ void show_photos(const struct user_attribute *attrs,
fail:
log_error("unable to display photo ID!\n");
#endif
}