diff options
author | David Goulet <dgoulet@ev0ke.net> | 2015-03-10 16:46:56 -0400 |
---|---|---|
committer | David Goulet <dgoulet@ev0ke.net> | 2015-04-21 14:22:48 -0400 |
commit | 59f8dced114f20a147a5425ece67d7d44a81867b (patch) | |
tree | 289e71b7f72cd779a9a98d3c0b1df9e2b06c64b6 /src/or/rendclient.h | |
parent | 7db58445fd00d5bbad72fd80497d20b7bc9a0297 (diff) | |
download | tor-59f8dced114f20a147a5425ece67d7d44a81867b.tar.gz tor-59f8dced114f20a147a5425ece67d7d44a81867b.zip |
Refactor HS descriptor fetch to support descriptor ID
Big refactor of the HS client descriptor fetch functionnality. This allows
to fetch an HS descriptor using only a descriptor ID. Furthermore, it's also
possible to provide a list of HSDir(s) now that are used instead of the
automatically choosen one.
The approach taken was to add a descriptor_id field to the rend_data_t
structure so it can be used, if available, by the HS client. The onion
address field however has priority over it that is if both are set, the
onion address is used to fetch the descriptor.
A new public function is introduced called rend_client_fetch_v2_desc(...)
that does NOT lookup the client cache before fetching and can take a list of
HSDirs as a parameter.
The HSFETCH control command now uses this new function thus making it work
and final.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/rendclient.h')
-rw-r--r-- | src/or/rendclient.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/rendclient.h b/src/or/rendclient.h index 098c61d0a1..d6fea678d0 100644 --- a/src/or/rendclient.h +++ b/src/or/rendclient.h @@ -20,6 +20,8 @@ int rend_client_introduction_acked(origin_circuit_t *circ, const uint8_t *request, size_t request_len); void rend_client_refetch_v2_renddesc(const rend_data_t *rend_query); +int rend_client_fetch_v2_desc(const rend_data_t *query, + smartlist_t *hsdirs); void rend_client_cancel_descriptor_fetches(void); void rend_client_purge_last_hid_serv_requests(void); |