mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
gpg: Copy the correct digest for use by TOFU.
* g10/mainproc.c (do_check_sig): Use the current digest algo. -- Note that the digest context may have several algos enabled, which is is case if keys with different hash preferences signed the data. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
4cbd2a690c
commit
3e67b50490
@ -938,7 +938,7 @@ do_check_sig (CTX c, kbnode_t node, int *is_selfsig,
|
||||
|
||||
if (md_good)
|
||||
{
|
||||
unsigned char *buffer = gcry_md_read (md_good, 0);
|
||||
unsigned char *buffer = gcry_md_read (md_good, sig->digest_algo);
|
||||
sig->digest_len = gcry_md_get_algo_dlen (map_md_openpgp_to_gcry (algo));
|
||||
memcpy (sig->digest, buffer, sig->digest_len);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user