mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
tools: Show a clearer error message if a server doesn't support WKS
* tools/gpg-wks-client.c (command_send): If we fail to lookup the submission address, print a better error message. If it is because the corresponding file doesn't exist, provide the hint that the server probably doesn't support WKS. Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
e917dfcd97
commit
1909e994cb
@ -690,7 +690,16 @@ command_send (const char *fingerprint, char *userid)
|
||||
else
|
||||
err = wkd_get_submission_address (addrspec, &submission_to);
|
||||
if (err)
|
||||
goto leave;
|
||||
{
|
||||
char *domain = strchr (addrspec, '@');
|
||||
if (domain)
|
||||
domain = domain + 1;
|
||||
log_error (_("looking up WKS submission address for %s: %s\n"),
|
||||
domain ? domain : addrspec, gpg_strerror (err));
|
||||
if (gpg_err_code (err) == GPG_ERR_NO_DATA)
|
||||
log_error (_("this domain probably doesn't support WKS.\n"));
|
||||
goto leave;
|
||||
}
|
||||
log_info ("submitting request to '%s'\n", submission_to);
|
||||
|
||||
/* Get the policy flags. */
|
||||
@ -704,7 +713,7 @@ command_send (const char *fingerprint, char *userid)
|
||||
log_error ("error reading policy flags for '%s': %s\n",
|
||||
submission_to, gpg_strerror (err));
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
if (mbuf)
|
||||
{
|
||||
err = wks_parse_policy (&policy, mbuf, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user