gpg: Improve the code to decrypt using PIV cards.
authorWerner Koch <wk@gnupg.org>
Wed, 3 Apr 2019 15:45:35 +0000 (17:45 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 3 Apr 2019 15:45:35 +0000 (17:45 +0200)
commit2c9b68f28de1ce9a6a18d091caba01ddd4707774
treeafc99495166052529ebc54c0d6ce87d758a4fb0d
parent679b8f1c045476bd6e0a1f1565379263143994ee
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 <wk@gnupg.org>
g10/call-agent.c
g10/call-agent.h
g10/keygen.c
g10/skclist.c