1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

2006-10-02 Marcus Brinkmann <marcus@g10code.de>

* server.c (register_commands): New commands DUMPKEYS and
        DUMPSECRETKEYS.
        (cmd_dumpkeys, cmd_dumpsecretkeys): New functions.
        (option_handler): Support with-key-data option.
This commit is contained in:
Marcus Brinkmann 2006-10-02 10:58:08 +00:00
parent bacb77af29
commit 807cb227d1
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2006-10-02 Marcus Brinkmann <marcus@g10code.de>
* 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 <wk@g10code.com>
* certchain.c (gpgsm_validate_chain): More changes for the relax

View File

@ -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)
@ -716,12 +722,24 @@ cmd_listkeys (assuan_context_t ctx, char *line)
return do_listkeys (ctx, line, 3);
}
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 }