mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-26 22:29:58 +01: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:
parent
29f68725d0
commit
61765b20e6
@ -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>
|
2006-09-26 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* gpgkeys_finger.c (get_key): Cast away signed/unsigned char ptr
|
* gpgkeys_finger.c (get_key): Cast away signed/unsigned char ptr
|
||||||
|
@ -367,7 +367,7 @@ build_attrs(LDAPMod ***modlist,char *line)
|
|||||||
if((record=strsep(&line,":"))==NULL)
|
if((record=strsep(&line,":"))==NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ks_strcasecmp("pub",record)==0)
|
if (strcmp("pub",record)==0)
|
||||||
{
|
{
|
||||||
char *tok;
|
char *tok;
|
||||||
int disabled=0,revoked=0;
|
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,"pgpDisabled",disabled?"1":"0");
|
||||||
make_one_attr(modlist,"pgpRevoked",revoked?"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;
|
char *tok;
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ build_attrs(LDAPMod ***modlist,char *line)
|
|||||||
/* Ignore the rest of the items for subkeys since the LDAP
|
/* Ignore the rest of the items for subkeys since the LDAP
|
||||||
schema doesn't store them. */
|
schema doesn't store them. */
|
||||||
}
|
}
|
||||||
else if (ks_strcasecmp("uid",record)==0)
|
else if (strcmp("uid",record)==0)
|
||||||
{
|
{
|
||||||
char *userid,*tok;
|
char *userid,*tok;
|
||||||
|
|
||||||
@ -548,7 +548,7 @@ build_attrs(LDAPMod ***modlist,char *line)
|
|||||||
|
|
||||||
make_one_attr(modlist,"pgpUserID",userid);
|
make_one_attr(modlist,"pgpUserID",userid);
|
||||||
}
|
}
|
||||||
else if(ks_strcasecmp("sig",record)==0)
|
else if(strcmp("sig",record)==0)
|
||||||
{
|
{
|
||||||
char *tok;
|
char *tok;
|
||||||
|
|
||||||
|
@ -574,29 +574,3 @@ ks_hextobyte (const char *s)
|
|||||||
return -1;
|
return -1;
|
||||||
return c;
|
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));
|
|
||||||
}
|
|
||||||
|
@ -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);
|
void curl_writer_finalize(struct curl_writer_ctx *ctx);
|
||||||
|
|
||||||
int ks_hextobyte (const char *s);
|
int ks_hextobyte (const char *s);
|
||||||
int ks_toupper (int c);
|
|
||||||
int ks_strcasecmp (const char *a, const char *b);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* !_KSUTIL_H_ */
|
#endif /* !_KSUTIL_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user