1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2018-12-04 15:27:19 +01:00
parent 0e8bf20479
commit ba46a359b9
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 81 additions and 10 deletions

View file

@ -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: