aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 86159a4a1..d9ce074d4 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -277,13 +277,14 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
{ /* FIXME: Note that we do only support RSA for now. */
char *rbuf;
size_t rbuflen;
+ char *snbuf;
- /* FIXME: We need to pass the correct keyid or better the
- fingerprint to the scdaemon. */
- rc = agent_scd_pksign ("nokeyid", digest_algo,
+ snbuf = serialno_and_fpr_from_sk (sk->protect.iv, sk->protect.ivlen, sk);
+ rc = agent_scd_pksign (snbuf, digest_algo,
gcry_md_read (md, digest_algo),
gcry_md_get_algo_dlen (digest_algo),
&rbuf, &rbuflen);
+ xfree (snbuf);
if (!rc)
{
unsigned int nbytes = rbuflen;