[svn] GnuPG - r4483 - branches/STABLE-BRANCH-1-4/keyserver

svn author dshaw cvs at cvs.gnupg.org
Tue Apr 17 00:43:31 CEST 2007


Author: dshaw
Date: 2007-04-17 00:43:29 +0200 (Tue, 17 Apr 2007)
New Revision: 4483

Modified:
   branches/STABLE-BRANCH-1-4/keyserver/ChangeLog
   branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_curl.c
   branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_hkp.c
   branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c
   branches/STABLE-BRANCH-1-4/keyserver/ksutil.c
Log:
* gpgkeys_curl.c, gpgkeys_ldap.c, gpgkeys_hkp.c, ksutil.c: Rename all
str(n)casecmp to ascii_str(n)casecmp.  We want the locale-independent
ones here.


Modified: branches/STABLE-BRANCH-1-4/keyserver/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/ChangeLog	2007-04-16 22:32:28 UTC (rev 4482)
+++ branches/STABLE-BRANCH-1-4/keyserver/ChangeLog	2007-04-16 22:43:29 UTC (rev 4483)
@@ -1,3 +1,9 @@
+2007-04-16  David Shaw  <dshaw at jabberwocky.com>
+
+	* gpgkeys_curl.c, gpgkeys_ldap.c, gpgkeys_hkp.c, ksutil.c: Rename
+	all str(n)casecmp to ascii_str(n)casecmp.  We want the
+	locale-independent ones here.
+
 2007-03-13  David Shaw  <dshaw at jabberwocky.com>
 
 	* gpgkeys_curl.c (main): Use curl_version_info to verify that the

Modified: branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_curl.c
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_curl.c	2007-04-16 22:32:28 UTC (rev 4482)
+++ branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_curl.c	2007-04-16 22:43:29 UTC (rev 4483)
@@ -44,6 +44,7 @@
 #else
 #include "curl-shim.h"
 #endif
+#include "compat.h"
 #include "keyserver.h"
 #include "ksutil.h"
 
@@ -204,13 +205,13 @@
 
 	  option[MAX_OPTION]='\0';
 
-	  if(strncasecmp(option,"no-",3)==0)
+	  if(ascii_strncasecmp(option,"no-",3)==0)
 	    {
 	      no=1;
 	      start=&option[3];
 	    }
 
-	  if(strncasecmp(start,"http-proxy",10)==0)
+	  if(ascii_strncasecmp(start,"http-proxy",10)==0)
 	    {
 	      /* Safe to not check the return code of strdup() here.
 		 If it fails, we simply won't use a proxy. */
@@ -228,7 +229,7 @@
 		    }
 		}
 	    }
-	  else if(strncasecmp(start,"follow-redirects",16)==0)
+	  else if(ascii_strncasecmp(start,"follow-redirects",16)==0)
 	    {
 	      if(no)
 		follow_redirects=0;
@@ -275,7 +276,7 @@
      print a nicer error message. */
   curldata=curl_version_info(CURLVERSION_NOW);
   for(i=0;curldata->protocols[i];i++)
-    if(strcasecmp(curldata->protocols[i],opt->scheme)==0)
+    if(ascii_strcasecmp(curldata->protocols[i],opt->scheme)==0)
       break;
 
   if(curldata->protocols[i]==NULL)

Modified: branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_hkp.c
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_hkp.c	2007-04-16 22:32:28 UTC (rev 4482)
+++ branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_hkp.c	2007-04-16 22:43:29 UTC (rev 4483)
@@ -1,5 +1,5 @@
 /* gpgkeys_hkp.c - talk to an HKP keyserver
- * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006,
  *               2007 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
@@ -45,6 +45,7 @@
 #else
 #include "curl-shim.h"
 #endif
+#include "compat.h"
 #include "keyserver.h"
 #include "ksutil.h"
 
@@ -597,13 +598,13 @@
 
 	  option[MAX_OPTION]='\0';
 
-	  if(strncasecmp(option,"no-",3)==0)
+	  if(ascii_strncasecmp(option,"no-",3)==0)
 	    {
 	      no=1;
 	      start=&option[3];
 	    }
 
-	  if(strncasecmp(start,"http-proxy",10)==0)
+	  if(ascii_strncasecmp(start,"http-proxy",10)==0)
 	    {
 	      if(no)
 		{
@@ -620,7 +621,7 @@
 		}
 	    }
 #if 0
-	  else if(strcasecmp(start,"try-dns-srv")==0)
+	  else if(ascii_strcasecmp(start,"try-dns-srv")==0)
 	    {
 	      if(no)
 		http_flags&=~HTTP_FLAG_TRY_SRV;

Modified: branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c	2007-04-16 22:32:28 UTC (rev 4482)
+++ branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c	2007-04-16 22:43:29 UTC (rev 4483)
@@ -1,5 +1,6 @@
 /* gpgkeys_ldap.c - talk to a LDAP keyserver
- * Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2004, 2005, 2006,
+ *               2007 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -131,7 +132,7 @@
 
   while(keyptr!=NULL)
     {
-      if(strcasecmp(key,keyptr->str)==0)
+      if(ascii_strcasecmp(key,keyptr->str)==0)
 	return 1;
 
       keyptr=keyptr->next;
@@ -270,7 +271,7 @@
   /* Search modlist for the attribute we're playing with. */
   for(m=*modlist;*m;m++)
     {
-      if(strcasecmp((*m)->mod_type,attr)==0)
+      if(ascii_strcasecmp((*m)->mod_type,attr)==0)
 	{
 	  char **ptr=(*m)->mod_values;
 	  int numvalues=0;
@@ -1478,9 +1479,9 @@
 		    {
 		      /* The LDAP server doesn't exactly handle this
 			 well. */
-		      if(strcasecmp(vals[0],"RSA")==0)
+		      if(ascii_strcasecmp(vals[0],"RSA")==0)
 			fprintf(output,"1");
-		      else if(strcasecmp(vals[0],"DSS/DH")==0)
+		      else if(ascii_strcasecmp(vals[0],"DSS/DH")==0)
 			fprintf(output,"17");
 		      ldap_value_free(vals);
 		    }
@@ -1561,7 +1562,7 @@
 		      vals=ldap_get_values(ldap,uids,"pgpcertid");
 		      if(vals!=NULL)
 			{
-			  if(strcasecmp(certid[0],vals[0])==0)
+			  if(ascii_strcasecmp(certid[0],vals[0])==0)
 			    {
 			      char **uidvals;
 
@@ -1863,25 +1864,25 @@
 
 	  optionstr[MAX_OPTION]='\0';
 
-	  if(strncasecmp(optionstr,"no-",3)==0)
+	  if(ascii_strncasecmp(optionstr,"no-",3)==0)
 	    {
 	      no=1;
 	      start=&optionstr[3];
 	    }
 
-	  if(strncasecmp(start,"tls",3)==0)
+	  if(ascii_strncasecmp(start,"tls",3)==0)
 	    {
 	      if(no)
 		use_tls=0;
 	      else if(start[3]=='=')
 		{
-		  if(strcasecmp(&start[4],"no")==0)
+		  if(ascii_strcasecmp(&start[4],"no")==0)
 		    use_tls=0;
-		  else if(strcasecmp(&start[4],"try")==0)
+		  else if(ascii_strcasecmp(&start[4],"try")==0)
 		    use_tls=1;
-		  else if(strcasecmp(&start[4],"warn")==0)
+		  else if(ascii_strcasecmp(&start[4],"warn")==0)
 		    use_tls=2;
-		  else if(strcasecmp(&start[4],"require")==0)
+		  else if(ascii_strcasecmp(&start[4],"require")==0)
 		    use_tls=3;
 		  else
 		    use_tls=1;
@@ -1889,7 +1890,7 @@
 	      else if(start[3]=='\0')
 		use_tls=1;
 	    }
-	  else if(strncasecmp(start,"basedn",6)==0)
+	  else if(ascii_strncasecmp(start,"basedn",6)==0)
 	    {
 	      if(no)
 		{
@@ -1911,7 +1912,7 @@
 		  real_ldap=1;
 		}
 	    }
-	  else if(strncasecmp(start,"binddn",6)==0)
+	  else if(ascii_strncasecmp(start,"binddn",6)==0)
 	    {
 	      if(no)
 		{
@@ -1933,7 +1934,7 @@
 		  real_ldap=1;
 		}
 	    }
-	  else if(strncasecmp(start,"bindpw",6)==0)
+	  else if(ascii_strncasecmp(start,"bindpw",6)==0)
 	    {
 	      if(no)
 		{
@@ -1967,7 +1968,7 @@
       goto fail;
     }
 
-  if(strcasecmp(opt->scheme,"ldaps")==0)
+  if(ascii_strcasecmp(opt->scheme,"ldaps")==0)
     {
       port=636;
       use_ssl=1;

Modified: branches/STABLE-BRANCH-1-4/keyserver/ksutil.c
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/ksutil.c	2007-04-16 22:32:28 UTC (rev 4482)
+++ branches/STABLE-BRANCH-1-4/keyserver/ksutil.c	2007-04-16 22:43:29 UTC (rev 4483)
@@ -1,5 +1,5 @@
 /* ksutil.c - general keyserver utility functions
- * Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -42,6 +42,7 @@
 #else
 #include "curl-shim.h"
 #endif
+#include "compat.h"
 #include "keyserver.h"
 #include "ksutil.h"
 
@@ -149,13 +150,13 @@
     {
       command[MAX_COMMAND]='\0';
 
-      if(strcasecmp(command,"get")==0)
+      if(ascii_strcasecmp(command,"get")==0)
 	opt->action=KS_GET;
-      else if(strcasecmp(command,"getname")==0)
+      else if(ascii_strcasecmp(command,"getname")==0)
 	opt->action=KS_GETNAME;
-      else if(strcasecmp(command,"send")==0)
+      else if(ascii_strcasecmp(command,"send")==0)
 	opt->action=KS_SEND;
-      else if(strcasecmp(command,"search")==0)
+      else if(ascii_strcasecmp(command,"search")==0)
 	opt->action=KS_SEARCH;
 
       return 0;
@@ -236,13 +237,13 @@
 
       option[MAX_OPTION]='\0';
 
-      if(strncasecmp(option,"no-",3)==0)
+      if(ascii_strncasecmp(option,"no-",3)==0)
 	{
 	  no=1;
 	  start=&option[3];
 	}
 
-      if(strncasecmp(start,"verbose",7)==0)
+      if(ascii_strncasecmp(start,"verbose",7)==0)
 	{
 	  if(no)
 	    opt->verbose=0;
@@ -251,35 +252,35 @@
 	  else
 	    opt->verbose++;
 	}
-      else if(strcasecmp(start,"include-disabled")==0)
+      else if(ascii_strcasecmp(start,"include-disabled")==0)
 	{
 	  if(no)
 	    opt->flags.include_disabled=0;
 	  else
 	    opt->flags.include_disabled=1;
 	}
-      else if(strcasecmp(start,"include-revoked")==0)
+      else if(ascii_strcasecmp(start,"include-revoked")==0)
 	{
 	  if(no)
 	    opt->flags.include_revoked=0;
 	  else
 	    opt->flags.include_revoked=1;
 	}
-      else if(strcasecmp(start,"include-subkeys")==0)
+      else if(ascii_strcasecmp(start,"include-subkeys")==0)
 	{
 	  if(no)
 	    opt->flags.include_subkeys=0;
 	  else
 	    opt->flags.include_subkeys=1;
 	}
-      else if(strcasecmp(start,"check-cert")==0)
+      else if(ascii_strcasecmp(start,"check-cert")==0)
 	{
 	  if(no)
 	    opt->flags.check_cert=0;
 	  else
 	    opt->flags.check_cert=1;
 	}
-      else if(strncasecmp(start,"debug",5)==0)
+      else if(ascii_strncasecmp(start,"debug",5)==0)
 	{
 	  if(no)
 	    opt->debug=0;
@@ -288,7 +289,7 @@
 	  else if(start[5]=='\0')
 	    opt->debug=1;
 	}
-      else if(strncasecmp(start,"timeout",7)==0)
+      else if(ascii_strncasecmp(start,"timeout",7)==0)
 	{
 	  if(no)
 	    opt->timeout=0;
@@ -297,7 +298,7 @@
 	  else if(start[7]=='\0')
 	    opt->timeout=DEFAULT_KEYSERVER_TIMEOUT;
 	}
-      else if(strncasecmp(start,"ca-cert-file",12)==0)
+      else if(ascii_strncasecmp(start,"ca-cert-file",12)==0)
 	{
 	  if(no)
 	    {




More information about the Gnupg-commits mailing list