aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir.c
AgeCommit message (Collapse)Author
2019-09-11Update #includes to point to confparse.h in its new location.Nick Mathewson
This commit was automatically generated by running scripts/maint/rectify_include_paths.py .
2019-04-05crypto_format: Remove the return values from digest256_to_base64()teor
... and ed25519_public_to_base64(). Also remove all checks for the return values, which were redundant anyway, because the functions never failed. Part of 29960.
2019-03-26Merge branch 'tor-github/pr/842'George Kadianakis
2019-03-26Merge branch 'tor-github/pr/709'George Kadianakis
2019-03-26test/dir: add a 4th argument to dirserv_read_measured_bandwidths()teor
Part of 29806.
2019-03-26Merge branch 'ticket29806_035_squashed_merged' into ↵teor
ticket29806_040_squashed_merged
2019-03-25Split getinfo handling into a new control_getinfo.cNick Mathewson
2019-03-21test/dir: add an extra argument to dirserv_read_measured_bandwidths()teor
Part of 29806.
2019-03-21Merge branch 'ticket29806_034_squashed' into ticket29806_035_squashed_mergedteor
Copy and paste the vote=0 code from the old src/or/dirserv.c to the new src/feature/dirauth/bwauth.c.
2019-03-21bwauth: Ignore bandwidth file lines with "vote=0"juga0
so that the relays that would be "excluded" from the bandwidth file because of something failed can be included to diagnose what failed, without still including these relays in the bandwidth authorities vote. Closes #29806.
2019-02-20fixup! test_dir: Refactor common code out of the dir_format unit teststeor
2019-02-19test_dir: Test descriptor variantsteor
Including: * relays and bridges, * no stats, basic stats, and all stats Part of 29017 and 29018.
2019-02-19test_dir: Refactor common code out of the dir_format unit teststeor
Also: * delete some obsolete code that was #if 0 * improve cleanup on failure * make the dir_format tests more consistent with each other * construct the descriptors using smartlist chunks This refactor is incomplete, because removing the remaining duplicate code would be time-consuming. Part of 29017 and 29018.
2019-02-19test_dir: Test rsa + ed25519 extrainfo creation and parsingteor
Also fix a missing mock in rsa-only parsing.
2019-02-19test_dir: Split test_dir_formats into separate rsa and rsa_ed25519 teststeor
2019-02-19test_dir: Unit tests for RSA-only router and extrainfo descriptor creationteor
Tests 29017 and 29018.
2019-02-13test: Add test to get the digest of a bw filejuga0
2019-02-13bwauth: Add function to get the digest of a bw filejuga0
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-12-03Add tests for parsing each routerstatus flag.Nick Mathewson
2018-10-31Merge branch 'networkstatus_mmap' into networkstatus_mmap_mergeNick Mathewson
2018-10-01Remove versions.h include from routerparse.hNick Mathewson
2018-10-01extract networkstatus parsing to its own file.Nick Mathewson
2018-10-01Pull detached-signatures code into dirauth.Nick Mathewson
2018-10-01Split the authority-cert and signature/hash code from routerparseNick Mathewson
2018-10-01Extract logic for dumping unparseable junk from routerparse.cNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.
2018-09-25Extract all the "am I a server" functions from router.cNick Mathewson
2018-09-21Split directory.c code into several modulesNick Mathewson
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
2018-09-20Split most of dirserv.c into several new modulesNick Mathewson
In dirauth: * bwauth.c reads and uses bandwidth files * guardfraction.c reads and uses the guardfraction file * reachability.c tests relay reachability * recommend_pkg.c handles the recommended-packages lines. * recv_descs.c handles fingerprint files and processing incoming routerinfos that relays upload to us * voteflag.c computes flag thresholds and sets those thresholds on routerstatuses when computing votes In control: * fmt_serverstatus.c generates the ancient "v1 server status" format that controllers expect. In nodelist: * routerstatus_fmt.c formats routerstatus entries for a consensus, a vote, or for the controller.
2018-09-19Split routerlist.c into 4 separate modulesNick Mathewson
There are now separate modules for: * the list of router descriptors * the list of authorities and fallbacks * managing authority certificates * selecting random nodes
2018-09-11Followup: Make authority_cert_parse_from_string() take length tooNick Mathewson
2018-09-11Revise networkstatus parsing code to use lengthsNick Mathewson
This way the networkstatus can be parsed without being NUL-terminated, so we can implement 27244 and mmap our consensus objects.
2018-08-29router: Keep RSA onion public key in ASN.1 formatDavid Goulet
The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding which is 140 for a 1024 RSA key. We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor (microdesc_t). Scaling this to 6000 relays, and considering client usually only have microdescriptors, we save 1.608 MB of RAM which is considerable for mobile client. This commit makes it that we keep the RSA onion public key (used for TAP handshake) in ASN.1 format instead of an OpenSSL RSA object. Changes is done in both routerinfo_t and microdesc_t. Closes #27246 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-07-30Merge remote-tracking branch 'juga/ticket3723_03_squashed_rebased'Nick Mathewson
2018-07-18Add some missing includes and struct declarations.Nick Mathewson
2018-07-18Merge branch 'maint-0.3.4'Nick Mathewson
2018-07-18Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-07-18Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-07-18Merge branch 'maint-0.2.9' into maint-0.3.2Nick Mathewson
2018-07-18Add a test for format_recommended_version_list.Nick Mathewson
2018-07-16Add tests for max length bw file headersjuga0
2018-07-16Add test with NULL bw_file_headerjuga0
and complete v1.0.0 bandwidth file
2018-07-16Move bandwidth file tests to same functionjuga0
also add tests for bw_file_headers. Headers are all that is found before a correct relay line or the terminator. Tests include: * a empty bandwidth file * a bandwidth file with only timestamp * a bandwidth file with v1.0.0 headers * a bandwidth file with v1.0.0 headers and relay lines * a bandwidth file with v1.1.0 headers and v1.0.0 relay lines * a bandwidth file with v1.0.0 headers, malformed relay lines and relay lines * a bandwidth file with v1.0.0 headers, malformed relay lines, relay lines and malformed relay lines * a bandwidth file with v1.1.0 headers without terminator * a bandwidth file with v1.1.0 headers with terminator * a bandwidth file with v1.1.0 headers without terminator and relay lines * a bandwidth file with v1.1.0 headers with terminator and relay lines * a bandwidth file with v1.1.0 headers without terminator, bad relay lines and relay lines * a bandwidth file with v1.1.0 headers with terminator, bad relay lines and relay lines
2018-07-16Add the Bandwidth List file headers to votesjuga0
* add bwlist_headers argument to dirserv_read_measured_bandwidth in order to store all the headers found when parsing the file * add bwlist_headers to networkstatus_t in order to store the the headers found by the previous function * include the bandwidth headers as string in vote documents * add test to check that dirserv_read_measured_bandwidth generates the bwlist_headers
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-03Merge remote-tracking branch 'github/ticket26626'Nick Mathewson
2018-07-03Replace U64_LITERAL with the standard UINT64_CNick Mathewson