mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
scd:nks: Extend keypairinfo with usage flags.
* scd/app-nks.c (do_learn_status_core): Return usage. Signed-off-by: Werner Koch <wk@gnupg.org> (cherry picked from commit 0a9053eff0406c6799ee201013194200c0ed3487)
This commit is contained in:
parent
671e54d62c
commit
0d2c9ef29c
@ -402,6 +402,7 @@ do_learn_status_core (app_t app, ctrl_t ctrl, unsigned int flags, int is_sigg)
|
||||
char ct_buf[100], id_buf[100];
|
||||
int i;
|
||||
const char *tag;
|
||||
const char *usage;
|
||||
|
||||
if (is_sigg)
|
||||
tag = "SIGG";
|
||||
@ -451,9 +452,19 @@ do_learn_status_core (app_t app, ctrl_t ctrl, unsigned int flags, int is_sigg)
|
||||
{
|
||||
snprintf (id_buf, sizeof id_buf, "NKS-%s.%04X",
|
||||
tag, filelist[i].fid);
|
||||
if (filelist[i].issignkey && filelist[i].isenckey)
|
||||
usage = "sae";
|
||||
else if (filelist[i].issignkey)
|
||||
usage = "sa";
|
||||
else if (filelist[i].isenckey)
|
||||
usage = "e";
|
||||
else
|
||||
usage = "";
|
||||
|
||||
send_status_info (ctrl, "KEYPAIRINFO",
|
||||
gripstr, 40,
|
||||
id_buf, strlen (id_buf),
|
||||
usage, strlen (usage),
|
||||
NULL, (size_t)0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user