aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_microdesc.c
AgeCommit message (Collapse)Author
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Use new ENABLE/DISABLE_GCC_WARNINGNick Mathewson
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-09-10Add a unit test for ed25519 identity parsing in microdescriptorsNick Mathewson
This test makes sure that we parse ed25519 identities to get the correct data from them. It also tests: * That a microdescriptor may not have two ed25519 identities. * That a microdescriptor may not have an ed25519 identity that is not a valid base64-encoded ed25519 key. * That a microdescriptor may have an unrecognized identity type. It will help test the refactoring of ticket31675.
2019-09-05Add tests for IPv6 exit policies on microdescriptorsNeel Chauhan
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-11-24Add a consensus method in which md families get canonicalized.Nick Mathewson
Implements prop298. Closes ticket 28266.
2018-11-24Revise nodefamily.c to match proposal 298Nick Mathewson
Prop298 says that family entries should be formatted with $hexids in uppercase, nicknames in lower case, $hexid~names truncated, and everything sorted lexically. These changes implement that ordering for nodefamily.c. We don't _strictly speaking_ need to nodefamily.c formatting use this for prop298 microdesc generation, but it seems silly to have two separate canonicalization algorithms.
2018-11-19Use nodefamily_t in microdescriptors.Nick Mathewson
Closes ticket 27359.
2018-10-01Split microdescriptor parser into its own file.Nick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Remove system headers from or.hNick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract routerinfo_t into its own header.Nick Mathewson
I was expecting this to be much worse.
2018-06-15Extract microdesc_t into its own header.Nick Mathewson
2018-06-15Extract routerstatus_t into its own header.Nick Mathewson
2018-06-15Extract networkstatus_t and ..sr_info_t into their own headersNick Mathewson
2018-04-27mod: Move dirauth specific files to its own moduleDavid 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-27dirvote: Trim down the public APIDavid 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-22Remove MIN_METHOD_FOR_{PACKAGE_LINES,GUARDFRACTION,ED25519_ID_IN_MD}Nick Mathewson
Also remove a rest for pre-19 microdesc versions.
2018-04-22Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.Nick Mathewson
2018-04-22Remove 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-05Implement the various get_foodir_*() functions.Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander 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-31Remove some now-needless openssl includes from src/test.Nick Mathewson
It would appear that these includes weren't actually used.
2017-03-15Run the copyright update script.Nick Mathewson
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
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-14Use ENABLE/DISABLE_GCC_WARNING in masater.Nick Mathewson
2016-06-14Merge branch 'maint-0.2.8'Nick Mathewson
2016-06-14Resolve the remaining openssl "-Wredundant-decls" warnings.Nick Mathewson
Another part of 19406
2016-06-11Use autoconf, not gcc version, to decide which warnings we haveNick 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-11Enable -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-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-02-27Update the copyright year.Nick Mathewson
2015-07-11Fix a leak in test_microdesc (CID 1311631)Nick Mathewson
2015-06-25Merge remote-tracking branch 'origin/maint-0.2.6'Nick Mathewson
2015-06-22Repair breakage in early-error case of microdesc parsingNick 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-01Fix some memory leaks in ed25519 code and testsNick Mathewson
2015-05-28Include ed25519 keys in microdescriptors.Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-22Fix some coverity issues in the unit testsNick Mathewson
2014-11-12Replace operators used as macro arguments with OP_XX macrosNick Mathewson
Part of fix for 13172
2014-10-28Add 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-13Unit tests for 11243: loading ri, ei, mds from listsNick Mathewson
These tests make sure that entries are actually marked undownloadable as appropriate.
2014-10-13Base 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-13Treat unparseable (micro)descriptors and extrainfos as undownloadableNick 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.