mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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
|
@ -124,8 +124,9 @@ is_valid_mailbox (const char *name)
|
|||
|
||||
|
||||
/* Return the mailbox (local-part@domain) form a standard user id.
|
||||
Caller must free the result. Returns NULL if no valid mailbox was
|
||||
found (or we are out of memory). */
|
||||
All plain ASCII characters in the result are converted to
|
||||
lowercase. Caller must free the result. Returns NULL if no valid
|
||||
mailbox was found (or we are out of memory). */
|
||||
char *
|
||||
mailbox_from_userid (const char *userid)
|
||||
{
|
||||
|
@ -176,7 +177,7 @@ mailbox_from_userid (const char *userid)
|
|||
else
|
||||
errno = EINVAL;
|
||||
|
||||
return result;
|
||||
return result? ascii_strlwr (result): NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue