summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-07-07Explicit length checks in create_rend_cpath().George Kadianakis
Had to also edit hs_ntor_circuit_key_expansion() to make it happen.
2017-07-07Explicit length checks in circuit_init_cpath_crypto().George Kadianakis
2017-07-07Rename get_rend_cpath() to create_rend_cpath().George Kadianakis
based on Nick's review.
2017-07-07Rename rend_circuit_validate_purpose() based on Nick's review.George Kadianakis
2017-07-07Turn some warnings into bugs and non-fatal asserts.George Kadianakis
2017-07-07Improve docs based on Nick's review.George Kadianakis
2017-07-07test: Add service-side unittests for e2e rendezvous circuits.George Kadianakis
2017-07-07test: Add client-side unittests for e2e rend circuits.George Kadianakis
2017-07-07test: Move some test code to test helpers.George Kadianakis
Move code to create connection streams and rend_data structures to test_helpers so that we can use them from the e2e rendezvous circuit unittests.
2017-07-07test: Crypto groundwork for e2e circuit unittests.George Kadianakis
- Move some crypto structures so that they are visible by tests. - Introduce a func to count number of hops in cpath which will be used by the tests. - Mark a function as mockable.
2017-07-07test: Introduce hs_client_note_connection_attempt_succeeded().George Kadianakis
This commit paves the way for the e2e circuit unittests. Add a stub for the prop224 equivalent of rend_client_note_connection_attempt_ended(). That function was needed for tests, since the legacy function would get called when we attach streams and our client-side tests would crash with assert failures on rend_data. This also introduces hs_client.[ch] to the codebase.
2017-07-07prop224: Introduce e2e rendezvous circuit code.David Goulet
This commit adds most of the work of #21859. It introduces hs_circuit.c functions that can handle the setup of e2e circuits for prop224 hidden services, and also for legacy hidden service clients. Entry points are: prop224 circuits: hs_circuit_setup_e2e_rend_circ() legacy client-side circuits: hs_circuit_setup_e2e_rend_circ_legacy_client() This commit swaps the old rendclient code to use the new API. I didn't try to accomodate the legacy service-side code in this API, since that's too tangled up and it would mess up the new API considerably IMO (all this service_pending_final_cpath_ref stuff is complicated and I didn't want to change it). Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07Refactor legacy code to support hs_ident along with rend_data.George Kadianakis
The legacy HS circuit code uses rend_data to match between circuits and streams. We refactor some of that code so that it understands hs_ident as well which is used for prop224.
2017-07-07Refactor circuit_init_cpath_crypto() to do prop224 rend circuits.George Kadianakis
circuit_init_cpath_crypto() is responsible for creating the cpath of legacy SHA1/AES128 circuits currently. We want to use it for prop224 circuits, so we refactor it to create circuits with SHA3-256 and AES256 as well. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07Refactor the HS ntor key expansion to fit the e2e circuit API.George Kadianakis
We want to use the circuit_init_cpath_crypto() function to setup our cpath, and that function accepts a key array as input. So let's make our HS ntor key expansion function also return a key array as output, instead of a struct. Also, we actually don't need KH from the key expansion, so the key expansion output can be one DIGEST256_LEN shorter. See here for more info: https://trac.torproject.org/projects/tor/ticket/22052#comment:3
2017-07-07prop224: Add connection and circuit identifier objectDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-06-22Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-22Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-06-22Combine our "don't do this if no consensus" entryguards checksNick Mathewson
Suggested by asn on 22400 review.
2017-06-22whitespace fixNick Mathewson
2017-06-22Merge remote-tracking branch 'rl1987/bug22461'Nick Mathewson
2017-06-22Merge remote-tracking branch 'public/bug7890'Nick Mathewson
2017-06-21make assign_onionskin_to_cpuworker failure case more clearRoger Dingledine
now it looks like the other time we call it
2017-06-21Merge branch 'callgraph_reduction_v2'Nick Mathewson
2017-06-21Extract channel_do_open_actions() from non-open _change_state casesNick Mathewson
This reduces the size of the largest SCC in the callgraph by 30 functions, from 58 to 28.
2017-06-21Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-21Merge branch 'bug22356_029' into maint-0.3.1Nick Mathewson
2017-06-21Call it a BUG to use -1 in authdir_mode_handles_descsNick Mathewson
2017-06-21Remove obsolete authdir_mode_any_nonhidserv()huyvq
- Replace it with authdir_mode()
2017-06-21Convert authdir_mode_handles_descs() to alternative wrappershuyvq
-authdir_mode_handles_descs(options, ROUTER_PURPOSE_BRIDGE) to authdir_mode_bridge(options). - authdir_mode_handles_descs(options, ROUTER_PURPOSE_GENERAL) to authdir_mode_v3(options).
2017-06-21Convert authdir_mode_handles_descs(options, -1) with authdir_mode(options)huyvq
2017-06-21Remove obsolete authdir_mode_any_main()huyvq
2017-06-21Better error message for GETINFO desc/(id|name) whenever microdescriptors ↵Kevin Butler
are in use. Fixes #5847.
2017-06-20Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-20Merge branch 'bug22502_redux_031' into maint-0.3.1Nick Mathewson
2017-06-20Merge branch 'bug22672_031' into maint-0.3.1Nick Mathewson
2017-06-20Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-20Merge remote-tracking branch 'argonblue/bug22638' into maint-0.3.1Nick Mathewson
2017-06-20Enforce the rule that COMPRESS_OK means progress was made.Nick Mathewson
If COMPRESS_OK occurs but data is neither consumed nor generated, treat it as a BUG and a COMPRESS_ERROR. This change is meant to prevent infinite loops in the case where we've made a mistake in one of our compression backends. Closes ticket 22672.
2017-06-20mingw/windows printf lacks %zd ; use %lu and casts insteadNick Mathewson
(This approach can lose accuracy, but it's only in debug-level messages.) Fixes windows compilation. Bugfix on recent compress.c changes; bug not in any released Tor.
2017-06-20Fix compress_none.c header commentTaylor Yu
The Doxygen \file markup for compress_none.c had the wrong filename. Fixes #22638.
2017-06-20Send the correct content-encoding when serving cached_dir_t objectsNick Mathewson
A cached_dir_t object (for now) is always compressed with DEFLATE_METHOD, but in handle_get_status_vote() to we were using the general compression-negotiation code decide what compression to claim we were using. This was one of the reasons behind 22502. Fixes bug 22669; bugfix on 0.3.1.1-alpha
2017-06-20Correct the fix to bug 22629 to permit trailing non-garbageNick Mathewson
This change makes it so that we can decompress concatenated zstd outputs.
2017-06-20Add a unit test for decompressing concatenated inputs.Nick Mathewson
2017-06-20Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-20Merge remote-tracking branch 'teor/bug22502' into maint-0.3.1Nick Mathewson
2017-06-19Don't expand guard sample set unless consensus is "reasonably live"Nick Mathewson
Fixes what I think is the main root cause of 22400. Bugfix on 0.3.0.1-alpha.
2017-06-19Downgrade "assign_to_cpuworker failed" to INFO.Nick Mathewson
Closes ticket 22356
2017-06-19Merge branch 'ticket20575_031_01_squashed'Nick Mathewson
2017-06-19refer to the correct versionNick Mathewson