Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asn ticket30236 squashed merged #996

Closed

Conversation

Labels
None yet
Projects
None yet
4 participants
@nmathewson
Copy link
Contributor

@nmathewson nmathewson commented Apr 30, 2019

No description provided.

asn-d6 and others added 18 commits Apr 10, 2019
This will be our base for incrementally hiding crypt_path_t.
This commit only moves code, and makes one function public.
Create some functions to eventually be able to hide crypt_path_t.crypto.
Everything is moved, but the argument of the function is edited to access
->private->crypto.
Again everything is moved, apart from a free line using ->private.
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.
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.
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
- 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.
@coveralls
Copy link

@coveralls coveralls commented Apr 30, 2019

Pull Request Test Coverage Report for Build 4914

  • 65 of 94 (69.15%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 62.412%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/circuitlist.c 3 5 60.0%
src/feature/rend/rendservice.c 0 2 0.0%
src/core/or/circuitbuild.c 1 6 16.67%
src/core/or/crypt_path.c 53 73 72.6%
Totals Coverage Status
Change from base Build 4913: 0.05%
Covered Lines: 46352
Relevant Lines: 74268

💛 - Coveralls

@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment