Commit Graph

12653 Commits

Author SHA1 Message Date
Nick Mathewson
a19981725d Parse detached signatures and microdesc networkstatuses correctly. 2009-10-15 15:17:13 -04:00
Nick Mathewson
0bce0161dd Revise proposal 162: SHA256(x), not SHA256(SHA256(x))
The point of doing SHA256 twice is, generally, is to prevent message
extension attacks where an attacker who knows H(A) can calculate
H(A|B).  But for attaching a signature to a document, the attacker
already _knows_ A, so trying to keep them from calculating H(A|B) is
pointless.
2009-10-15 15:17:13 -04:00
Nick Mathewson
3471057486 Implement signatures for microdesc consensuses right.
This means we need to handle the existence of multiple flavors of signature
in a detached signatures document, generate them correctly, and so on.
2009-10-15 15:17:13 -04:00
Nick Mathewson
d9c71816b1 Generate all the flavors of consensuses when building consensuses. 2009-10-15 15:17:13 -04:00
Nick Mathewson
5576a3a094 Parse detached signature documents with multiple flavors and algorithms. 2009-10-15 15:17:13 -04:00
Nick Mathewson
3b2fc659a8 Refactor consensus signature storage for multiple digests and flavors.
This patch introduces a new type called document_signature_t to represent the
signature of a consensus document.  Now, each consensus document can have up
to one document signature per voter per digest algorithm.  Also, each
detached-signatures document can have up to one signature per <voter,
algorithm, flavor>.
2009-10-15 15:17:13 -04:00
Nick Mathewson
e1ddee8bbe Code to generate, store, and parse microdescriptors and consensuses.
The consensus documents are not signed properly, not served, and not
exchanged yet.
2009-10-15 15:17:13 -04:00
Nick Mathewson
a8e92ba8fd Add a function to get the most frequent member of a list. 2009-10-15 15:17:13 -04:00
Nick Mathewson
a7ba02f3f1 Add ability to parse one or more m line from a vote. 2009-10-15 15:17:13 -04:00
Nick Mathewson
bdf4839395 Functions to encode microdescriptors and their lines. 2009-10-15 15:17:12 -04:00
Nick Mathewson
80a7a34755 Revise 162's idea of how detached signatures work with flavors
The original proposal was vague and would have made older Tors reject
detached-signature documents as soon as they saw one with flavors.
2009-10-15 15:17:12 -04:00
Nick Mathewson
c5f7f04aff Allow signed data to include other hashes later.
Previously, we insisted that a valid signature must be a signature of
the expected digest.  Now we accept anything that starts with the
expected digest.  This lets us include another digest later.
2009-10-15 15:17:12 -04:00
Nick Mathewson
15f4e9600c Signature-checking code can handle longer digests. 2009-10-15 15:17:12 -04:00
Nick Mathewson
8b2f6b27fd Make signature-generation code handle different key and digest lengths. 2009-10-15 15:17:12 -04:00
Nick Mathewson
8d41e6c471 Support for encoding and decoding 256-bit digests in base64 2009-10-15 15:17:12 -04:00
Nick Mathewson
5ef97ddd42 Merge commit 'origin/maint-0.2.1'
Conflicts:
	ChangeLog
	configure.in
	contrib/tor-mingw.nsi.in
	src/or/config.c
	src/win32/orconfig.h
2009-10-15 12:33:22 -04:00
Roger Dingledine
16dc543851 bump to 0.2.1.20 2009-10-15 12:14:18 -04:00
Roger Dingledine
2bee297d57 Move moria1 and Tonga to alternate IP addresses. 2009-10-15 12:14:18 -04:00
Nick Mathewson
d407d81a44 Merge commit 'origin/maint-0.2.1' 2009-10-14 21:31:06 -04:00
Nick Mathewson
a1ab3bb410 Merge commit 'phobos/polipo-updates-maint-0.2.1' into maint-0.2.1 2009-10-14 21:30:53 -04:00
Nick Mathewson
5fb6d9ac4b Merge commit 'phobos/tor-dmg-naming-update' 2009-10-14 21:29:40 -04:00
Nick Mathewson
c152bb3b6b Merge commit 'origin/maint-0.2.1' 2009-10-14 17:20:58 -04:00
Roger Dingledine
2394336426 read the "circwindow" parameter from the consensus
backport of c43859c5c1
backport of 0d13e0ed14
2009-10-14 17:07:32 -04:00
Nick Mathewson
83c3f118db Code to parse and access network parameters.
Partial backport of 381766ce4b.
Partial backport of 56c6d78520.
2009-10-14 16:15:41 -04:00
Roger Dingledine
0a9356c4b1 add blurbs for recent dev releases 2009-10-14 15:49:26 -04:00
Nick Mathewson
71cdd99dd7 Another event2 evdns fix. 2009-10-13 18:57:25 -04:00
Nick Mathewson
81eee0ecff Fix a crash when using evdns from Libevent 2.
When we tried to use the deprecated non-threadsafe evdns
interfaces in Libevent 2 without using the also-deprecated
event_init() interface, Libevent 2 would sensibly crash, since it
has no guess where to find the Libevent library.

Here we use the evdns_base_*() functions instead if they're
present, and fake them if they aren't.
2009-10-13 17:54:04 -04:00
Roger Dingledine
4b55ef26c9 bump to 0.2.2.5-alpha-dev 2009-10-12 15:28:29 -04:00
Roger Dingledine
27db678985 move nickm's commit to the correct release 2009-10-12 15:01:10 -04:00
Andrew Lewman
c0ad690924 updated naming. 2009-10-12 08:36:39 -04:00
Andrew Lewman
ecae6f764a update naming 2009-10-12 08:36:32 -04:00
Nick Mathewson
6f95435f28 Move android changelog entry to now-correct Tor version. 2009-10-11 23:31:54 -04:00
Nick Mathewson
da990d09c3 Merge commit 'public/android' 2009-10-11 23:30:19 -04:00
Roger Dingledine
9d6c79cbbb fix compile on windows 2009-10-11 17:23:47 -04:00
Roger Dingledine
255245a289 bump to 0.2.2.5-alpha 2009-10-11 14:59:20 -04:00
Roger Dingledine
6265b9f09d Move dizum to an alternate IP address. 2009-10-11 14:59:14 -04:00
Peter Palfrader
c4a5e06098 Ship test.h in release
The test suite need the test.h file to build. Add it to
noinst_HEADERS in the Makefile.am so it gets included
in the tarball that make dist produces.
2009-10-11 10:44:16 -04:00
Peter Palfrader
1b2b8ef881 Merge branch 'debian-merge' into debian
* debian-merge: (52 commits)
  Ship debian source with src/test/test.h
  New testsuite location
  New upstream version
  Fix testsuite call.
  bump to 0.2.2.4-alpha
  Don't set unreachable from dirvote unless we've been running a while.
  correct the spec for the stream_bw event.
  fix a bug where we were decrementing the wrong bucket
  remove some dead code. some of it was tickling coverity.
  add blurbs for recent alpha releases
  Fix a memleak when throwing away some build times
  amend changelog for recent commits, plus clean up
  Tweak an assert that shouldn't fire either way.
  Tweak values for when to discard all of our history.
  Remove another overzealous assert.
  try to stem the 'sea of fail'
  fix the wiki link in doc pages. remove obsolete FAQ.
  Ignore one-hop circuits for circuit timeout calc
  Move Tonga to an alternate IP address
  update spec to reflect change in Fast definition
  ...
2009-10-11 10:40:13 +02:00
Peter Palfrader
4cb31d27b5 Ship debian source with src/test/test.h
Upstream failed to ship src/test/test.h.  Ship it in debian/ and
manually copy it in place during configure and clean up in clean.  Let's
not use the patch system as this will most likely be rectified by next
release.
2009-10-11 10:39:49 +02:00
Peter Palfrader
51a3afd6ac New testsuite location
The testsuite moved from src/or/test to src/test/test, but let's call it
using "make check" now.
2009-10-11 10:19:45 +02:00
Peter Palfrader
f58b39075c New upstream version 2009-10-11 10:19:19 +02:00
Peter Palfrader
01da810609 Merge commit 'tor-0.2.2.4-alpha' into debian-merge
* commit 'tor-0.2.2.4-alpha': (49 commits)
  Fix testsuite call.
  bump to 0.2.2.4-alpha
  Don't set unreachable from dirvote unless we've been running a while.
  correct the spec for the stream_bw event.
  fix a bug where we were decrementing the wrong bucket
  remove some dead code. some of it was tickling coverity.
  add blurbs for recent alpha releases
  Fix a memleak when throwing away some build times
  amend changelog for recent commits, plus clean up
  Tweak an assert that shouldn't fire either way.
  Tweak values for when to discard all of our history.
  Remove another overzealous assert.
  try to stem the 'sea of fail'
  fix the wiki link in doc pages. remove obsolete FAQ.
  Ignore one-hop circuits for circuit timeout calc
  Move Tonga to an alternate IP address
  update spec to reflect change in Fast definition
  Move moria1 to a nearby IP address
  Dir auths reject relays running < Tor 0.1.2.14
  Fix 1108: Handle corrupt or large build times state.
  ...
2009-10-11 10:17:56 +02:00
Peter Palfrader
2f760c5461 Fix testsuite call.
tinytest_main() returns 0 on success, -1 on errors and 1 on test
failures.  So test.c should check on !=0 instead of <0.
2009-10-10 18:58:54 -04:00
Roger Dingledine
a9e0e2f819 bump to 0.2.2.4-alpha 2009-10-10 17:29:44 -04:00
Nick Mathewson
5a6575c2d4 Don't set unreachable from dirvote unless we've been running a while.
This is a possible fix for bug 1023, where if we vote (or make a v2
consensus networkstatus) right after we come online, we can call
rep_hist_note_router_unreachable() on every router we haven't connected
to yet, and thereby make all their uptime values reset.
2009-10-10 15:23:00 -04:00
Roger Dingledine
e84dc32cb8 correct the spec for the stream_bw event.
"neonomad" pointed out on or-talk that the order is opposite from the
intuitive order. explain why. we chose to fix the spec rather than the
code because there are controllers like torflow that already expect
the current behavior.
2009-10-10 15:07:37 -04:00
Roger Dingledine
1c62b9d5fa fix a bug where we were decrementing the wrong bucket
i think this doesn't actually affect anything, since linked
conns usually don't impact buckets
2009-10-10 14:52:41 -04:00
Roger Dingledine
746a19e84d remove some dead code. some of it was tickling coverity. 2009-10-10 13:39:41 -04:00
Roger Dingledine
047fdd4104 add blurbs for recent alpha releases 2009-10-10 13:33:17 -04:00
Sebastian Hahn
e35f9414d6 Fix a memleak when throwing away some build times
This was introduced in f7e6e852e8.
Found by Coverity
2009-10-10 13:41:44 +02:00