wks: Allow gpg-wks-client --supported with just the domain name

* tools/gpg-wks-client.c (command_supported): Hack for missing local
part.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-08-03 21:16:22 +02:00
parent dcfb019598
commit 6cba56d436
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 8 additions and 1 deletions

View File

@ -551,7 +551,14 @@ command_supported (char *userid)
char *addrspec = NULL;
char *submission_to = NULL;
addrspec = mailbox_from_userid (userid);
if (!strchr (userid, '@'))
{
char *tmp = xstrconcat ("foo@", userid, NULL);
addrspec = mailbox_from_userid (tmp);
xfree (tmp);
}
else
addrspec = mailbox_from_userid (userid);
if (!addrspec)
{
log_error (_("\"%s\" is not a proper mail address\n"), userid);