1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* call-agent.c (gpgsm_agent_havekey): New.

* keylist.c (list_cert_colon): New arg HAVE_SECRET, print "crs"
when we know that the secret key is available.
(gpgsm_list_keys): New arg MODE, check whether a secret key is
available.  Changed all callers.
* gpgsm.c (main): New command --list-secret-keys.
* server.c (cmd_listsecretkeys): New.
(cmd_listkeys): Return secret keys with "crs" record.
This commit is contained in:
Werner Koch 2002-01-29 10:05:24 +00:00
parent 2d1d9d928c
commit cd30feaa8e
6 changed files with 89 additions and 14 deletions

View file

@ -378,7 +378,20 @@ cmd_listkeys (ASSUAN_CONTEXT ctx, char *line)
ctrl->with_colons = 1;
/* fixme: check that the returned data_fp is not NULL */
gpgsm_list_keys (assuan_get_pointer (ctx), NULL,
assuan_get_data_fp (ctx));
assuan_get_data_fp (ctx), 3);
return 0;
}
static int
cmd_listsecretkeys (ASSUAN_CONTEXT ctx, char *line)
{
CTRL ctrl = assuan_get_pointer (ctx);
ctrl->with_colons = 1;
/* fixme: check that the returned data_fp is not NULL */
gpgsm_list_keys (assuan_get_pointer (ctx), NULL,
assuan_get_data_fp (ctx), 2);
return 0;
}
@ -442,6 +455,7 @@ register_commands (ASSUAN_CONTEXT ctx)
{ "", ASSUAN_CMD_OUTPUT, NULL },
{ "MESSAGE", 0, cmd_message },
{ "LISTKEYS", 0, cmd_listkeys },
{ "LISTSECRETKEYS", 0, cmd_listsecretkeys },
{ "GENKEY", 0, cmd_genkey },
{ NULL }
};