* sig-check.c (do_check): Properly validate v4 sigs with no hashed section

at all.
This commit is contained in:
David Shaw 2002-07-29 03:07:11 +00:00
parent bb99f6c828
commit 33ef3cf981
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-07-28 David Shaw <dshaw@jabberwocky.com>
* sig-check.c (do_check): Properly validate v4 sigs with no hashed
section at all.
2002-07-25 David Shaw <dshaw@jabberwocky.com>
* keyedit.c (menu_revsig): Change "revsig" to honor selected uids

View File

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