diff options
author | Marcus Brinkmann <[email protected]> | 2006-10-02 10:58:08 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2006-10-02 10:58:08 +0000 |
commit | 807cb227d1014e2c057240c3c8a44850a3732517 (patch) | |
tree | 3946413e71a1540e43ab3df7afcf52eaf04ee2f9 | |
parent | 2006-10-02 Marcus Brinkmann <[email protected]> (diff) | |
download | gnupg-807cb227d1014e2c057240c3c8a44850a3732517.tar.gz gnupg-807cb227d1014e2c057240c3c8a44850a3732517.zip |
2006-10-02 Marcus Brinkmann <[email protected]>
* server.c (register_commands): New commands DUMPKEYS and
DUMPSECRETKEYS.
(cmd_dumpkeys, cmd_dumpsecretkeys): New functions.
(option_handler): Support with-key-data option.
-rw-r--r-- | sm/ChangeLog | 7 | ||||
-rw-r--r-- | sm/server.c | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog index 9babf133c..dd469ae16 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,10 @@ +2006-10-02 Marcus Brinkmann <[email protected]> + + * server.c (register_commands): New commands DUMPKEYS and + DUMPSECRETKEYS. + (cmd_dumpkeys, cmd_dumpsecretkeys): New functions. + (option_handler): Support with-key-data option. + 2006-09-26 Werner Koch <[email protected]> * certchain.c (gpgsm_validate_chain): More changes for the relax diff --git a/sm/server.c b/sm/server.c index 16475f66e..4054c1857 100644 --- a/sm/server.c +++ b/sm/server.c @@ -182,6 +182,10 @@ option_handler (assuan_context_t ctx, const char *key, const char *value) int i = *value? atoi (value) : 0; ctrl->with_validation = i; } + else if (!strcmp (key, "with-key-data")) + { + opt.with_key_data = 1; + } else return gpg_error (GPG_ERR_UNKNOWN_OPTION); @@ -644,7 +648,9 @@ cmd_message (assuan_context_t ctx, char *line) } /* LISTKEYS [<patterns>] + DUMPKEYS [<patterns>] LISTSECRETKEYS [<patterns>] + DUMPSECRETKEYS [<patterns>] */ static int do_listkeys (assuan_context_t ctx, char *line, int mode) @@ -717,11 +723,23 @@ cmd_listkeys (assuan_context_t ctx, char *line) } static int +cmd_dumpkeys (assuan_context_t ctx, char *line) +{ + return do_listkeys (ctx, line, 259); +} + +static int cmd_listsecretkeys (assuan_context_t ctx, char *line) { return do_listkeys (ctx, line, 2); } +static int +cmd_dumpsecretkeys (assuan_context_t ctx, char *line) +{ + return do_listkeys (ctx, line, 258); +} + /* GENKEY @@ -780,7 +798,9 @@ register_commands (assuan_context_t ctx) { "OUTPUT", NULL }, { "MESSAGE", cmd_message }, { "LISTKEYS", cmd_listkeys }, + { "DUMPKEYS", cmd_dumpkeys }, { "LISTSECRETKEYS",cmd_listsecretkeys }, + { "DUMPSECRETKEYS",cmd_dumpsecretkeys }, { "GENKEY", cmd_genkey }, { "DELKEYS", cmd_delkeys }, { NULL } |