Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-01-16 | Bump copyright date to 2019. | Nick Mathewson | |
2018-10-01 | Split microdescriptor parser into its own file. | Nick Mathewson | |
2018-10-01 | Move routerparse and parsecommon to their own module. | Nick Mathewson | |
2018-07-05 | Fix every include path changed in the previous commit (automated) | Nick Mathewson | |
I am very glad to have written this script. | |||
2018-07-01 | Remove system headers from or.h | Nick Mathewson | |
2018-06-20 | Run rectify_include_paths.py | Nick Mathewson | |
2018-06-20 | Update copyrights to 2018. | Nick Mathewson | |
2018-06-15 | Extract routerinfo_t into its own header. | Nick Mathewson | |
I was expecting this to be much worse. | |||
2018-06-15 | Extract microdesc_t into its own header. | Nick Mathewson | |
2018-06-15 | Extract routerstatus_t into its own header. | Nick Mathewson | |
2018-06-15 | Extract networkstatus_t and ..sr_info_t into their own headers | Nick Mathewson | |
2018-04-27 | mod: Move dirauth specific files to its own module | David Goulet | |
This is a pretty big commit but it only moves these files to src/or/dirauth: dircollate.c dirvote.c shared_random.c shared_random_state.c dircollate.h dirvote.h shared_random.h shared_random_state.h Then many files are modified to change the include line for those header files that have moved into a new directory. Without using --disable-module-dirauth, everything builds fine. When using the flag to disable the module, tor doesn't build due to linking errors. This will be addressed in the next commit(s). No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org> | |||
2018-04-27 | dirvote: Trim down the public API | David Goulet | |
Many functions become static to the C file or exposed to the tests within the PRIVATE define of dirvote.h. This commit moves a function to the top. No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org> | |||
2018-04-22 | Remove MIN_METHOD_FOR_{PACKAGE_LINES,GUARDFRACTION,ED25519_ID_IN_MD} | Nick Mathewson | |
Also remove a rest for pre-19 microdesc versions. | |||
2018-04-22 | Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it. | Nick Mathewson | |
2018-04-22 | Remove MIN_METHOD_{FOR_P6_LINES,FOR_NTOR_KEY,TO_CLIP_UNMEASURED_BW} | Nick Mathewson | |
Also remove a unit test for pre-MIN_METHOD_FOR_NTOR_KEY consensuses. | |||
2017-12-05 | Implement the various get_foodir_*() functions. | Nick Mathewson | |
2017-09-15 | Run our #else/#endif annotator on our source code. | Nick Mathewson | |
2017-08-24 | Fix operator usage in src/test/*.c | Alexander Færøy | |
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch] | |||
2017-03-31 | Remove some now-needless openssl includes from src/test. | Nick Mathewson | |
It would appear that these includes weren't actually used. | |||
2017-03-15 | Run the copyright update script. | Nick Mathewson | |
2016-07-28 | Fix all -Wshadow warnings on Linux | Nick Mathewson | |
This is a partial fix for 18902. | |||
2016-06-20 | Make base16_decodes return number of decoded bytes | nikkolasg | |
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-14 | Use ENABLE/DISABLE_GCC_WARNING in masater. | Nick Mathewson | |
2016-06-14 | Merge branch 'maint-0.2.8' | Nick Mathewson | |
2016-06-14 | Resolve the remaining openssl "-Wredundant-decls" warnings. | Nick Mathewson | |
Another part of 19406 | |||
2016-06-11 | Use autoconf, not gcc version, to decide which warnings we have | Nick Mathewson | |
This gives more accurate results under Clang, which can only help us detect more warnings in more places. Fixes bug 19216; bugfix on 0.2.0.1-alpha | |||
2016-06-11 | Enable -Woverlength-strings for GCC>=4.6 on MOST of the code. | Nick Mathewson | |
IMO it's fine for us to make exceptions to this rule in the unit tests, but not in the code at large. | |||
2016-05-17 | Remove 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-02-27 | Update the copyright year. | Nick Mathewson | |
2015-07-11 | Fix a leak in test_microdesc (CID 1311631) | Nick Mathewson | |
2015-06-25 | Merge remote-tracking branch 'origin/maint-0.2.6' | Nick Mathewson | |
2015-06-22 | Repair breakage in early-error case of microdesc parsing | Nick Mathewson | |
When I fixed #11243, I made it so we would take the digest of a descriptor before tokenizing it, so we could desist from download attempts if parsing failed. But when I did that, I didn't remove an assertion that the descriptor began with "onion-key". Usually, this was enforced by "find_start_of_next_microdescriptor", but when find_start_of_next_microdescriptor returned NULL, the assertion was triggered. Fixes bug 16400. Thanks to torkeln for reporting and cypherpunks_backup for diagnosing and writing the first fix here. | |||
2015-06-01 | Fix some memory leaks in ed25519 code and tests | Nick Mathewson | |
2015-05-28 | Include ed25519 keys in microdescriptors. | Nick Mathewson | |
2015-01-02 | Bump copyright dates to 2015, in case someday this matters. | Nick Mathewson | |
2014-12-22 | Fix some coverity issues in the unit tests | Nick Mathewson | |
2014-11-12 | Replace operators used as macro arguments with OP_XX macros | Nick Mathewson | |
Part of fix for 13172 | |||
2014-10-28 | Add another year to our copyright dates. | Nick Mathewson | |
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right? | |||
2014-10-13 | Unit tests for 11243: loading ri, ei, mds from lists | Nick Mathewson | |
These tests make sure that entries are actually marked undownloadable as appropriate. | |||
2014-10-13 | Base tests for 11243: test parsing for md, ei, and ri. | Nick Mathewson | |
We didn't really have test coverage for these parsing functions, so I went and made some. These tests also verify that the parsing functions set the list of invalid digests correctly. | |||
2014-10-13 | Treat unparseable (micro)descriptors and extrainfos as undownloadable | Nick Mathewson | |
One pain point in evolving the Tor design and implementing has been adding code that makes clients reject directory documents that they previously would have accepted, if those descriptors actually exist. When this happened, the clients would get the document, reject it, and then decide to try downloading it again, ad infinitum. This problem becomes particularly obnoxious with authorities, since if some authorities accept a descriptor that others don't, the ones that don't accept it would go crazy trying to re-fetch it over and over. (See for example ticket #9286.) This patch tries to solve this problem by tracking, if a descriptor isn't parseable, what its digest was, and whether it is invalid because of some flaw that applies to the portion containing the digest. (This excludes RSA signature problems: RSA signatures aren't included in the digest. This means that a directory authority can still put another directory authority into a loop by mentioning a descriptor, and then serving that descriptor with an invalid RSA signatures. But that would also make the misbehaving directory authority get DoSed by the server it's attacking, so it's not much of an issue.) We already have a mechanism to mark something undownloadable with downloadstatus_mark_impossible(); we use that here for microdescriptors, extrainfos, and router descriptors. Unit tests to follow in another patch. Closes ticket #11243. | |||
2014-09-15 | Use coccinelle scripts to clean up our unit tests | Nick Mathewson | |
This should get rid of most of the users of the old test_* functions. Some are in macros and will need manual cleanup, though. This patch is for 13119, and was automatically generated with these scripts. The perl scripts are there because coccinelle hates operators as macro arguments. ------------------------------ s/==,/_X_EQ_,/g; s/!=,/_X_NE_,/g; s/<,/_X_LT_,/g; s/>,/_X_GT_,/g; s/>=,/_X_GEQ_,/g; s/<=,/_X_LEQ_,/g; ------------------------------ @@ expression a; identifier func; @@ func (...) { <... -test_fail_msg +TT_DIE ( +( a +) ) ...> } @@ identifier func; @@ func (...) { <... -test_fail() +TT_DIE(("Assertion failed.")) ...> } @@ expression a; identifier func; @@ func (...) { <... -test_assert +tt_assert (a) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_eq +tt_int_op (a, +_X_EQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_neq +tt_int_op (a, +_X_NEQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_streq +tt_str_op (a, +_X_EQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_strneq +tt_str_op (a, +_X_NEQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_eq_ptr +tt_ptr_op (a, +_X_EQ_, b) ...> } @@ expression a, b; identifier func; @@ func() { <... -test_neq_ptr +tt_ptr_op (a, +_X_NEQ_, b) ...> } @@ expression a, b, len; identifier func; @@ func (...) { <... -test_memeq +tt_mem_op (a, +_X_EQ_, b, len) ...> } @@ expression a, b, len; identifier func; @@ func (...) { <... -test_memneq +tt_mem_op (a, +_X_NEQ_, b, len) ...> } ------------------------------ @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a == b +a, _X_EQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a == b +a, _X_EQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a == b +a, _X_EQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a == b +a, _X_EQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a == b +a, _X_EQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a > b +a, _X_GT_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a > b +a, _X_GT_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a > b +a, _X_GT_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a > b +a, _X_GT_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a > b +a, _X_GT_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a < b +a, _X_LT_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a < b +a, _X_LT_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a < b +a, _X_LT_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a < b +a, _X_LT_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a < b +a, _X_LT_, b ) ...> } ------------------------------ s/_X_NEQ_/!=/g; s/_X_NE_/!=/g; s/_X_EQ_/==/g; s/_X_GT_/>/g; s/_X_LT_/</g; s/_X_GEQ_/>=/g; s/_X_LEQ_/<=/g; s/test_mem_op\(/tt_mem_op\(/g; | |||
2014-05-06 | Unit test for dirvote_create_microdescriptor | Nick Mathewson | |
2014-04-29 | Fix leaks in tests related to setting options->DataDirectory | Nick Mathewson | |
We pre-populate that value in main(), and we weren't freeing it before overriding it. | |||
2013-12-17 | Merge remote-tracking branch 'public/bug10409_023' into maint-0.2.4 | Nick Mathewson | |
2013-12-16 | Avoid free()ing from an mmap on corrupted microdesc cache | Nick Mathewson | |
The 'body' field of a microdesc_t holds a strdup()'d value if the microdesc's saved_location field is SAVED_IN_JOURNAL or SAVED_NOWHERE, and holds a pointer to the middle of an mmap if the microdesc is SAVED_IN_CACHE. But we weren't setting that field until a while after we parsed the microdescriptor, which left an interval where microdesc_free() would try to free() the middle of the mmap(). This patch also includes a regression test. This is a fix for #10409; bugfix on 0.2.2.6-alpha. | |||
2013-06-12 | Expand microdesc cache tests | Nick Mathewson | |
Is it possible that *every* attempt to replace the microdesc cache on windows 7 is going to fail because of our lack of FILE_SHARE_DELETE while opening the file? If so, this test will catch #2077 and let us know when it's fixed. | |||
2013-01-16 | Update the copyright date to 201. | Nick Mathewson | |
2012-06-04 | Update copyright dates to 2012; add a few missing copyright statements | Nick Mathewson | |