From 2c9b68f28de1ce9a6a18d091caba01ddd4707774 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 3 Apr 2019 17:45:35 +0200 Subject: gpg: Improve the code to decrypt using PIV cards. * g10/call-agent.c (agent_scd_keypairinfo): Add arg 'keyref'. * g10/keygen.c (ask_algo): Adjust. * g10/skclist.c (enum_secret_keys): Request the keyref directly. -- This improves commit ec6a6779236a89d4784a6bb7de0def9cc0f9e8a4 to avoid looping over all keypairinfos. This way scdaemon does not need to compute all the keypairinfos for all keys of a card. This patch is possible due the enhanced READKEY command in scdaemon. Signed-off-by: Werner Koch --- g10/call-agent.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'g10/call-agent.h') diff --git a/g10/call-agent.h b/g10/call-agent.h index c0018a595..c4d0a9de1 100644 --- a/g10/call-agent.h +++ b/g10/call-agent.h @@ -85,7 +85,8 @@ void agent_release_card_info (struct agent_card_info_s *info); int agent_scd_learn (struct agent_card_info_s *info, int force); /* Get the keypariinfo directly from scdaemon. */ -gpg_error_t agent_scd_keypairinfo (ctrl_t ctrl, strlist_t *r_list); +gpg_error_t agent_scd_keypairinfo (ctrl_t ctrl, const char *keyref, + strlist_t *r_list); /* Return list of cards. */ int agent_scd_cardlist (strlist_t *result); -- cgit v1.2.3