]> git.ipfire.org Git - thirdparty/tor.git/commit
Refactor HS descriptor fetch to support descriptor ID
authorDavid Goulet <dgoulet@ev0ke.net>
Tue, 10 Mar 2015 20:46:56 +0000 (16:46 -0400)
committerDavid Goulet <dgoulet@ev0ke.net>
Tue, 21 Apr 2015 18:22:48 +0000 (14:22 -0400)
commit59f8dced114f20a147a5425ece67d7d44a81867b
tree289e71b7f72cd779a9a98d3c0b1df9e2b06c64b6
parent7db58445fd00d5bbad72fd80497d20b7bc9a0297
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>
src/or/control.c
src/or/or.h
src/or/rendclient.c
src/or/rendclient.h
src/or/rendcommon.c