* options.h, keyserver.c (parse_keyserver_options): Remove
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 22 Feb 2006 20:34:48 +0000 (20:34 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 22 Feb 2006 20:34:48 +0000 (20:34 +0000)
auto-cert-retrieve as it is no longer meaningful.  Add max-cert-size to
allow users to pick a max key size retrieved via CERT.

g10/ChangeLog
g10/keyserver.c
g10/options.h

index 35f20b0..4660e9d 100644 (file)
@@ -1,5 +1,10 @@
 2006-02-22  David Shaw  <dshaw@jabberwocky.com>
 
+       * options.h, keyserver.c (parse_keyserver_options): Remove
+       auto-cert-retrieve as it is no longer meaningful.  Add
+       max-cert-size to allow users to pick a max key size retrieved via
+       CERT.
+
        * options.h, gpg.c (main), mainproc.c (check_sig_and_print),
        keyserver.c (keyserver_opts): Rename auto-pka-retrieve to
        honor-pka-record to be consistent with honor-keyserver-url.
index 6157949..d9ed7eb 100644 (file)
@@ -72,6 +72,7 @@ enum ks_action {KS_UNKNOWN=0,KS_GET,KS_GETNAME,KS_SEND,KS_SEARCH};
 
 static struct parse_options keyserver_opts[]=
   {
+    {"max-cert-size",0,NULL,NULL},
     {"include-revoked",KEYSERVER_INCLUDE_REVOKED,NULL,
      N_("include revoked keys in search results")},
     {"include-subkeys",KEYSERVER_INCLUDE_SUBKEYS,NULL,
@@ -85,8 +86,6 @@ static struct parse_options keyserver_opts[]=
      NULL},
     {"auto-key-retrieve",KEYSERVER_AUTO_KEY_RETRIEVE,NULL,
      N_("automatically retrieve keys when verifying signatures")},
-    {"auto-cert-retrieve",KEYSERVER_AUTO_CERT_RETRIEVE,NULL,
-     N_("automatically retrieve keys from DNS")},
     {"try-dns-srv",KEYSERVER_TRY_DNS_SRV,NULL,
      NULL},
     {"honor-keyserver-url",KEYSERVER_HONOR_KEYSERVER_URL,NULL,
@@ -112,7 +111,7 @@ parse_keyserver_options(char *options)
   char *tok;
   char *max_cert;
 
-  keyserver_opts[7].value=&max_cert;
+  keyserver_opts[0].value=&max_cert;
 
   while((tok=optsep(&options)))
     {
@@ -173,10 +172,9 @@ parse_keyserver_options(char *options)
        }
     }
 
-  if(opt.keyserver_options.options&KEYSERVER_AUTO_CERT_RETRIEVE)
+  if(max_cert)
     {
-      if(max_cert)
-       max_cert_size=strtoul(max_cert,(char **)NULL,10);
+      max_cert_size=strtoul(max_cert,(char **)NULL,10);
 
       if(max_cert_size==0)
        max_cert_size=DEFAULT_MAX_CERT_SIZE;
index 433016a..d609241 100644 (file)
@@ -320,6 +320,5 @@ struct {
 #define KEYSERVER_TRY_DNS_SRV            (1<<6)
 #define KEYSERVER_HONOR_KEYSERVER_URL    (1<<7)
 #define KEYSERVER_HONOR_PKA_RECORD       (1<<8)
-#define KEYSERVER_AUTO_CERT_RETRIEVE     (1<<9)
 
 #endif /*G10_OPTIONS_H*/