mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Lowercase mailbox for PKA lookups.
* common/stringhelp.c (ascii_strlwr): New. * common/mbox-util.c (mailbox_from_userid): Downcase result. -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
736710aede
commit
c071be698e
3 changed files with 17 additions and 3 deletions
|
@ -804,6 +804,18 @@ ascii_tolower (int c)
|
|||
return c;
|
||||
}
|
||||
|
||||
/* Lowercase all ASCII characters in S. */
|
||||
char *
|
||||
ascii_strlwr (char *s)
|
||||
{
|
||||
char *p = s;
|
||||
|
||||
for (p=s; *p; p++ )
|
||||
if (isascii (*p) && *p >= 'A' && *p <= 'Z')
|
||||
*p |= 0x20;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
int
|
||||
ascii_strcasecmp( const char *a, const char *b )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue