2017-05-12 12:00:43 -04:00
|
|
|
/* Copyright (c) 2017, The Tor Project, Inc. */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file hs_circuit.h
|
|
|
|
* \brief Header file containing circuit data for the whole HS subsytem.
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef TOR_HS_CIRCUIT_H
|
|
|
|
#define TOR_HS_CIRCUIT_H
|
|
|
|
|
|
|
|
#include "or.h"
|
2017-02-16 15:55:12 -05:00
|
|
|
#include "crypto.h"
|
|
|
|
#include "crypto_ed25519.h"
|
|
|
|
|
|
|
|
#include "hs_service.h"
|
|
|
|
|
|
|
|
/* Circuit API. */
|
2017-02-21 14:20:39 -05:00
|
|
|
int hs_circ_service_intro_has_opened(hs_service_t *service,
|
|
|
|
hs_service_intro_point_t *ip,
|
|
|
|
const hs_service_descriptor_t *desc,
|
|
|
|
origin_circuit_t *circ);
|
2017-02-16 15:55:12 -05:00
|
|
|
int hs_circ_launch_intro_point(hs_service_t *service,
|
|
|
|
const hs_service_intro_point_t *ip,
|
|
|
|
extend_info_t *ei, time_t now);
|
2017-05-12 12:00:43 -04:00
|
|
|
|
2017-02-21 14:20:39 -05:00
|
|
|
/* Cell API. */
|
|
|
|
void hs_circ_send_establish_intro(const hs_service_t *service,
|
|
|
|
hs_service_intro_point_t *ip,
|
|
|
|
origin_circuit_t *circ);
|
2017-03-07 14:33:03 -05:00
|
|
|
int hs_circ_handle_intro_established(const hs_service_t *service,
|
|
|
|
const hs_service_intro_point_t *ip,
|
|
|
|
origin_circuit_t *circ,
|
|
|
|
const uint8_t *payload,
|
|
|
|
size_t payload_len);
|
2017-02-21 14:20:39 -05:00
|
|
|
|
2017-05-12 12:00:43 -04:00
|
|
|
/* e2e circuit API. */
|
|
|
|
|
|
|
|
int hs_circuit_setup_e2e_rend_circ(origin_circuit_t *circ,
|
|
|
|
const uint8_t *ntor_key_seed,
|
2017-07-06 16:23:30 +03:00
|
|
|
size_t seed_len,
|
2017-05-12 12:00:43 -04:00
|
|
|
int is_service_side);
|
|
|
|
int hs_circuit_setup_e2e_rend_circ_legacy_client(origin_circuit_t *circ,
|
|
|
|
const uint8_t *rend_cell_body);
|
|
|
|
|
|
|
|
#endif /* TOR_HS_CIRCUIT_H */
|
|
|
|
|