mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* sig-check.c (do_check): Properly validate v4 sigs with no hashed section
at all.
This commit is contained in:
parent
bb99f6c828
commit
33ef3cf981
2 changed files with 12 additions and 2 deletions
|
@ -281,8 +281,13 @@ do_check( PKT_public_key *pk, PKT_signature *sig, MD_HANDLE digest,
|
|||
md_write (digest, sig->hashed->data, n);
|
||||
n += 6;
|
||||
}
|
||||
else
|
||||
n = 6;
|
||||
else {
|
||||
/* Two octets for the (empty) length of the hashed
|
||||
section. */
|
||||
md_putc (digest, 0);
|
||||
md_putc (digest, 0);
|
||||
n = 6;
|
||||
}
|
||||
/* add some magic */
|
||||
buf[0] = sig->version;
|
||||
buf[1] = 0xff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue