mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Hiding crypt_path_t: Trivial changes to satisfy check-local.
This commit is contained in:
parent
cd38e41620
commit
593b7726e9
6 changed files with 24 additions and 16 deletions
|
@ -55,8 +55,8 @@ problem function-size /src/app/main/main.c:run_tor_main_loop() 105
|
|||
problem function-size /src/app/main/ntmain.c:nt_service_install() 125
|
||||
problem include-count /src/app/main/shutdown.c 52
|
||||
problem file-size /src/core/mainloop/connection.c 5559
|
||||
problem include-count /src/core/mainloop/connection.c 61
|
||||
problem function-size /src/core/mainloop/connection.c:connection_free_minimal() 185
|
||||
problem include-count /src/core/mainloop/connection.c 62
|
||||
problem function-size /src/core/mainloop/connection.c:connection_free_minimal() 184
|
||||
problem function-size /src/core/mainloop/connection.c:connection_listener_new() 328
|
||||
problem function-size /src/core/mainloop/connection.c:connection_handle_listener_read() 161
|
||||
problem function-size /src/core/mainloop/connection.c:connection_connect_sockaddr() 103
|
||||
|
@ -80,10 +80,11 @@ problem function-size /src/core/or/channeltls.c:channel_tls_process_certs_cell()
|
|||
problem function-size /src/core/or/channeltls.c:channel_tls_process_authenticate_cell() 202
|
||||
problem file-size /src/core/or/circuitbuild.c 3061
|
||||
problem include-count /src/core/or/circuitbuild.c 53
|
||||
problem include-count /src/core/or/circuitbuild.c 54
|
||||
problem function-size /src/core/or/circuitbuild.c:get_unique_circ_id_by_chan() 128
|
||||
problem function-size /src/core/or/circuitbuild.c:circuit_extend() 147
|
||||
problem function-size /src/core/or/circuitbuild.c:choose_good_exit_server_general() 206
|
||||
problem include-count /src/core/or/circuitlist.c 54
|
||||
problem include-count /src/core/or/circuitlist.c 55
|
||||
problem function-size /src/core/or/circuitlist.c:HT_PROTOTYPE() 128
|
||||
problem function-size /src/core/or/circuitlist.c:circuit_free_() 143
|
||||
problem function-size /src/core/or/circuitlist.c:circuit_find_to_cannibalize() 102
|
||||
|
|
|
@ -154,11 +154,10 @@ circuit_init_cpath_crypto(crypt_path_t *cpath,
|
|||
|
||||
tor_assert(cpath);
|
||||
tor_assert(cpath->private);
|
||||
return relay_crypto_init(&cpath->private->crypto, key_data, key_data_len, reverse,
|
||||
is_hs_v3);
|
||||
return relay_crypto_init(&cpath->private->crypto, key_data, key_data_len,
|
||||
reverse, is_hs_v3);
|
||||
}
|
||||
|
||||
|
||||
/** Deallocate space associated with the cpath node <b>victim</b>. */
|
||||
void
|
||||
circuit_free_cpath_node(crypt_path_t *victim)
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* \brief Header file for crypt_path.c.
|
||||
**/
|
||||
|
||||
#ifndef CRYPT_PATH_H
|
||||
#define CRYPT_PATH_H
|
||||
|
||||
crypt_path_t *crypt_path_new(void);
|
||||
|
||||
/* rename */
|
||||
|
@ -24,7 +27,6 @@ circuit_free_cpath_node(crypt_path_t *victim);
|
|||
/* rename */
|
||||
void onion_append_to_cpath(crypt_path_t **head_ptr, crypt_path_t *new_hop);
|
||||
|
||||
|
||||
void
|
||||
cpath_crypt_cell(const crypt_path_t *cpath, uint8_t *payload, bool is_decrypt);
|
||||
|
||||
|
@ -34,4 +36,4 @@ cpath_get_incoming_digest(const crypt_path_t *cpath);
|
|||
void
|
||||
cpath_set_cell_forward_digest(crypt_path_t *cpath, cell_t *cell);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -241,9 +241,11 @@ test_e2e_rend_circuit_setup_legacy(void *arg)
|
|||
tt_int_op(retval, OP_EQ, 1);
|
||||
|
||||
/* Check the digest algo */
|
||||
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->private->crypto.f_digest),
|
||||
tt_int_op(
|
||||
crypto_digest_get_algorithm(or_circ->cpath->private->crypto.f_digest),
|
||||
OP_EQ, DIGEST_SHA1);
|
||||
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->private->crypto.b_digest),
|
||||
tt_int_op(
|
||||
crypto_digest_get_algorithm(or_circ->cpath->private->crypto.b_digest),
|
||||
OP_EQ, DIGEST_SHA1);
|
||||
tt_assert(or_circ->cpath->private->crypto.f_crypto);
|
||||
tt_assert(or_circ->cpath->private->crypto.b_crypto);
|
||||
|
@ -311,9 +313,11 @@ test_e2e_rend_circuit_setup(void *arg)
|
|||
tt_int_op(retval, OP_EQ, 1);
|
||||
|
||||
/* Check that the crypt path has prop224 algorithm parameters */
|
||||
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->private->crypto.f_digest),
|
||||
tt_int_op(
|
||||
crypto_digest_get_algorithm(or_circ->cpath->private->crypto.f_digest),
|
||||
OP_EQ, DIGEST_SHA3_256);
|
||||
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->private->crypto.b_digest),
|
||||
tt_int_op(
|
||||
crypto_digest_get_algorithm(or_circ->cpath->private->crypto.b_digest),
|
||||
OP_EQ, DIGEST_SHA3_256);
|
||||
tt_assert(or_circ->cpath->private->crypto.f_crypto);
|
||||
tt_assert(or_circ->cpath->private->crypto.b_crypto);
|
||||
|
|
|
@ -195,9 +195,11 @@ test_e2e_rend_circuit_setup(void *arg)
|
|||
tt_int_op(retval, OP_EQ, 1);
|
||||
|
||||
/* Check the digest algo */
|
||||
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->private->crypto.f_digest),
|
||||
tt_int_op(
|
||||
crypto_digest_get_algorithm(or_circ->cpath->private->crypto.f_digest),
|
||||
OP_EQ, DIGEST_SHA3_256);
|
||||
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->private->crypto.b_digest),
|
||||
tt_int_op(
|
||||
crypto_digest_get_algorithm(or_circ->cpath->private->crypto.b_digest),
|
||||
OP_EQ, DIGEST_SHA3_256);
|
||||
tt_assert(or_circ->cpath->private->crypto.f_crypto);
|
||||
tt_assert(or_circ->cpath->private->crypto.b_crypto);
|
||||
|
|
|
@ -51,8 +51,8 @@ testing_circuitset_setup(const struct testcase_t *testcase)
|
|||
cs->origin_circ->base_.purpose = CIRCUIT_PURPOSE_C_GENERAL;
|
||||
for (i=0; i<3; ++i) {
|
||||
crypt_path_t *hop = crypt_path_new();
|
||||
relay_crypto_init(&hop->private->crypto, KEY_MATERIAL[i], sizeof(KEY_MATERIAL[i]),
|
||||
0, 0);
|
||||
relay_crypto_init(&hop->private->crypto, KEY_MATERIAL[i],
|
||||
sizeof(KEY_MATERIAL[i]), 0, 0);
|
||||
hop->state = CPATH_STATE_OPEN;
|
||||
onion_append_to_cpath(&cs->origin_circ->cpath, hop);
|
||||
tt_ptr_op(hop, OP_EQ, cs->origin_circ->cpath->prev);
|
||||
|
|
Loading…
Add table
Reference in a new issue