20 #define CRYPT_PATH_PRIVATE
44 new_hop->
next = (*head_ptr);
47 (*head_ptr)->
prev = new_hop;
50 new_hop->
prev = new_hop->
next = new_hop;
65 hop->magic = CRYPT_PATH_MAGIC;
66 hop->
state = CPATH_STATE_CLOSED;
88 if (cp->
state == CPATH_STATE_AWAITING_KEYS) {
90 }
else if (cp->
state == CPATH_STATE_OPEN) {
96 }
while (cp != start);
111 case CPATH_STATE_OPEN:
114 case CPATH_STATE_CLOSED:
118 case CPATH_STATE_AWAITING_KEYS:
148 const char *key_data,
size_t key_data_len,
149 int reverse,
int is_hs_v3)
191 return cpath->pvt_crypto.b_digest;
229 if (hop->
state != CPATH_STATE_OPEN)
232 }
while (hop != cpath);
236 #ifdef TOR_UNIT_TESTS
242 unsigned int n_hops = 0;
253 }
while (tmp != *head_ptr);
Fixed-size cell structure.
Header file for circuitbuild.c.
int32_t circuit_initial_package_window(void)
Header file for circuitlist.c.
int cpath_append_hop(crypt_path_t **head_ptr, extend_info_t *choice)
uint8_t * cpath_get_sendme_digest(crypt_path_t *cpath)
void cpath_assert_layer_ok(const crypt_path_t *cp)
struct crypto_digest_t * cpath_get_incoming_digest(const crypt_path_t *cpath)
int cpath_init_circuit_crypto(crypt_path_t *cpath, const char *key_data, size_t key_data_len, int reverse, int is_hs_v3)
void cpath_crypt_cell(const crypt_path_t *cpath, uint8_t *payload, bool is_decrypt)
crypt_path_t * cpath_get_next_non_open_hop(crypt_path_t *cpath)
void cpath_assert_ok(const crypt_path_t *cp)
void cpath_sendme_record_cell_digest(crypt_path_t *cpath, bool is_foward_digest)
void cpath_extend_linked_list(crypt_path_t **head_ptr, crypt_path_t *new_hop)
void cpath_set_cell_forward_digest(crypt_path_t *cpath, cell_t *cell)
void cpath_free(crypt_path_t *victim)
Header file for crypt_path.c.
Path structures for origin circuits.
void memwipe(void *mem, uint8_t byte, size_t sz)
Common functions for cryptographic routines.
extend_info_t * extend_info_dup(extend_info_t *info)
Header for core/or/extendinfo.c.
#define log_fn(severity, domain, args,...)
void onion_handshake_state_release(onion_handshake_state_t *state)
Header file for onion_crypto.c.
Master header file for Tor-specific functionality.
Header for relay_crypto.c.
void relay_crypto_assert_ok(const relay_crypto_t *crypto)
int relay_crypto_init(relay_crypto_t *crypto, const char *key_data, size_t key_data_len, int reverse, int is_hs_v3)
void relay_crypto_record_sendme_digest(relay_crypto_t *crypto, bool is_foward_digest)
void relay_set_digest(crypto_digest_t *digest, cell_t *cell)
uint8_t * relay_crypto_get_sendme_digest(relay_crypto_t *crypto)
void relay_crypto_clear(relay_crypto_t *crypto)
void relay_crypt_one_payload(crypto_cipher_t *cipher, uint8_t *in)
struct crypt_path_t * prev
struct crypt_path_t * next
struct crypto_dh_t * rend_dh_handshake_state
extend_info_t * extend_info
onion_handshake_state_t handshake_state