aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-07-29 03:07:11 +0000
committerDavid Shaw <[email protected]>2002-07-29 03:07:11 +0000
commit33ef3cf9810742fe8d520edfd5b7661a539f937e (patch)
tree231fe642c7f8b78c58bee34cfe39d9b1601020f8
parent* keyedit.c (menu_revsig): Change "revsig" to honor selected uids so the (diff)
downloadgnupg-33ef3cf9810742fe8d520edfd5b7661a539f937e.tar.gz
gnupg-33ef3cf9810742fe8d520edfd5b7661a539f937e.zip
* sig-check.c (do_check): Properly validate v4 sigs with no hashed section
at all.
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/sig-check.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 69b1f385a..17d16e24d 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-28 David Shaw <[email protected]>
+
+ * sig-check.c (do_check): Properly validate v4 sigs with no hashed
+ section at all.
+
2002-07-25 David Shaw <[email protected]>
* keyedit.c (menu_revsig): Change "revsig" to honor selected uids
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;