mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +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>
(cherry picked from commit 9ed1aa56c4
)
This commit is contained in:
parent
9a317557c5
commit
a8aacaf204
3 changed files with 61 additions and 8 deletions
|
@ -794,7 +794,22 @@ scd_keypairinfo_status_cb (void *opaque, const char *line)
|
|||
p++;
|
||||
while (*p && !spacep (p))
|
||||
p++;
|
||||
*p = 0;
|
||||
if (*p)
|
||||
{
|
||||
*p++ = 0;
|
||||
while (spacep (p))
|
||||
p++;
|
||||
while (*p && !spacep (p))
|
||||
{
|
||||
switch (*p++)
|
||||
{
|
||||
case 'c': sl->flags |= GCRY_PK_USAGE_CERT; break;
|
||||
case 's': sl->flags |= GCRY_PK_USAGE_SIGN; break;
|
||||
case 'e': sl->flags |= GCRY_PK_USAGE_ENCR; break;
|
||||
case 'a': sl->flags |= GCRY_PK_USAGE_AUTH; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -804,7 +819,8 @@ scd_keypairinfo_status_cb (void *opaque, const char *line)
|
|||
|
||||
/* Read the keypairinfo lines of the current card directly from
|
||||
* scdaemon. The list is returned as a string made up of the keygrip,
|
||||
* a space and the keyref. */
|
||||
* a space and the keyref. The flags of the string carry the usage
|
||||
* bits. */
|
||||
gpg_error_t
|
||||
agent_scd_keypairinfo (ctrl_t ctrl, strlist_t *r_list)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue