wks: Make gpg-wks-client --mirror work w/o args.

* tools/gpg-wks-client.c (mirror_one_key): Test for no domain
specified.
--

The code did not really work if no domain was given.  It worked but
filtered out all keys so that no key was actually exported.
This commit is contained in:
Werner Koch 2024-03-06 10:00:37 +01:00
parent 345794cfe6
commit 37cc255e49
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ static struct key_item *utk_list; /* all ultimately trusted keys */
static struct key_item *trusted_key_list;
static int any_trusted_key_seen;
/* Flag whether a trustdb chekc is pending. */
/* Flag whether a trustdb check is pending. */
static int pending_check_trustdb;

View File

@ -2026,7 +2026,7 @@ mirror_one_key (estream_t key)
continue; /* No mail box or already processed. */
if (uid->expired)
continue;
if (!domain_matches_mbox (domain, uid->mbox))
if (*domain && !domain_matches_mbox (domain, uid->mbox))
continue; /* We don't want this one. */
if (is_in_blacklist (uid->mbox))
continue;