aboutsummaryrefslogtreecommitdiffstats
path: root/agent/divert-scd.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2011-03-02 14:35:10 +0000
committerWerner Koch <[email protected]>2011-03-02 14:35:10 +0000
commit1c09def22d97de3738a2bec4970504bfc155680b (patch)
tree44fbc5d154ca96be68fb8e43c6695c8dba9580d5 /agent/divert-scd.c
parentAdd comment to last patch. (diff)
downloadgnupg-1c09def22d97de3738a2bec4970504bfc155680b.tar.gz
gnupg-1c09def22d97de3738a2bec4970504bfc155680b.zip
Fix usage of SHA-2 algorithm with OpenPGP cards.
This was a regression in 2.1 introduced due to having the agent do the signing in contrast to the old "SCD PKSIGN" command which accesses the scdaemon directly and passed the hash algorithm. The hash algorithm is used by app-openpgp.c only for a sanity check.
Diffstat (limited to 'agent/divert-scd.c')
-rw-r--r--agent/divert-scd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/divert-scd.c b/agent/divert-scd.c
index f4787b537..f176a6b94 100644
--- a/agent/divert-scd.c
+++ b/agent/divert-scd.c
@@ -347,7 +347,7 @@ divert_pksign (ctrl_t ctrl,
int save = ctrl->use_auth_call;
ctrl->use_auth_call = 1;
rc = agent_card_pksign (ctrl, kid, getpin_cb, ctrl,
- digest, digestlen, &sigval, &siglen);
+ algo, digest, digestlen, &sigval, &siglen);
ctrl->use_auth_call = save;
}
else
@@ -359,7 +359,7 @@ divert_pksign (ctrl_t ctrl,
if (!rc)
{
rc = agent_card_pksign (ctrl, kid, getpin_cb, ctrl,
- data, ndata, &sigval, &siglen);
+ algo, data, ndata, &sigval, &siglen);
xfree (data);
}
}