diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-01-16 05:01:46 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-01-16 05:01:46 +0100 |
commit | 8240a70c31a8e1617de64c42168cf3299b85b39e (patch) | |
tree | af01b490fa8d06ba9d69baf24dc78d71c68cc2ef /g10/call-agent.h | |
parent | gpg: default-key: Simply don't limit by capability. (diff) | |
download | gnupg2-8240a70c31a8e1617de64c42168cf3299b85b39e.tar.xz gnupg2-8240a70c31a8e1617de64c42168cf3299b85b39e.zip |
gpg: Add agent_scd_keyinfo to retrieve available card keys.
* g10/call-agent.c (card_keyinfo_cb, agent_scd_free_keyinfo)
(agent_scd_keyinfo): New.
* g10/call-agent.h: Define new functions.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r-- | g10/call-agent.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h index 5512fc847..0d333fd40 100644 --- a/g10/call-agent.h +++ b/g10/call-agent.h @@ -76,7 +76,14 @@ struct agent_card_info_s int uif[3]; /* True if User Interaction Flag is on. */ }; - +/* Information from scdaemon for card keys. */ +struct card_key_info_s +{ + struct card_key_info_s *next; + char keygrip[41]; + char *serialno; + char *idstr; +}; /* Release the card info structure. */ void agent_release_card_info (struct agent_card_info_s *info); @@ -91,6 +98,13 @@ gpg_error_t agent_scd_keypairinfo (ctrl_t ctrl, const char *keyref, /* Return list of cards. */ int agent_scd_cardlist (strlist_t *result); +/* Free card key information. */ +void agent_scd_free_keyinfo (struct card_key_info_s *l); + +/* Return card key information. */ +gpg_error_t agent_scd_keyinfo (const char *keygrip, int cap, + struct card_key_info_s **result); + /* Return the serial number, possibly select by DEMAND. */ int agent_scd_serialno (char **r_serialno, const char *demand); |