[svn] GnuPG - r4032 - trunk/g10

svn author dshaw cvs at cvs.gnupg.org
Wed Mar 1 19:16:58 CET 2006


Author: dshaw
Date: 2006-03-01 19:16:55 +0100 (Wed, 01 Mar 2006)
New Revision: 4032

Modified:
   trunk/g10/ChangeLog
   trunk/g10/getkey.c
   trunk/g10/misc.c
Log:
* getkey.c (parse_auto_key_locate): Error if the user selects "cert" or
"pka" when those features are disabled.

* misc.c (has_invalid_email_chars): Fix some C syntax that broke the
compilers on SGI IRIX MIPS and Compaq/DEC OSF/1 Alpha.  Noted by Nelson H.
F. Beebe.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2006-03-01 17:05:38 UTC (rev 4031)
+++ trunk/g10/ChangeLog	2006-03-01 18:16:55 UTC (rev 4032)
@@ -1,3 +1,12 @@
+2006-03-01  David Shaw  <dshaw at jabberwocky.com>
+
+	* getkey.c (parse_auto_key_locate): Error if the user selects
+	"cert" or "pka" when those features are disabled.
+
+	* misc.c (has_invalid_email_chars): Fix some C syntax that broke
+	the compilers on SGI IRIX MIPS and Compaq/DEC OSF/1 Alpha.  Noted
+	by Nelson H. F. Beebe.
+
 2006-02-27  David Shaw  <dshaw at jabberwocky.com>
 
 	* options.skel: Document auto-key-locate and give a pointer to

Modified: trunk/g10/getkey.c
===================================================================
--- trunk/g10/getkey.c	2006-03-01 17:05:38 UTC (rev 4031)
+++ trunk/g10/getkey.c	2006-03-01 18:16:55 UTC (rev 4032)
@@ -2928,14 +2928,18 @@
 
       akl=xmalloc_clear(sizeof(*akl));
 
-      if(ascii_strcasecmp(tok,"cert")==0)
+      if(ascii_strcasecmp(tok,"ldap")==0)
+	akl->type=AKL_LDAP;
+      else if(ascii_strcasecmp(tok,"keyserver")==0)
+	akl->type=AKL_KEYSERVER;
+#ifdef USE_DNS_CERT
+      else if(ascii_strcasecmp(tok,"cert")==0)
 	akl->type=AKL_CERT;
+#endif
+#ifdef USE_DNS_PKA
       else if(ascii_strcasecmp(tok,"pka")==0)
 	akl->type=AKL_PKA;
-      else if(ascii_strcasecmp(tok,"ldap")==0)
-	akl->type=AKL_LDAP;
-      else if(ascii_strcasecmp(tok,"keyserver")==0)
-	akl->type=AKL_KEYSERVER;
+#endif
       else if((akl->spec=parse_keyserver_uri(tok,1,NULL,0)))
 	akl->type=AKL_SPEC;
       else

Modified: trunk/g10/misc.c
===================================================================
--- trunk/g10/misc.c	2006-03-01 17:05:38 UTC (rev 4031)
+++ trunk/g10/misc.c	2006-03-01 18:16:55 UTC (rev 4032)
@@ -1081,15 +1081,12 @@
 }
 
 
-
-
 int
 has_invalid_email_chars (const char *s)
 {
   int at_seen=0;
-  static char valid_chars[] = ("01234567890_-."
-                               "abcdefghijklmnopqrstuvwxyz"
-                               "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+  const char *valid_chars=
+    "01234567890_-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
   for ( ; *s; s++ ) 
     {




More information about the Gnupg-commits mailing list