tor  master
Macros | Functions
hs_client.c File Reference

Implement next generation hidden service client functionality. More...

#include "or.h"
#include "circpathbias.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "config.h"
#include "connection.h"
#include "connection_edge.h"
#include "container.h"
#include "crypto_rand.h"
#include "crypto_util.h"
#include "directory.h"
#include "hs_cache.h"
#include "hs_cell.h"
#include "hs_circuit.h"
#include "hs_client.h"
#include "hs_control.h"
#include "hs_descriptor.h"
#include "hs_ident.h"
#include "hs_ntor.h"
#include "networkstatus.h"
#include "nodelist.h"
#include "reasons.h"
#include "rendclient.h"
#include "router.h"
#include "routerset.h"
Include dependency graph for hs_client.c:

Functions

STATIC routerstatus_tpick_hsdir_v3 (const ed25519_public_key_t *onion_identity_pk)
 
 MOCK_IMPL (STATIC hs_client_fetch_status_t, fetch_v3_desc,(const ed25519_public_key_t *onion_identity_pk))
 
STATIC extend_info_tdesc_intro_point_to_extend_info (const hs_desc_intro_point_t *ip)
 
STATIC extend_info_tclient_get_random_intro (const ed25519_public_key_t *service_pk)
 
STATIC int handle_rendezvous2 (origin_circuit_t *circ, const uint8_t *payload, size_t payload_len)
 
void hs_client_note_connection_attempt_succeeded (const edge_connection_t *conn)
 
int hs_client_decode_descriptor (const char *desc_str, const ed25519_public_key_t *service_identity_pk, hs_descriptor_t **desc)
 
int hs_client_any_intro_points_usable (const ed25519_public_key_t *service_pk, const hs_descriptor_t *desc)
 
int hs_client_refetch_hsdesc (const ed25519_public_key_t *identity_pk)
 
int hs_client_send_introduce1 (origin_circuit_t *intro_circ, origin_circuit_t *rend_circ)
 
void hs_client_circuit_has_opened (origin_circuit_t *circ)
 
int hs_client_receive_rendezvous_acked (origin_circuit_t *circ, const uint8_t *payload, size_t payload_len)
 
void hs_client_desc_has_arrived (const hs_ident_dir_conn_t *ident)
 
extend_info_ths_client_get_random_intro_from_edge (const edge_connection_t *edge_conn)
 
int hs_client_receive_introduce_ack (origin_circuit_t *circ, const uint8_t *payload, size_t payload_len)
 
int hs_client_receive_rendezvous2 (origin_circuit_t *circ, const uint8_t *payload, size_t payload_len)
 
int hs_client_reextend_intro_circuit (origin_circuit_t *circ)
 
void hs_client_free_all (void)
 
void hs_client_purge_state (void)
 
void hs_client_dir_info_changed (void)
 

Detailed Description

Implement next generation hidden service client functionality.

Function Documentation

◆ hs_client_note_connection_attempt_succeeded()

void hs_client_note_connection_attempt_succeeded ( const edge_connection_t conn)

A circuit just finished connecting to a hidden service that the stream conn has been waiting for. Let the HS subsystem know about this.

Here is the call graph for this function:

◆ hs_client_refetch_hsdesc()

int hs_client_refetch_hsdesc ( const ed25519_public_key_t identity_pk)

Launch a connection to a hidden service directory to fetch a hidden service descriptor using identity_pk to get the necessary keys.

A hs_client_fetch_status_t code is returned.

◆ MOCK_IMPL()

MOCK_IMPL ( STATIC  hs_client_fetch_status_t,
fetch_v3_desc  ,
(const ed25519_public_key_t *onion_identity_pk)   
)

Fetch a v3 descriptor using the given onion_identity_pk.

On success, HS_CLIENT_FETCH_LAUNCHED is returned. Otherwise, an error from hs_client_fetch_status_t is returned.

Here is the call graph for this function:

◆ pick_hsdir_v3()

STATIC routerstatus_t* pick_hsdir_v3 ( const ed25519_public_key_t onion_identity_pk)

Return the HSDir we should use to fetch the descriptor of the hidden service with identity key onion_identity_pk.

Here is the call graph for this function:
Here is the caller graph for this function: