diff options
| author | Werner Koch <[email protected]> | 2018-12-04 14:27:19 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2018-12-04 14:31:41 +0000 |
| commit | ba46a359b9d6549b74ec8401ea39bad434d87564 (patch) | |
| tree | 119f6eecb9dfb04ccef6f355f930234d832e4742 /tools/gpg-wks-server.c | |
| parent | gpg: New list-option "show-only-fpr-mbox". (diff) | |
| download | gnupg-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-server.c')
| -rw-r--r-- | tools/gpg-wks-server.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c index eae93b374..1a0ba8f4f 100644 --- a/tools/gpg-wks-server.c +++ b/tools/gpg-wks-server.c @@ -381,9 +381,12 @@ main (int argc, char **argv) break; case aInstallKey: - if (argc != 2) - wrong_args ("--install-key FILE 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: |
