diff options
author | Werner Koch <[email protected]> | 2003-07-01 08:34:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2003-07-01 08:34:45 +0000 |
commit | 39046ea7ec221efa9db946230ddc9fb3e65d19ab (patch) | |
tree | aa251dc190129aef89d82597f7ffb53ba6486fc9 /g10/sign.c | |
parent | Key generation and signing using the OpenPGP card does rudimentary work. (diff) | |
download | gnupg-39046ea7ec221efa9db946230ddc9fb3e65d19ab.tar.gz gnupg-39046ea7ec221efa9db946230ddc9fb3e65d19ab.zip |
* app-openpgp.c (store_fpr): Fixed fingerprint calculation.
* keygen.c (gen_card_key): Obviously we should use the creation
date received from SCDAEMON, so that the fingerprints will match.
* sign.c (do_sign): Pass the serialno to the sign code.
* keyid.c (serialno_and_fpr_from_sk): New.
Diffstat (limited to 'g10/sign.c')
-rw-r--r-- | g10/sign.c | 7 |
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; |