aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-05-03Hiding crypt_path_t: Move some more crypt_path-specific functions.George Kadianakis
- Move test-only cpath_get_n_hops() to crypt_path.c. - Move onion_next_hop_in_cpath() and rename to cpath_get_next_non_open_hop(). The latter function was directly accessing cpath->state, and it's a first step at hiding ->state.
2019-05-03Hiding crypt_path_t: Rename some functions to fit the crypt_path API.George Kadianakis
Some of these functions are now public and cpath-specific so their name should signify the fact they are part of the cpath module: assert_cpath_layer_ok -> cpath_assert_layer_ok assert_cpath_ok -> cpath_assert_ok onion_append_hop -> cpath_append_hop circuit_init_cpath_crypto -> cpath_init_circuit_crypto circuit_free_cpath_node -> cpath_free onion_append_to_cpath -> cpath_extend_linked_list
2019-05-03Hiding crypt_path_t: Trivial changes to satisfy check-local.George Kadianakis
2019-05-03Hiding crypt_path_t: Ensure that ->private is initialized.George Kadianakis
Now that we are using a constructor we should be more careful that we are always using the constructor to initialize crypt_path_t, so make sure that ->private is initialized.
2019-05-03Hiding crypt_path_t: Create a constructor for crypt_path_t.George Kadianakis
We are using an opaque pointer so the structure needs to be allocated on the heap. This means we now need a constructor for crypt_path_t. Also modify all places initializing a crypt_path_t to use the constructor.
2019-05-03Hiding crypt_path_t: Fixup broken unittests.George Kadianakis
2019-05-03Hiding crypt_path_t: Move the free func in crypt_path.c.George Kadianakis
Again everything is moved, apart from a free line using ->private.
2019-05-03Hiding crypt_path_t: Move some more init funcs in crypt_path.c.George Kadianakis
Everything is moved, but the argument of the function is edited to access ->private->crypto.
2019-05-03Hiding crypt_path_t: Start with crypt_path.crypto .George Kadianakis
Create some functions to eventually be able to hide crypt_path_t.crypto.
2019-05-03Hiding crypt_path_t: Move init functions to crypt_path.c.George Kadianakis
This commit only moves code.
2019-05-03Hiding crypt_path_t: Move assert functions in crypt_path.c.George Kadianakis
This commit only moves code, and makes one function public.
2019-05-03Hiding crypt_path_t: Introduce opaque crypt_path_private_t .George Kadianakis
This will be our base for incrementally hiding crypt_path_t.
2019-05-03Merge branch 'tor-github/pr/984'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-02Merge branch 'tor-github/pr/986'George Kadianakis
2019-05-02Merge branch 'tor-github/pr/999'George Kadianakis
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-05-02Remove some now-needless dirauth includesNick Mathewson
2019-05-02Make keypin.c dirauth-onlyNick Mathewson
2019-05-02Make the bwauth.c module dirauth-only.Nick Mathewson
2019-05-02Move voteflags.[ch] to become dirauth only.Nick Mathewson
For various reasons, this was a nontrivial movement. There are several places in the code where we do something like "update the flags on this routerstatus or node if we're an authority", and at least one where we pretended to be an authority when we weren't.
2019-05-02sendme: Improve logging messagesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-01Merge remote-tracking branch 'tor-github/pr/950'Nick Mathewson
2019-04-30Make the reachability.c module dirauth-only.Nick Mathewson
2019-04-30Make the guardfraction.c module dirauth-only.Nick Mathewson
2019-04-30Make the process_descs.c module dirauth-only.Nick Mathewson
2019-04-30Make the dsigs_parse.c module dirauth-only.Nick Mathewson
2019-04-30Make the recommend_pkg file dirauth-only.Nick Mathewson
2019-04-30Clean up formatting after CoccinelleTaylor Yu
Clean up some minor formatting quirks after the Coccinelle run.
2019-04-30Run Coccinelle for control.c refactorTaylor Yu
2019-04-30Manually fix some control repliesTaylor Yu
Manually fix up some reply-generating code that the Coccinelle scripts won't match. Some more complicated ones remain -- these are mostly ones that accumulate data to send, and then call connection_buf_add() or connection_write_str_to_buf() directly.
2019-04-30Factor out control reply outputTaylor Yu
Create a set of abstractions for controller commands and events to output replies to the control channel. The control protocol has a relatively consistent SMTP-like structure, so it's helpful when code that implements control commands and events doesn't explicitly format everything on its own.
2019-04-30Add clarifying comments to control_proto.cTaylor Yu
Refer to control-spec.txt grammar productions in comments in control_proto.c for clarity.
2019-04-30Split reply formatting out of control_fmt.cTaylor Yu
Split the core reply formatting code out of control_fmt.c into control_proto.c. The remaining code in control_format.c deals with specific subsystems and will eventually move to join those subsystems.
2019-04-30Correct file name in doxygen commentTaylor Yu
2019-04-30Merge branch 'maint-0.4.0'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/978' into maint-0.4.0George Kadianakis
2019-04-30Merge branch 'tor-github/pr/937'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/936'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/993'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/983'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/980'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Merge branch 'tor-github/pr/909'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Rename and clarify some functions for periodic eventsNick Mathewson
When we tell the periodic event manager about an event, we are "registering" that event. The event sits around without being usable, however, until we "connect" the event to libevent. In the end, we "disconnect" the event and remove its libevent parts. Previously, we called these operations "add", "setup", and "destroy", which led to confusion.
2019-04-30Remove now-extraneous calls to initialize_periodic_events().Nick Mathewson
This is now the responsibility of the mainloop's subsystem initializer.
2019-04-30Move dirauth periodic events into dirauth module.Nick Mathewson
Closes ticket 30294.
2019-04-30Turn 'mainloop' into a subsystem.Nick Mathewson
We need a little refactoring for this to work, since the initialization code for the periodic events assumes that libevent is already initialized, which it can't be until it's configured. This change, combined with the previous ones, lets other subsystems declare their own periodic events, without mainloop.c having to know about them. Implements ticket 30293.
2019-04-30Make sure that the rng is not replaced if it is already replaced.Nick Mathewson
2019-04-30Make the deterministic and reproducible rng test code handle fast_rngNick Mathewson
2019-04-30Add improved debugging support to crypto_rand_fast code.Nick Mathewson
2019-04-30Extract add-entropy code from crypto_fast_rng to a new functionNick Mathewson