diff options
author | David Shaw <dshaw@jabberwocky.com> | 2002-07-29 05:07:11 +0200 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2002-07-29 05:07:11 +0200 |
commit | 33ef3cf9810742fe8d520edfd5b7661a539f937e (patch) | |
tree | 231fe642c7f8b78c58bee34cfe39d9b1601020f8 /g10/sig-check.c | |
parent | * keyedit.c (menu_revsig): Change "revsig" to honor selected uids so the (diff) | |
download | gnupg2-33ef3cf9810742fe8d520edfd5b7661a539f937e.tar.xz gnupg2-33ef3cf9810742fe8d520edfd5b7661a539f937e.zip |
* sig-check.c (do_check): Properly validate v4 sigs with no hashed section
at all.
Diffstat (limited to 'g10/sig-check.c')
-rw-r--r-- | g10/sig-check.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/g10/sig-check.c b/g10/sig-check.c index 1654fe997..243099796 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -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; |