mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
sm: Show the usage flags when generating a key from a card.
* g10/call-agent.c (scd_keypairinfo_status_cb): Also store the usage flags. * sm/call-agent.c (scd_keypairinfo_status_cb): Ditto. * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Print the usage flags. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e47524c34a
commit
9ed1aa56c4
3 changed files with 61 additions and 8 deletions
|
@ -249,6 +249,7 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream)
|
|||
gcry_sexp_t s_pkey;
|
||||
char *algostr = NULL;
|
||||
const char *keyref;
|
||||
int any = 0;
|
||||
|
||||
keyref = strchr (sl->d, ' ');
|
||||
if (keyref)
|
||||
|
@ -262,7 +263,28 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream)
|
|||
}
|
||||
xfree (pkey);
|
||||
}
|
||||
tty_printf (" (%d) %s %s\n", count, sl->d, algostr);
|
||||
tty_printf (" (%d) %s %s", count, sl->d, algostr);
|
||||
if ((sl->flags & GCRY_PK_USAGE_CERT))
|
||||
{
|
||||
tty_printf ("%scert", any?",":" (");
|
||||
any = 1;
|
||||
}
|
||||
if ((sl->flags & GCRY_PK_USAGE_SIGN))
|
||||
{
|
||||
tty_printf ("%ssign", any?",":" (");
|
||||
any = 1;
|
||||
}
|
||||
if ((sl->flags & GCRY_PK_USAGE_AUTH))
|
||||
{
|
||||
tty_printf ("%sauth", any?",":" (");
|
||||
any = 1;
|
||||
}
|
||||
if ((sl->flags & GCRY_PK_USAGE_ENCR))
|
||||
{
|
||||
tty_printf ("%sencr", any?",":" (");
|
||||
any = 1;
|
||||
}
|
||||
tty_printf ("%s\n", any?")":"");
|
||||
xfree (algostr);
|
||||
}
|
||||
xfree (answer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue