1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-25 01:42:45 +02:00

* options.h, keyserver.c (parse_keyserver_options, keyserver_spawn): Don't

treat 'verbose' and 'include-disabled' as special.  Just pass them through
silently to the keyserver helper.
This commit is contained in:
David Shaw 2005-03-17 22:55:17 +00:00
parent efa0dd21a2
commit ff93f3528a
3 changed files with 18 additions and 22 deletions

View File

@ -1,3 +1,9 @@
2005-03-17 David Shaw <dshaw@jabberwocky.com>
* options.h, keyserver.c (parse_keyserver_options,
keyserver_spawn): Don't treat 'verbose' and 'include-disabled' as
special. Just pass them through silently to the keyserver helper.
2005-03-16 Werner Koch <wk@g10code.com>
* ccid-driver.c (parse_ccid_descriptor): Make SCM workaround

View File

@ -54,12 +54,11 @@ struct keyrec
};
/* Tell remote processes about these options */
#define REMOTE_TELL (KEYSERVER_INCLUDE_REVOKED|KEYSERVER_INCLUDE_DISABLED|KEYSERVER_INCLUDE_SUBKEYS|KEYSERVER_TRY_DNS_SRV)
#define REMOTE_TELL (KEYSERVER_INCLUDE_REVOKED|KEYSERVER_INCLUDE_SUBKEYS|KEYSERVER_TRY_DNS_SRV)
static struct parse_options keyserver_opts[]=
{
{"include-revoked",KEYSERVER_INCLUDE_REVOKED,NULL},
{"include-disabled",KEYSERVER_INCLUDE_DISABLED,NULL},
{"include-subkeys",KEYSERVER_INCLUDE_SUBKEYS,NULL},
{"keep-temp-files",KEYSERVER_KEEP_TEMP_FILES,NULL},
{"refresh-add-fake-v3-keyids",KEYSERVER_ADD_FAKE_V3,NULL},
@ -97,17 +96,13 @@ parse_keyserver_options(char *options)
that you must use strncasecmp here as there might be an
=argument attached which will foil the use of strcasecmp. */
if(ascii_strncasecmp(tok,"verbose",7)==0)
opt.keyserver_options.verbose++;
else if(ascii_strncasecmp(tok,"no-verbose",10)==0)
opt.keyserver_options.verbose--;
#ifdef EXEC_TEMPFILE_ONLY
else if(ascii_strncasecmp(tok,"use-temp-files",14)==0 ||
if(ascii_strncasecmp(tok,"use-temp-files",14)==0 ||
ascii_strncasecmp(tok,"no-use-temp-files",17)==0)
log_info(_("WARNING: keyserver option `%s' is not used"
" on this platform\n"),tok);
#else
else if(ascii_strncasecmp(tok,"use-temp-files",14)==0)
if(ascii_strncasecmp(tok,"use-temp-files",14)==0)
opt.keyserver_options.options|=KEYSERVER_USE_TEMP_FILES;
else if(ascii_strncasecmp(tok,"no-use-temp-files",17)==0)
opt.keyserver_options.options&=~KEYSERVER_USE_TEMP_FILES;
@ -931,9 +926,6 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
if(opt.keyserver_options.options & kopts[i].bit & REMOTE_TELL)
fprintf(spawn->tochild,"OPTION %s\n",kopts[i].name);
for(i=0;i<opt.keyserver_options.verbose;i++)
fprintf(spawn->tochild,"OPTION verbose\n");
for(temp=opt.keyserver_options.other;temp;temp=temp->next)
fprintf(spawn->tochild,"OPTION %s\n",temp->d);

View File

@ -1,6 +1,6 @@
/* options.h
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
* 2004 Free Software Foundation, Inc.
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
* 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -137,7 +137,6 @@ struct
} *keyserver;
struct
{
int verbose;
unsigned int options;
unsigned int import_options;
unsigned int export_options;
@ -283,13 +282,12 @@ struct {
#define VERIFY_SHOW_UNUSABLE_UIDS (1<<6)
#define KEYSERVER_INCLUDE_REVOKED (1<<0)
#define KEYSERVER_INCLUDE_DISABLED (1<<1)
#define KEYSERVER_INCLUDE_SUBKEYS (1<<2)
#define KEYSERVER_USE_TEMP_FILES (1<<3)
#define KEYSERVER_KEEP_TEMP_FILES (1<<4)
#define KEYSERVER_ADD_FAKE_V3 (1<<5)
#define KEYSERVER_AUTO_KEY_RETRIEVE (1<<6)
#define KEYSERVER_TRY_DNS_SRV (1<<7)
#define KEYSERVER_HONOR_KEYSERVER_URL (1<<8)
#define KEYSERVER_INCLUDE_SUBKEYS (1<<1)
#define KEYSERVER_USE_TEMP_FILES (1<<2)
#define KEYSERVER_KEEP_TEMP_FILES (1<<3)
#define KEYSERVER_ADD_FAKE_V3 (1<<4)
#define KEYSERVER_AUTO_KEY_RETRIEVE (1<<5)
#define KEYSERVER_TRY_DNS_SRV (1<<6)
#define KEYSERVER_HONOR_KEYSERVER_URL (1<<7)
#endif /*G10_OPTIONS_H*/