summaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks-client.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-08-03 21:16:22 +0200
committerWerner Koch <wk@gnupg.org>2017-08-03 21:16:34 +0200
commit6cba56d436b56ea5e60042144a8a75a2e80007c8 (patch)
treeface28ae11b386921b5f0e9df9f62678fd519330 /tools/gpg-wks-client.c
parentg10: Always save standard revocation certificate in file. (diff)
downloadgnupg2-6cba56d436b56ea5e60042144a8a75a2e80007c8.tar.xz
gnupg2-6cba56d436b56ea5e60042144a8a75a2e80007c8.zip
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>
Diffstat (limited to 'tools/gpg-wks-client.c')
-rw-r--r--tools/gpg-wks-client.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c
index 746aa53d3..594f28a7c 100644
--- a/tools/gpg-wks-client.c
+++ b/tools/gpg-wks-client.c
@@ -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);