aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks-server.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-07-26 15:49:39 +0000
committerWerner Koch <[email protected]>2017-07-26 15:53:00 +0000
commitb428dd495a1a960de0da27976bf50b191b6a1ddf (patch)
treef96e6ac03d8f38169c590e58dbdf03eeeb553a55 /tools/gpg-wks-server.c
parentdoc: Update vsnfd profile example (diff)
downloadgnupg-b428dd495a1a960de0da27976bf50b191b6a1ddf.tar.gz
gnupg-b428dd495a1a960de0da27976bf50b191b6a1ddf.zip
wks: Add stubs for new gpg-wks-server commands.
-- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpg-wks-server.c')
-rw-r--r--tools/gpg-wks-server.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c
index fc5bd708e..cdb1674e4 100644
--- a/tools/gpg-wks-server.c
+++ b/tools/gpg-wks-server.c
@@ -63,6 +63,9 @@ enum cmd_and_opt_values
aReceive,
aCron,
aListDomains,
+ aInstallKey,
+ aRevokeKey,
+ aRemoveKey,
oGpgProgram,
oSend,
@@ -83,6 +86,12 @@ static ARGPARSE_OPTS opts[] = {
("run regular jobs")),
ARGPARSE_c (aListDomains, "list-domains",
("list configured domains")),
+ ARGPARSE_c (aInstallKey, "install-key",
+ "|FILE|install a key from FILE into the WKD"),
+ ARGPARSE_c (aRemoveKey, "remove-key",
+ "|ADDR|remove the key ADDR from the WKD"),
+ ARGPARSE_c (aRevokeKey, "revoke-key",
+ "|ADDR|mark the key ADDR in the WKD as revoked"),
ARGPARSE_group (301, ("@\nOptions:\n ")),
@@ -130,6 +139,9 @@ static gpg_error_t command_receive_cb (void *opaque,
const char *mediatype, estream_t fp,
unsigned int flags);
static gpg_error_t command_list_domains (void);
+static gpg_error_t command_install_key (const char *fname);
+static gpg_error_t command_remove_key (const char *mailaddr);
+static gpg_error_t command_revoke_key (const char *mailaddr);
static gpg_error_t command_cron (void);
@@ -212,6 +224,9 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts)
case aReceive:
case aCron:
case aListDomains:
+ case aInstallKey:
+ case aRemoveKey:
+ case aRevokeKey:
cmd = pargs->r_opt;
break;
@@ -337,6 +352,24 @@ main (int argc, char **argv)
err = command_list_domains ();
break;
+ case aInstallKey:
+ if (argc != 1)
+ wrong_args ("--install-key FILE");
+ err = command_install_key (*argv);
+ break;
+
+ case aRemoveKey:
+ if (argc != 1)
+ wrong_args ("--remove-key MAILADDR");
+ err = command_remove_key (*argv);
+ break;
+
+ case aRevokeKey:
+ if (argc != 1)
+ wrong_args ("--revoke-key MAILADDR");
+ err = command_revoke_key (*argv);
+ break;
+
default:
usage (1);
err = gpg_error (GPG_ERR_BUG);
@@ -1862,3 +1895,30 @@ command_cron (void)
free_strlist (domaindirs);
return err;
}
+
+
+/* Install a single key into the WKD by reading FNAME. */
+static gpg_error_t
+command_install_key (const char *fname)
+{
+ (void)fname;
+ return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+}
+
+
+/* Remove the key with mail address MAILADDR. */
+static gpg_error_t
+command_remove_key (const char *mailaddr)
+{
+ (void)mailaddr;
+ return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+}
+
+
+/* Revoke the key with mail address MAILADDR. */
+static gpg_error_t
+command_revoke_key (const char *mailaddr)
+{
+ (void)mailaddr;
+ return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+}