aboutsummaryrefslogtreecommitdiffstats
path: root/agent/pkdecrypt.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2019-05-15 06:53:35 +0000
committerNIIBE Yutaka <[email protected]>2019-05-15 08:13:32 +0000
commit1091f22511e1a8259eb5c998f5c207ee95723a4a (patch)
treed95561f015aae5be609189ab24f4f1ef6b920a7b /agent/pkdecrypt.c
parentscd: Don't put newline at the end of status. (diff)
downloadgnupg-1091f22511e1a8259eb5c998f5c207ee95723a4a.tar.gz
gnupg-1091f22511e1a8259eb5c998f5c207ee95723a4a.zip
agent: Support scdaemon operation using KEYGRIP.
* agent/agent.h (struct card_key_info_s): New. (divert_pksign, divert_pkdecrypt): New API. * agent/call-scd.c (card_keyinfo_cb): New. (agent_card_free_keyinfo, agent_card_keyinfo): New. * agent/divert-scd.c (ask_for_card): Having GRIP argument, ask scdaemon with agent_card_keyinfo. (divert_pksign, divert_pkdecrypt): Ditto. * agent/pkdecrypt.c (agent_pkdecrypt): Supply GRIP. * agent/pksign.c (agent_pksign_do): Ditto. -- We are going to relax the requirment for SERIALNO of card. It's OK, when a card doesn't have recorded SERIALNO. If a card has a key with GRIP, it can be used. GnuPG-bug-id: 2291, 4301 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'agent/pkdecrypt.c')
-rw-r--r--agent/pkdecrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/pkdecrypt.c b/agent/pkdecrypt.c
index a0ced2f55..ec23daf83 100644
--- a/agent/pkdecrypt.c
+++ b/agent/pkdecrypt.c
@@ -85,8 +85,8 @@ agent_pkdecrypt (ctrl_t ctrl, const char *desc_text,
goto leave;
}
- rc = divert_pkdecrypt (ctrl, desc_text, ciphertext, shadow_info,
- &buf, &len, r_padding);
+ rc = divert_pkdecrypt (ctrl, desc_text, ctrl->keygrip, ciphertext,
+ shadow_info, &buf, &len, r_padding);
if (rc)
{
log_error ("smartcard decryption failed: %s\n", gpg_strerror (rc));