aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
AgeCommit message (Collapse)Author
2010-02-28Merge branch 'fix_routerparse_bug'Nick Mathewson
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-27Update Tor Project copyright yearsNick Mathewson
2010-02-27Fix a consensus-extension bug found by outofwordsNick Mathewson
When the bandwidth-weights branch added the "directory-footer" token, and began parsing the directory footer at the first occurrence of "directory-footer", it made it possible to fool the parsing algorithm into accepting unsigned data at the end of a consensus or vote. This patch fixes that bug by treating the footer as starting with the first "directory-footer" or the first "directory-signature", whichever comes first.
2010-02-27fix some wide lines in routerparse.cNick Mathewson
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: ChangeLog src/or/routerparse.c
2010-02-27Properly handle non-terminated stringsSebastian Hahn
Treat strings returned from signed_descriptor_get_body_impl() as not NUL-terminated. Since the length of the strings is available, this is not a big problem. Discovered by rieo.
2010-02-26Don't segfault when checking the consensusSebastian Hahn
2010-02-26Don't believe unauthenticated info in a consensus.Nick Mathewson
Don't allow anything but directory-signature tokens in a consensus after the first directory-signature token. Fixes bug in bandwidth-weights branch. Found by "outofwords."
2010-02-25Fix 64-bit printf issues in consensus-bw-weights5-merge.Nick Mathewson
For my 64-bit Linux system running with GCC 4.4.3-fc12-whatever, you can't do 'printf("%lld", (int64_t)x);' Instead you need to tell the compiler 'printf("%lld", (long long int)x);' or else it doesn't believe the types match. This is why we added U64_PRINTF_ARG; it looks like we needed an I64_PRINTF_ARG too.
2010-02-22Clearly mark directory footer so we parse the new weight line.Mike Perry
2010-02-22Add parsing+verification for bw weight values.Mike Perry
2010-02-22network-status-version must come first in a vote/consensusSebastian Hahn
Spec conformance issue: The code didn't force the network-status-version token to be the first token in a v3 vote or consensus. Problem discovered by Parakeep.
2009-12-18Remove duplicate words and a duplicate newline.Karsten Loesing
2009-12-12Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson
2009-12-12*_free functions now accept NULLSebastian Hahn
Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
2009-10-18Document the microdescriptor code better.Nick Mathewson
2009-10-15Parse detached signatures and microdesc networkstatuses correctly.Nick Mathewson
2009-10-15Parse detached signature documents with multiple flavors and algorithms.Nick Mathewson
2009-10-15Refactor consensus signature storage for multiple digests and flavors.Nick Mathewson
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-15Code to generate, store, and parse microdescriptors and consensuses.Nick Mathewson
The consensus documents are not signed properly, not served, and not exchanged yet.
2009-10-15Add ability to parse one or more m line from a vote.Nick Mathewson
2009-10-15Allow signed data to include other hashes later.Nick Mathewson
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-15Signature-checking code can handle longer digests.Nick Mathewson
2009-10-15Make signature-generation code handle different key and digest lengths.Nick Mathewson
2009-10-14Code to parse and access network parameters.Nick Mathewson
Partial backport of 381766ce4b1145460. Partial backport of 56c6d78520a98fb64.
2009-09-16Merge commit 'sebastian/specconformance'Roger Dingledine
2009-09-15Merge commit 'origin/maint-0.2.1'Nick Mathewson
Resolved conflicts in: src/or/circuitbuild.c
2009-09-14Implement proposal 167: Authorities vote on network parameters.Nick Mathewson
This code adds a new field to vote on: "params". It consists of a list of sorted key=int pairs. The output is computed as the median of all the integers for any key on which anybody voted. Improved with input from Roger.
2009-09-14Fix a memory leak when parsing a nsSebastian Hahn
Adding the same vote to a networkstatus consensus leads to a memory leak on the client side. Fix that by only using the first vote from any given voter, and ignoring the others. Problem found by Rotor, who also helped writing the patch. Thanks!
2009-09-14Fix a spec conformance issue when parsing a ns voteSebastian Hahn
A vote may only contain exactly one signature. Make sure we reject votes that violate this. Problem found by Rotor, who also helped writing the patch. Thanks!
2009-09-01Fix compile warnings on Snow LeopardSebastian Hahn
Big thanks to nickm and arma for helping me with this!
2009-09-01Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-09-01Fix compile warnings on Snow LeopardSebastian Hahn
Big thanks to nickm and arma for helping me with this!
2009-08-26When Tor fails to parse a descriptor of any kind, dump it to disk.Karsten Loesing
2009-08-26Merge commit 'karsten/proposal-166-impl-master'Nick Mathewson
2009-08-21Add the first 8 bytes of the git commit digest to our versions.Nick Mathewson
Note that unlike subversion revision numbers, it isn't meaningful to compare these for anything but equality. We define a sort-order anyway, in case one of these accidentally slips into a recommended-versions list.
2009-08-17Include contents of *-stats files in descriptor.Karsten Loesing
2009-08-06Implement measured bw parsing + unit tests.Mike Perry
2009-05-27Spell-check Tor.Nick Mathewson
2009-05-04Update copyright to 2009.Karsten Loesing
2009-04-09Fix a few crash bugs related to malormed descriptors. Lark found one; ↵Nick Mathewson
fuzzing found the rest. svn:r19250
2009-02-09uh, and commit the patch too.Roger Dingledine
svn:r18423
2009-01-31Fix a possible cause of bug 915 when parsing multiple votes one of which was ↵Nick Mathewson
bad. Bugfix on 0.2.0.8-alpha. svn:r18354
2009-01-13Fix up (I hope) most ot the things that coverity suddenly claimed were ↵Nick Mathewson
REVERSE_INULL. This is what we get for bragging about being down to 0 issues. svn:r18096
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2008-12-29Downgrade the last xxx021 in routerparse. The duplicate code stands for now.Nick Mathewson
svn:r17817
2008-12-29Extact parse-the-token-arguments to its own function, and change it to a ↵Nick Mathewson
single-pass algorithm. This simplifies the parsing code and speeds it up a little. svn:r17812
2008-12-29Remove a call to find_whitespace_eos that didn't actually do anything.Nick Mathewson
svn:r17811
2008-12-29Refactor some exit-policy-related functions that showed up in oprofile.Nick Mathewson
Specifically, split compare_tor_addr_to_addr_policy() from a loop with a bunch of complicated ifs inside into some ifs, each with a simple loop. Rearrange router_find_exact_exit_enclave() to run a little faster. Bizarrely, router_policy_rejects_all() shows up on oprofile, so precalculate it per routerinfo. svn:r17802