mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-09 21:28:51 +01:00
tkd: Fix RSA PKSIGN.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
84dd9cf6c3
commit
d0d728a5b7
@ -920,8 +920,13 @@ do_pksign (struct key *key, int hash_algo,
|
|||||||
size_t asnlen = sizeof (data);
|
size_t asnlen = sizeof (data);
|
||||||
|
|
||||||
gcry_md_get_asnoid (hash_algo, data, &asnlen);
|
gcry_md_get_asnoid (hash_algo, data, &asnlen);
|
||||||
|
#if 0
|
||||||
gcry_md_hash_buffer (hash_algo, data+asnlen,
|
gcry_md_hash_buffer (hash_algo, data+asnlen,
|
||||||
u_data, u_data_len);
|
u_data, u_data_len);
|
||||||
|
#else
|
||||||
|
/* u_data_len == gcry_md_get_algo_dlen (hash_algo) */
|
||||||
|
memcpy (data+asnlen, u_data, u_data_len);
|
||||||
|
#endif
|
||||||
data_len = asnlen+gcry_md_get_algo_dlen (hash_algo);
|
data_len = asnlen+gcry_md_get_algo_dlen (hash_algo);
|
||||||
}
|
}
|
||||||
else if (key->key_type == KEY_EC)
|
else if (key->key_type == KEY_EC)
|
||||||
|
Loading…
Reference in New Issue
Block a user