aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks-client.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-12-04 14:27:19 +0000
committerWerner Koch <[email protected]>2018-12-04 14:31:41 +0000
commitba46a359b9d6549b74ec8401ea39bad434d87564 (patch)
tree119f6eecb9dfb04ccef6f355f930234d832e4742 /tools/gpg-wks-client.c
parentgpg: New list-option "show-only-fpr-mbox". (diff)
downloadgnupg-ba46a359b9d6549b74ec8401ea39bad434d87564.tar.gz
gnupg-ba46a359b9d6549b74ec8401ea39bad434d87564.zip
wks: Allow reading of --install-key arguments from stdin.
* tools/wks-util.c (install_key_from_spec_file): New. (wks_cmd_install_key): Call it. * tools/gpg-wks-client.c (main): Allow --install-key w/o arguments. * tools/gpg-wks-server.c (main): Ditto. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpg-wks-client.c')
-rw-r--r--tools/gpg-wks-client.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c
index 5535a6812..0dee1a2a1 100644
--- a/tools/gpg-wks-client.c
+++ b/tools/gpg-wks-client.c
@@ -363,9 +363,12 @@ main (int argc, char **argv)
break;
case aInstallKey:
- if (argc != 2)
- wrong_args ("--install-key FILE|FINGERPRINT USER-ID");
- err = wks_cmd_install_key (*argv, argv[1]);
+ if (!argc)
+ err = wks_cmd_install_key (NULL, NULL);
+ else if (argc == 2)
+ err = wks_cmd_install_key (*argv, argv[1]);
+ else
+ wrong_args ("--install-key [FILE|FINGERPRINT USER-ID]");
break;
case aRemoveKey: