diff options
author | Werner Koch <[email protected]> | 2002-01-29 10:05:24 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2002-01-29 10:05:24 +0000 |
commit | cd30feaa8ebb37f98742228573da81e7ac8472aa (patch) | |
tree | 8c9b3d0dc1b48f8eefb7f32d0425393646736e50 /sm/server.c | |
parent | * findkey.c (agent_key_available): New. (diff) | |
download | gnupg-cd30feaa8ebb37f98742228573da81e7ac8472aa.tar.gz gnupg-cd30feaa8ebb37f98742228573da81e7ac8472aa.zip |
* 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.
Diffstat (limited to '')
-rw-r--r-- | sm/server.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sm/server.c b/sm/server.c index 616ae9bfe..298ccda2d 100644 --- a/sm/server.c +++ b/sm/server.c @@ -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 } }; |