summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
AgeCommit message (Collapse)Author
2016-09-26Add necessary code to parse and handle required/recommended protocolsNick Mathewson
2016-09-26Emit and parse protocol lists in router descriptorsNick Mathewson
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-07-01Merge remote-tracking branch 'dgoulet/ticket16943_029_05-squashed'Nick Mathewson
Trivial Conflicts: src/or/or.h src/or/routerparse.c
2016-07-01prop250: Parse votes and consensusDavid Goulet
One of the last piece that parses the votes and consensus in order to update our state and make decision for the SR values. We need to inform the SR subsystem when we set the current consensus because this can be called when loaded from file or downloaded from other authorities or computed. The voting schedule is used for the SR timings since we are bound to the voting system. Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-07-01Fix a missing break; in dump_desc_init()Nick Mathewson
Found by coverity scan; this is CID 1362983
2016-06-30Set binary mode when checking malformed descriptor.Nick Mathewson
2016-06-30fix naked memcmpsNick Mathewson
2016-06-30Try to fix warnings when size_t is smaller than st.st_size.Nick Mathewson
2016-06-30Also check if the sandbox is configured as well as if it's active; ↵Andrea Shepard
sandbox_init() runs rather late in the startup process
2016-06-30Do sandbox_is_active() check before reconstructing dump_desc() FIFO on ↵Andrea Shepard
startup too
2016-06-30Add unit test for dump_desc_populate_fifo_from_directory()Andrea Shepard
2016-06-30Make things mockable for dump_desc_populate_fifo_from_directory() unit testAndrea Shepard
2016-06-30Unit test for dump_desc_populate_one_file()Andrea Shepard
2016-06-30Reload unparseable descriptor dump FIFO state from on-disk dumped ↵Andrea Shepard
descriptors at startup
2016-06-30Move unparseable descriptor dumps into subdirectory of DataDirAndrea Shepard
2016-06-30Add sandbox_is_active() check to dump_desc()Andrea Shepard
2016-06-30Use uint64_t for total length of dumped descriptors, nad be careful about ↵Andrea Shepard
overflows in the loop in dump_desc_fifo_add_and_clean()
2016-06-30Expose a few more dump_desc()-related things to the test suiteAndrea Shepard
2016-06-30Expose dump_desc() to the test suite and make things it calls mockableAndrea Shepard
2016-06-30Remove old unparseable descriptor logging mechanism, add ↵Andrea Shepard
bump-to-head-of-queue for repeated unparseable descriptors, rename config variable
2016-06-30Add multiple descriptor dump support for dump_desc() in routerparse.c; fixes ↵Andrea Shepard
bug 18322
2016-06-27Add missing braces around conditional.Nick Mathewson
2016-06-23Merge remote-tracking branch 'public/bug15942_v2_alternative'Nick Mathewson
2016-06-20Make base16_decodes return number of decoded bytesnikkolasg
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-18Use exponential backoff for router descriptor downloads from consensusesAndrea Shepard
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-23Expose crypto_digest_algorithm_get_length from crypto.cNick Mathewson
Also, use it in routerparse.c
2016-05-23Merge remote-tracking branch 'dgoulet/bug19066_029_01'Nick Mathewson
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-17whitespace fixesNick Mathewson
2016-05-17Remove duplicate siging_key_cert fields.Nick Mathewson
With the fix for #17150, I added a duplicate certificate here. Here I remove the original location in 0.2.8. (I wouldn't want to do that in 027, due to the amount of authority-voting-related code drift.) Closes 19073.
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-17Merge branch 'bug17150_027_extra' into maint-0.2.8Nick Mathewson
2016-05-17Copy the signing_key_cert field into signed_descriptor_tNick Mathewson
We need this field to be in signed_descriptor_t so that routerinfo_incompatible_with_extrainfo can work correctly (#17150). But I don't want to move it completely in this patch, since a great deal of the code that messes with it has been in flux since 0.2.7, when this ticket was opened. I should open another ticket about removing the field from routerinfo_t and extrainfo_t later on. This patch fixes no actual behavior.
2016-05-17Move extra_info_digest256 into signed_descriptor_tNick Mathewson
This patch includes no semantic changes; it's just a field movement. It's prerequisite for a fix to 19017/17150.
2016-05-16dirauth: don't use hardcoded length when parsing digestsDavid Goulet
When parsing detached signature, we make sure that we use the length of the digest algorithm instead of an hardcoded DIGEST256_LEN in order to avoid comparing bytes out of bound with a smaller digest length such as SHA1. Fixes #19066 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-05-09Merge branch 'feature15588_squashed'Nick Mathewson
2016-05-09Move rend client name checks to one functionJohn Brooks
2016-05-09Move rend auth cookie en-/decoding to a functionJohn Brooks
Tor stores client authorization cookies in two slightly different forms. The service's client_keys file has the standard base64-encoded cookie, including two chars of padding. The hostname file and the client remove the two padding chars, and store an auth type flag in the unused bits. The distinction makes no sense. Refactor all decoding to use the same function, which will accept either form, and use a helper function for encoding the truncated format.
2016-03-21Merge branch 'maint-0.2.7'Nick Mathewson
2016-03-21Fix log message subjects in networkstatus_parse_vote_from_string()Nick Mathewson
Some of these messages called the thing being parsed a "vote" whether it is a vote or a consensus. Fixes bug 18368.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-23Merge branch 'bug17795'Nick Mathewson
2016-02-11Fix all doxygen warnings other than "X is not documented"Nick Mathewson
2016-02-10Whitespace fixesNick Mathewson
2016-02-10Rename crypto_digest_all, and digests_t.Nick Mathewson
They are no longer "all" digests, but only the "common" digests. Part of 17795. This is an automated patch I made with a couple of perl one-liners: perl -i -pe 's/crypto_digest_all/crypto_common_digests/g;' src/*/*.[ch] perl -i -pe 's/\bdigests_t\b/common_digests_t/g;' src/*/*.[ch]
2015-12-16Authorities must set a router's V2Dir flag if it supports tunnelled reqsMatthew Finkel
Partial implementation of prop 237, ticket 12538
2015-12-16tweak router_parse_addr_policy_item_from_string docsNick Mathewson
2015-12-16Add policy assume_action support for IPv6 addressesteor (Tim Wilson-Brown)
These IPv6 addresses must be quoted, because : is the port separator, and "acce" is a valid hex block. Add unit tests for assumed actions in IPv6 policies.