1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-08 23:37:47 +02:00

* gpgkeys_ldap.c (build_attrs), ksutil.c (ks_toupper, ks_strcasecmp),

ksutil.h: Remove the need for strcasecmp as the field tags are always
lowercase.
This commit is contained in:
David Shaw 2006-09-28 19:30:03 +00:00
parent 29f68725d0
commit 61765b20e6
4 changed files with 10 additions and 33 deletions

View File

@ -1,3 +1,9 @@
2006-09-28 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_ldap.c (build_attrs), ksutil.c (ks_toupper,
ks_strcasecmp), ksutil.h: Remove the need for strcasecmp as the
field tags are always lowercase.
2006-09-26 Werner Koch <wk@g10code.com>
* gpgkeys_finger.c (get_key): Cast away signed/unsigned char ptr

View File

@ -367,7 +367,7 @@ build_attrs(LDAPMod ***modlist,char *line)
if((record=strsep(&line,":"))==NULL)
return;
if (ks_strcasecmp("pub",record)==0)
if (strcmp("pub",record)==0)
{
char *tok;
int disabled=0,revoked=0;
@ -473,7 +473,7 @@ build_attrs(LDAPMod ***modlist,char *line)
make_one_attr(modlist,"pgpDisabled",disabled?"1":"0");
make_one_attr(modlist,"pgpRevoked",revoked?"1":"0");
}
else if (ks_strcasecmp("sub",record)==0)
else if (strcmp("sub",record)==0)
{
char *tok;
@ -511,7 +511,7 @@ build_attrs(LDAPMod ***modlist,char *line)
/* Ignore the rest of the items for subkeys since the LDAP
schema doesn't store them. */
}
else if (ks_strcasecmp("uid",record)==0)
else if (strcmp("uid",record)==0)
{
char *userid,*tok;
@ -548,7 +548,7 @@ build_attrs(LDAPMod ***modlist,char *line)
make_one_attr(modlist,"pgpUserID",userid);
}
else if(ks_strcasecmp("sig",record)==0)
else if(strcmp("sig",record)==0)
{
char *tok;

View File

@ -574,29 +574,3 @@ ks_hextobyte (const char *s)
return -1;
return c;
}
/* Non localized version of toupper. */
int
ks_toupper (int c)
{
if (c >= 'a' && c <= 'z')
c &= ~0x20;
return c;
}
/* Non localized version of strcasecmp. */
int
ks_strcasecmp (const char *a, const char *b)
{
if (a == b)
return 0;
for (; *a && *b; a++, b++)
{
if (*a != *b && ks_toupper (*a) != ks_toupper (*b))
break;
}
return *a == *b? 0 : (ks_toupper (*a) - ks_toupper (*b));
}

View File

@ -139,8 +139,5 @@ size_t curl_writer(const void *ptr,size_t size,size_t nmemb,void *cw_ctx);
void curl_writer_finalize(struct curl_writer_ctx *ctx);
int ks_hextobyte (const char *s);
int ks_toupper (int c);
int ks_strcasecmp (const char *a, const char *b);
#endif /* !_KSUTIL_H_ */