tor  0.4.1.0-alpha-dev
hs_circuit.h
Go to the documentation of this file.
1 /* Copyright (c) 2017-2019, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
9 #ifndef TOR_HS_CIRCUIT_H
10 #define TOR_HS_CIRCUIT_H
11 
12 #include "core/or/or.h"
14 
15 #include "feature/hs/hs_service.h"
16 
17 /* Cleanup function when the circuit is closed or/and freed. */
18 void hs_circ_cleanup(circuit_t *circ);
19 
20 /* Circuit API. */
21 int hs_circ_service_intro_has_opened(hs_service_t *service,
23  const hs_service_descriptor_t *desc,
24  origin_circuit_t *circ);
25 void hs_circ_service_rp_has_opened(const hs_service_t *service,
26  origin_circuit_t *circ);
27 int hs_circ_launch_intro_point(hs_service_t *service,
28  const hs_service_intro_point_t *ip,
29  extend_info_t *ei);
30 int hs_circ_launch_rendezvous_point(const hs_service_t *service,
31  const curve25519_public_key_t *onion_key,
32  const uint8_t *rendezvous_cookie);
33 void hs_circ_retry_service_rendezvous_point(origin_circuit_t *circ);
34 
35 origin_circuit_t *hs_circ_service_get_intro_circ(
36  const hs_service_intro_point_t *ip);
37 
38 /* Cell API. */
39 int hs_circ_handle_intro_established(const hs_service_t *service,
40  const hs_service_intro_point_t *ip,
41  origin_circuit_t *circ,
42  const uint8_t *payload,
43  size_t payload_len);
44 int hs_circ_handle_introduce2(const hs_service_t *service,
45  const origin_circuit_t *circ,
47  const uint8_t *subcredential,
48  const uint8_t *payload, size_t payload_len);
49 int hs_circ_send_introduce1(origin_circuit_t *intro_circ,
50  origin_circuit_t *rend_circ,
51  const hs_desc_intro_point_t *ip,
52  const uint8_t *subcredential);
53 int hs_circ_send_establish_rendezvous(origin_circuit_t *circ);
54 
55 /* e2e circuit API. */
56 
57 int hs_circuit_setup_e2e_rend_circ(origin_circuit_t *circ,
58  const uint8_t *ntor_key_seed,
59  size_t seed_len,
60  int is_service_side);
61 int hs_circuit_setup_e2e_rend_circ_legacy_client(origin_circuit_t *circ,
62  const uint8_t *rend_cell_body);
63 
64 #ifdef HS_CIRCUIT_PRIVATE
65 
66 STATIC hs_ident_circuit_t *
67 create_rp_circuit_identifier(const hs_service_t *service,
68  const uint8_t *rendezvous_cookie,
69  const curve25519_public_key_t *server_pk,
70  const hs_ntor_rend_cell_keys_t *keys);
71 
72 #endif /* defined(HS_CIRCUIT_PRIVATE) */
73 
74 #endif /* !defined(TOR_HS_CIRCUIT_H) */
75 
Header file containing service data for the HS subsytem.
Master header file for Tor-specific functionality.
Header for crypto_ed25519.c.