summaryrefslogtreecommitdiffstats
path: root/g10/server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-12-14 21:12:56 +0100
committerWerner Koch <wk@gnupg.org>2009-12-14 21:12:56 +0100
commit4d693033ab77e4e0f6349b712bcd2c0a9ac4e42c (patch)
treec43943d4fb3d78514e75a177a8c854288a82a854 /g10/server.c
parentadd new gpgsm server command PASSWD (diff)
downloadgnupg2-4d693033ab77e4e0f6349b712bcd2c0a9ac4e42c.tar.xz
gnupg2-4d693033ab77e4e0f6349b712bcd2c0a9ac4e42c.zip
Implement dynamic S2K count computation.
Diffstat (limited to '')
-rw-r--r--g10/server.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/g10/server.c b/g10/server.c
index ee8089491..d817f7f6c 100644
--- a/g10/server.c
+++ b/g10/server.c
@@ -601,6 +601,24 @@ cmd_getinfo (assuan_context_t ctx, char *line)
return rc;
}
+static const char hlp_passwd[] =
+ "PASSWD <userID>\n"
+ "\n"
+ "Change the passphrase of the secret key for USERID.";
+static gpg_error_t
+cmd_passwd (assuan_context_t ctx, char *line)
+{
+ ctrl_t ctrl = assuan_get_pointer (ctx);
+ gpg_error_t err;
+
+ line = skip_options (line);
+
+ err = gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ return err;
+}
+
+
/* Helper to register our commands with libassuan. */
@@ -611,6 +629,7 @@ register_commands (assuan_context_t ctx)
{
const char *name;
assuan_handler_t handler;
+ assuan_handler_t help;
} table[] = {
{ "RECIPIENT", cmd_recipient },
{ "SIGNER", cmd_signer },
@@ -628,13 +647,15 @@ register_commands (assuan_context_t ctx)
{ "GENKEY", cmd_genkey },
{ "DELKEYS", cmd_delkeys },
{ "GETINFO", cmd_getinfo },
+ { "PASSWD", cmd_passwd, hlp_passwd},
{ NULL }
};
int i, rc;
for (i=0; table[i].name; i++)
{
- rc = assuan_register_command (ctx, table[i].name, table[i].handler, NULL);
+ rc = assuan_register_command (ctx, table[i].name,
+ table[i].handler, table[i].help);
if (rc)
return rc;
}