1
0
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:
NIIBE Yutaka 2023-03-17 15:22:22 +09:00
parent 84dd9cf6c3
commit d0d728a5b7
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -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)