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

Bug30236 sendme rebase #1000

Merged
merged 19 commits into from May 8, 2019
Merged

Conversation

Labels
None yet
Projects
None yet
3 participants
@asn-d6
Copy link
Member

@asn-d6 asn-d6 commented May 3, 2019

No description provided.

asn-d6 added 18 commits May 3, 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 May 3, 2019

Pull Request Test Coverage Report for Build 4953

  • 68 of 101 (67.33%) changed or added relevant lines in 8 files are covered.
  • 11 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.009%) to 62.37%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/crypto/relay_crypto.c 4 5 80.0%
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 55 78 70.51%
Files with Coverage Reduction New Missed Lines %
src/core/or/circuitpadding.c 11 91.02%
Totals Coverage Status
Change from base Build 4942: -0.009%
Covered Lines: 46445
Relevant Lines: 74467

💛 - Coveralls

@torproject-pusher torproject-pusher merged commit e9769d6 into torproject:master May 8, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment