aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-04-03 15:45:35 +0000
committerWerner Koch <[email protected]>2019-04-03 15:45:35 +0000
commit2c9b68f28de1ce9a6a18d091caba01ddd4707774 (patch)
treeafc99495166052529ebc54c0d6ce87d758a4fb0d /g10/keygen.c
parentscd: New options --info and --info-only for READKEY. (diff)
downloadgnupg-2c9b68f28de1ce9a6a18d091caba01ddd4707774.tar.gz
gnupg-2c9b68f28de1ce9a6a18d091caba01ddd4707774.zip
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 <[email protected]>
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index 6ea4e72c6..22ac6f0b5 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -2254,7 +2254,7 @@ ask_algo (ctrl_t ctrl, int addmode, int *r_subkey_algo, unsigned int *r_usage,
tty_printf (_("Serial number of the card: %s\n"), serialno);
xfree (serialno);
- err = agent_scd_keypairinfo (ctrl, &keypairlist);
+ err = agent_scd_keypairinfo (ctrl, NULL, &keypairlist);
if (err)
{
tty_printf (_("error reading the card: %s\n"),