mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
wkd: Support option --output for command --check.
* tools/wks-util.c (write_to_file): Rename to ... (wks_write_to_file): this, make global, and support NULL for fname. * tools/gpg-wks-client.c (command_check): Write to key.
This commit is contained in:
parent
e28b6c301d
commit
33b6ee5047
4 changed files with 39 additions and 11 deletions
|
@ -1126,6 +1126,19 @@ command_check (char *userid)
|
|||
addrspec);
|
||||
err = gpg_error (GPG_ERR_CERT_REVOKED);
|
||||
}
|
||||
else if (opt.output)
|
||||
{
|
||||
/* Save to file. */
|
||||
const char *fname = opt.output;
|
||||
|
||||
if (*fname == '-' && !fname[1])
|
||||
fname = NULL;
|
||||
es_rewind (key);
|
||||
err = wks_write_to_file (key, fname);
|
||||
if (err)
|
||||
log_error ("writing key to '%s' failed: %s\n",
|
||||
fname? fname : "[stdout]", gpg_strerror (err));
|
||||
}
|
||||
|
||||
leave:
|
||||
xfree (fpr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue