summaryrefslogtreecommitdiffstats
path: root/g10/call-agent.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-02-12 17:29:51 +0100
committerWerner Koch <wk@gnupg.org>2020-02-12 17:29:51 +0100
commit8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc (patch)
tree3d09e30b1948e41cb0524c4aa01ebd2642b2dbd2 /g10/call-agent.h
parentcard: Fix parsing of the received card_list. (diff)
downloadgnupg2-8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc.tar.xz
gnupg2-8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc.zip
gpg: Rename the struct card_key_info_s.
* g10/call-agent.h (struct card_key_info_s): Rename to ... (struct keypair_info_s): this. (keypair_info_t): New. Use this everywhere instead of card_key_info_s. * g10/call-agent.c (agent_scd_free_keyinfo): Rename to .. (free_keypair_info): this. Change all callers. -- The struct is also useful to store the data from KEYPAIRINFO status lines. Thus renaming it makes sense. A future patch will extend the struct. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r--g10/call-agent.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 5d0fc5e7e..d4586fa0a 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -76,14 +76,17 @@ 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
+
+/* Object to store information from the KEYPAIRINFO or the KEYINFO
+ * status lines. */
+struct keypair_info_s
{
- struct card_key_info_s *next;
+ struct keypair_info_s *next;
char keygrip[41];
char *serialno;
- char *idstr;
+ char *idstr; /* (aka keyref) */
};
+typedef struct keypair_info_s *keypair_info_t;
/* Release the card info structure. */
void agent_release_card_info (struct agent_card_info_s *info);
@@ -98,12 +101,12 @@ 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);
+/* Free a keypair info list. */
+void free_keypair_info (keypair_info_t l);
/* Return card key information. */
gpg_error_t agent_scd_keyinfo (const char *keygrip, int cap,
- struct card_key_info_s **result);
+ keypair_info_t *result);
/* Return the serial number, possibly select by DEMAND. */
int agent_scd_serialno (char **r_serialno, const char *demand);