diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-01-26 11:08:02 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-01-26 11:08:02 -0500 |
commit | a880429a7657634c690191c3abae0531ed6e89e1 (patch) | |
tree | 5b5e3871b0718056f6bb3679174ed5877fbf26db | |
parent | 2dcc98e4f794fd92d7044e270385db56c95118b5 (diff) | |
parent | ba3b03def05796619620346e02b127ad9436333e (diff) | |
download | tor-a880429a7657634c690191c3abae0531ed6e89e1.tar.gz tor-a880429a7657634c690191c3abae0531ed6e89e1.zip |
Merge remote branch 'origin/maint-0.2.2'
-rw-r--r-- | changes/bug2409 | 4 | ||||
-rw-r--r-- | src/or/circuitbuild.c | 4 | ||||
-rw-r--r-- | src/or/routerparse.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/changes/bug2409 b/changes/bug2409 new file mode 100644 index 0000000000..5523458b64 --- /dev/null +++ b/changes/bug2409 @@ -0,0 +1,4 @@ + o Minor bugfixes + - Resolve a bug in verifying signatures of directory objects + with digests longer than SHA1. Bugfix on 0.2.2.20-alpha; + fixes bug 2409; found by "piebeer". diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index e16aa751d4..9978950531 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -661,9 +661,9 @@ circuit_build_times_update_state(circuit_build_times_t *cbt, static void circuit_build_times_shuffle_and_store_array(circuit_build_times_t *cbt, build_time_t *raw_times, - int num_times) + uint32_t num_times) { - int n = num_times; + uint32_t n = num_times; if (num_times > CBT_NCIRCUITS_TO_OBSERVE) { log_notice(LD_CIRC, "The number of circuit times that this Tor version " "uses to calculate build times is less than the number stored " diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 2e9f7174bf..d41b91d22e 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1086,7 +1086,7 @@ check_signature_token(const char *digest, signed_digest = tor_malloc(keysize); if (crypto_pk_public_checksig(pkey, signed_digest, keysize, tok->object_body, tok->object_size) - < DIGEST_LEN) { + < digest_len) { log_warn(LD_DIR, "Error reading %s: invalid signature.", doctype); tor_free(signed_digest); return -1; |