test_hs_cache.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. /* Copyright (c) 2016-2018, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file test_hs_cache.c
  5. * \brief Test hidden service caches.
  6. */
  7. #define CONNECTION_PRIVATE
  8. #define DIRECTORY_PRIVATE
  9. #define HS_CACHE_PRIVATE
  10. #include "trunnel/ed25519_cert.h"
  11. #include "feature/hs/hs_cache.h"
  12. #include "feature/rend/rendcache.h"
  13. #include "feature/dircache/directory.h"
  14. #include "feature/nodelist/networkstatus.h"
  15. #include "core/mainloop/connection.h"
  16. #include "core/proto/proto_http.h"
  17. #include "lib/crypt_ops/crypto_format.h"
  18. #include "feature/dircommon/dir_connection_st.h"
  19. #include "feature/nodelist/networkstatus_st.h"
  20. #include "test/hs_test_helpers.h"
  21. #include "test/test_helpers.h"
  22. #include "test/test.h"
  23. /* Static variable used to encoded the HSDir query. */
  24. static char query_b64[256];
  25. /* Build an HSDir query using a ed25519 public key. */
  26. static const char *
  27. helper_get_hsdir_query(const hs_descriptor_t *desc)
  28. {
  29. ed25519_public_to_base64(query_b64, &desc->plaintext_data.blinded_pubkey);
  30. return query_b64;
  31. }
  32. static void
  33. init_test(void)
  34. {
  35. /* Always needed. Initialize the subsystem. */
  36. hs_cache_init();
  37. /* We need the v2 cache since our OOM and cache cleanup does poke at it. */
  38. rend_cache_init();
  39. }
  40. static void
  41. test_directory(void *arg)
  42. {
  43. int ret;
  44. size_t oom_size;
  45. char *desc1_str = NULL;
  46. const char *desc_out;
  47. ed25519_keypair_t signing_kp1;
  48. hs_descriptor_t *desc1 = NULL;
  49. (void) arg;
  50. init_test();
  51. /* Generate a valid descriptor with normal values. */
  52. ret = ed25519_keypair_generate(&signing_kp1, 0);
  53. tt_int_op(ret, OP_EQ, 0);
  54. desc1 = hs_helper_build_hs_desc_with_ip(&signing_kp1);
  55. tt_assert(desc1);
  56. ret = hs_desc_encode_descriptor(desc1, &signing_kp1, &desc1_str);
  57. tt_int_op(ret, OP_EQ, 0);
  58. /* Very first basic test, should be able to be stored, survive a
  59. * clean, found with a lookup and then cleaned by our OOM. */
  60. {
  61. ret = hs_cache_store_as_dir(desc1_str);
  62. tt_int_op(ret, OP_EQ, 0);
  63. /* Re-add, it should fail since we already have it. */
  64. ret = hs_cache_store_as_dir(desc1_str);
  65. tt_int_op(ret, OP_EQ, -1);
  66. /* Try to clean now which should be fine, there is at worst few seconds
  67. * between the store and this call. */
  68. hs_cache_clean_as_dir(time(NULL));
  69. /* We should find it in our cache. */
  70. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  71. tt_int_op(ret, OP_EQ, 1);
  72. tt_str_op(desc_out, OP_EQ, desc1_str);
  73. /* Tell our OOM to run and to at least remove a byte which will result in
  74. * removing the descriptor from our cache. */
  75. oom_size = hs_cache_handle_oom(time(NULL), 1);
  76. tt_int_op(oom_size, OP_GE, 1);
  77. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  78. tt_int_op(ret, OP_EQ, 0);
  79. }
  80. /* Store two descriptors and remove the expiring one only. */
  81. {
  82. ed25519_keypair_t signing_kp_zero;
  83. ret = ed25519_keypair_generate(&signing_kp_zero, 0);
  84. tt_int_op(ret, OP_EQ, 0);
  85. hs_descriptor_t *desc_zero_lifetime;
  86. desc_zero_lifetime = hs_helper_build_hs_desc_with_ip(&signing_kp_zero);
  87. tt_assert(desc_zero_lifetime);
  88. desc_zero_lifetime->plaintext_data.revision_counter = 1;
  89. desc_zero_lifetime->plaintext_data.lifetime_sec = 0;
  90. char *desc_zero_lifetime_str;
  91. ret = hs_desc_encode_descriptor(desc_zero_lifetime, &signing_kp_zero,
  92. &desc_zero_lifetime_str);
  93. tt_int_op(ret, OP_EQ, 0);
  94. ret = hs_cache_store_as_dir(desc1_str);
  95. tt_int_op(ret, OP_EQ, 0);
  96. ret = hs_cache_store_as_dir(desc_zero_lifetime_str);
  97. tt_int_op(ret, OP_EQ, 0);
  98. /* This one should clear out our zero lifetime desc. */
  99. hs_cache_clean_as_dir(time(NULL));
  100. /* We should find desc1 in our cache. */
  101. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  102. tt_int_op(ret, OP_EQ, 1);
  103. tt_str_op(desc_out, OP_EQ, desc1_str);
  104. /* We should NOT find our zero lifetime desc in our cache. */
  105. ret = hs_cache_lookup_as_dir(3,
  106. helper_get_hsdir_query(desc_zero_lifetime),
  107. NULL);
  108. tt_int_op(ret, OP_EQ, 0);
  109. /* Cleanup our entire cache. */
  110. oom_size = hs_cache_handle_oom(time(NULL), 1);
  111. tt_int_op(oom_size, OP_GE, 1);
  112. hs_descriptor_free(desc_zero_lifetime);
  113. tor_free(desc_zero_lifetime_str);
  114. }
  115. /* Throw junk at it. */
  116. {
  117. ret = hs_cache_store_as_dir("blah");
  118. tt_int_op(ret, OP_EQ, -1);
  119. /* Poor attempt at tricking the decoding. */
  120. ret = hs_cache_store_as_dir("hs-descriptor 3\nJUNK");
  121. tt_int_op(ret, OP_EQ, -1);
  122. /* Undecodable base64 query. */
  123. ret = hs_cache_lookup_as_dir(3, "blah", NULL);
  124. tt_int_op(ret, OP_EQ, -1);
  125. /* Decodable base64 query but wrong ed25519 size. */
  126. ret = hs_cache_lookup_as_dir(3, "dW5pY29ybg==", NULL);
  127. tt_int_op(ret, OP_EQ, -1);
  128. }
  129. /* Test descriptor replacement with revision counter. */
  130. {
  131. char *new_desc_str;
  132. /* Add a descriptor. */
  133. ret = hs_cache_store_as_dir(desc1_str);
  134. tt_int_op(ret, OP_EQ, 0);
  135. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  136. tt_int_op(ret, OP_EQ, 1);
  137. /* Bump revision counter. */
  138. desc1->plaintext_data.revision_counter++;
  139. ret = hs_desc_encode_descriptor(desc1, &signing_kp1, &new_desc_str);
  140. tt_int_op(ret, OP_EQ, 0);
  141. ret = hs_cache_store_as_dir(new_desc_str);
  142. tt_int_op(ret, OP_EQ, 0);
  143. /* Look it up, it should have been replaced. */
  144. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  145. tt_int_op(ret, OP_EQ, 1);
  146. tt_str_op(desc_out, OP_EQ, new_desc_str);
  147. tor_free(new_desc_str);
  148. }
  149. done:
  150. hs_descriptor_free(desc1);
  151. tor_free(desc1_str);
  152. }
  153. static void
  154. test_clean_as_dir(void *arg)
  155. {
  156. size_t ret;
  157. char *desc1_str = NULL;
  158. time_t now = time(NULL);
  159. hs_descriptor_t *desc1 = NULL;
  160. ed25519_keypair_t signing_kp1;
  161. (void) arg;
  162. init_test();
  163. /* Generate a valid descriptor with values. */
  164. ret = ed25519_keypair_generate(&signing_kp1, 0);
  165. tt_int_op(ret, OP_EQ, 0);
  166. desc1 = hs_helper_build_hs_desc_with_ip(&signing_kp1);
  167. tt_assert(desc1);
  168. ret = hs_desc_encode_descriptor(desc1, &signing_kp1, &desc1_str);
  169. tt_int_op(ret, OP_EQ, 0);
  170. ret = hs_cache_store_as_dir(desc1_str);
  171. tt_int_op(ret, OP_EQ, 0);
  172. /* With the lifetime being 3 hours, a cleanup shouldn't remove it. */
  173. ret = cache_clean_v3_as_dir(now, 0);
  174. tt_int_op(ret, OP_EQ, 0);
  175. /* Should be present after clean up. */
  176. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  177. tt_int_op(ret, OP_EQ, 1);
  178. /* Set a cutoff 100 seconds in the past. It should not remove the entry
  179. * since the entry is still recent enough. */
  180. ret = cache_clean_v3_as_dir(now, now - 100);
  181. tt_int_op(ret, OP_EQ, 0);
  182. /* Should be present after clean up. */
  183. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  184. tt_int_op(ret, OP_EQ, 1);
  185. /* Set a cutoff of 100 seconds in the future. It should remove the entry
  186. * that we've just added since it's not too old for the cutoff. */
  187. ret = cache_clean_v3_as_dir(now, now + 100);
  188. tt_int_op(ret, OP_GT, 0);
  189. /* Shouldn't be present after clean up. */
  190. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  191. tt_int_op(ret, OP_EQ, 0);
  192. done:
  193. hs_descriptor_free(desc1);
  194. tor_free(desc1_str);
  195. }
  196. /* Test helper: Fetch an HS descriptor from an HSDir (for the hidden service
  197. with <b>blinded_key</b>. Return the received descriptor string. */
  198. static char *
  199. helper_fetch_desc_from_hsdir(const ed25519_public_key_t *blinded_key)
  200. {
  201. int retval;
  202. char *received_desc = NULL;
  203. char *hsdir_query_str = NULL;
  204. /* The dir conn we are going to simulate */
  205. dir_connection_t *conn = NULL;
  206. /* First extract the blinded public key that we are going to use in our
  207. query, and then build the actual query string. */
  208. {
  209. char hsdir_cache_key[ED25519_BASE64_LEN+1];
  210. retval = ed25519_public_to_base64(hsdir_cache_key,
  211. blinded_key);
  212. tt_int_op(retval, OP_EQ, 0);
  213. tor_asprintf(&hsdir_query_str, GET("/tor/hs/3/%s"), hsdir_cache_key);
  214. }
  215. /* Simulate an HTTP GET request to the HSDir */
  216. conn = dir_connection_new(AF_INET);
  217. tor_addr_from_ipv4h(&conn->base_.addr, 0x7f000001);
  218. TO_CONN(conn)->linked = 1;/* Pretend the conn is encrypted :) */
  219. retval = directory_handle_command_get(conn, hsdir_query_str,
  220. NULL, 0);
  221. tt_int_op(retval, OP_EQ, 0);
  222. /* Read the descriptor that the HSDir just served us */
  223. {
  224. char *headers = NULL;
  225. size_t body_used = 0;
  226. fetch_from_buf_http(TO_CONN(conn)->outbuf, &headers, MAX_HEADERS_SIZE,
  227. &received_desc, &body_used, HS_DESC_MAX_LEN, 0);
  228. tor_free(headers);
  229. }
  230. done:
  231. tor_free(hsdir_query_str);
  232. if (conn)
  233. connection_free_minimal(TO_CONN(conn));
  234. return received_desc;
  235. }
  236. /* Publish a descriptor to the HSDir, then fetch it. Check that the received
  237. descriptor matches the published one. */
  238. static void
  239. test_upload_and_download_hs_desc(void *arg)
  240. {
  241. int retval;
  242. hs_descriptor_t *published_desc = NULL;
  243. char *published_desc_str = NULL;
  244. char *received_desc_str = NULL;
  245. (void) arg;
  246. /* Initialize HSDir cache subsystem */
  247. init_test();
  248. /* Test a descriptor not found in the directory cache. */
  249. {
  250. ed25519_public_key_t blinded_key;
  251. memset(&blinded_key.pubkey, 'A', sizeof(blinded_key.pubkey));
  252. received_desc_str = helper_fetch_desc_from_hsdir(&blinded_key);
  253. tt_int_op(strlen(received_desc_str), OP_EQ, 0);
  254. tor_free(received_desc_str);
  255. }
  256. /* Generate a valid descriptor with normal values. */
  257. {
  258. ed25519_keypair_t signing_kp;
  259. retval = ed25519_keypair_generate(&signing_kp, 0);
  260. tt_int_op(retval, OP_EQ, 0);
  261. published_desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
  262. tt_assert(published_desc);
  263. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  264. &published_desc_str);
  265. tt_int_op(retval, OP_EQ, 0);
  266. }
  267. /* Publish descriptor to the HSDir */
  268. {
  269. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  270. tt_int_op(retval, OP_EQ, 200);
  271. }
  272. /* Simulate a fetch of the previously published descriptor */
  273. {
  274. const ed25519_public_key_t *blinded_key;
  275. blinded_key = &published_desc->plaintext_data.blinded_pubkey;
  276. received_desc_str = helper_fetch_desc_from_hsdir(blinded_key);
  277. }
  278. /* Verify we received the exact same descriptor we published earlier */
  279. tt_str_op(received_desc_str, OP_EQ, published_desc_str);
  280. tor_free(received_desc_str);
  281. /* With a valid descriptor in the directory cache, try again an invalid. */
  282. {
  283. ed25519_public_key_t blinded_key;
  284. memset(&blinded_key.pubkey, 'A', sizeof(blinded_key.pubkey));
  285. received_desc_str = helper_fetch_desc_from_hsdir(&blinded_key);
  286. tt_int_op(strlen(received_desc_str), OP_EQ, 0);
  287. }
  288. done:
  289. tor_free(received_desc_str);
  290. tor_free(published_desc_str);
  291. hs_descriptor_free(published_desc);
  292. }
  293. /* Test that HSDirs reject outdated descriptors based on their revision
  294. * counter. Also test that HSDirs correctly replace old descriptors with newer
  295. * descriptors. */
  296. static void
  297. test_hsdir_revision_counter_check(void *arg)
  298. {
  299. int retval;
  300. ed25519_keypair_t signing_kp;
  301. hs_descriptor_t *published_desc = NULL;
  302. char *published_desc_str = NULL;
  303. uint8_t subcredential[DIGEST256_LEN];
  304. char *received_desc_str = NULL;
  305. hs_descriptor_t *received_desc = NULL;
  306. (void) arg;
  307. /* Initialize HSDir cache subsystem */
  308. init_test();
  309. /* Generate a valid descriptor with normal values. */
  310. {
  311. retval = ed25519_keypair_generate(&signing_kp, 0);
  312. tt_int_op(retval, OP_EQ, 0);
  313. published_desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
  314. tt_assert(published_desc);
  315. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  316. &published_desc_str);
  317. tt_int_op(retval, OP_EQ, 0);
  318. }
  319. /* Publish descriptor to the HSDir */
  320. {
  321. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  322. tt_int_op(retval, OP_EQ, 200);
  323. }
  324. /* Try publishing again with the same revision counter: Should fail. */
  325. {
  326. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  327. tt_int_op(retval, OP_EQ, 400);
  328. }
  329. /* Fetch the published descriptor and validate the revision counter. */
  330. {
  331. const ed25519_public_key_t *blinded_key;
  332. blinded_key = &published_desc->plaintext_data.blinded_pubkey;
  333. hs_get_subcredential(&signing_kp.pubkey, blinded_key, subcredential);
  334. received_desc_str = helper_fetch_desc_from_hsdir(blinded_key);
  335. retval = hs_desc_decode_descriptor(received_desc_str,
  336. subcredential, &received_desc);
  337. tt_int_op(retval, OP_EQ, 0);
  338. tt_assert(received_desc);
  339. /* Check that the revision counter is correct */
  340. tt_u64_op(received_desc->plaintext_data.revision_counter, OP_EQ, 42);
  341. hs_descriptor_free(received_desc);
  342. received_desc = NULL;
  343. tor_free(received_desc_str);
  344. }
  345. /* Increment the revision counter and try again. Should work. */
  346. {
  347. published_desc->plaintext_data.revision_counter = 1313;
  348. tor_free(published_desc_str);
  349. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  350. &published_desc_str);
  351. tt_int_op(retval, OP_EQ, 0);
  352. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  353. tt_int_op(retval, OP_EQ, 200);
  354. }
  355. /* Again, fetch the published descriptor and perform the revision counter
  356. validation. The revision counter must have changed. */
  357. {
  358. const ed25519_public_key_t *blinded_key;
  359. blinded_key = &published_desc->plaintext_data.blinded_pubkey;
  360. received_desc_str = helper_fetch_desc_from_hsdir(blinded_key);
  361. retval = hs_desc_decode_descriptor(received_desc_str,
  362. subcredential, &received_desc);
  363. tt_int_op(retval, OP_EQ, 0);
  364. tt_assert(received_desc);
  365. /* Check that the revision counter is the latest */
  366. tt_u64_op(received_desc->plaintext_data.revision_counter, OP_EQ, 1313);
  367. }
  368. done:
  369. hs_descriptor_free(published_desc);
  370. hs_descriptor_free(received_desc);
  371. tor_free(received_desc_str);
  372. tor_free(published_desc_str);
  373. }
  374. static networkstatus_t mock_ns;
  375. static networkstatus_t *
  376. mock_networkstatus_get_live_consensus(time_t now)
  377. {
  378. (void) now;
  379. return &mock_ns;
  380. }
  381. /** Test that we can store HS descriptors in the client HS cache. */
  382. static void
  383. test_client_cache(void *arg)
  384. {
  385. int retval;
  386. ed25519_keypair_t signing_kp;
  387. hs_descriptor_t *published_desc = NULL;
  388. char *published_desc_str = NULL;
  389. uint8_t wanted_subcredential[DIGEST256_LEN];
  390. response_handler_args_t *args = NULL;
  391. dir_connection_t *conn = NULL;
  392. (void) arg;
  393. /* Initialize HSDir cache subsystem */
  394. init_test();
  395. MOCK(networkstatus_get_live_consensus,
  396. mock_networkstatus_get_live_consensus);
  397. /* Set consensus time */
  398. parse_rfc1123_time("Sat, 26 Oct 1985 13:00:00 UTC",
  399. &mock_ns.valid_after);
  400. parse_rfc1123_time("Sat, 26 Oct 1985 14:00:00 UTC",
  401. &mock_ns.fresh_until);
  402. parse_rfc1123_time("Sat, 26 Oct 1985 16:00:00 UTC",
  403. &mock_ns.valid_until);
  404. /* Generate a valid descriptor with normal values. */
  405. {
  406. retval = ed25519_keypair_generate(&signing_kp, 0);
  407. tt_int_op(retval, OP_EQ, 0);
  408. published_desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
  409. tt_assert(published_desc);
  410. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  411. &published_desc_str);
  412. tt_int_op(retval, OP_EQ, 0);
  413. memcpy(wanted_subcredential, published_desc->subcredential, DIGEST256_LEN);
  414. tt_assert(!tor_mem_is_zero((char*)wanted_subcredential, DIGEST256_LEN));
  415. }
  416. /* Test handle_response_fetch_hsdesc_v3() */
  417. {
  418. args = tor_malloc_zero(sizeof(response_handler_args_t));
  419. args->status_code = 200;
  420. args->reason = NULL;
  421. args->body = published_desc_str;
  422. args->body_len = strlen(published_desc_str);
  423. conn = tor_malloc_zero(sizeof(dir_connection_t));
  424. conn->hs_ident = tor_malloc_zero(sizeof(hs_ident_dir_conn_t));
  425. ed25519_pubkey_copy(&conn->hs_ident->identity_pk, &signing_kp.pubkey);
  426. }
  427. /* store the descriptor! */
  428. retval = handle_response_fetch_hsdesc_v3(conn, args);
  429. tt_int_op(retval, == , 0);
  430. /* Progress time a bit and attempt to clean cache: our desc should not be
  431. * cleaned since we still in the same TP. */
  432. {
  433. parse_rfc1123_time("Sat, 27 Oct 1985 02:00:00 UTC",
  434. &mock_ns.valid_after);
  435. parse_rfc1123_time("Sat, 27 Oct 1985 03:00:00 UTC",
  436. &mock_ns.fresh_until);
  437. parse_rfc1123_time("Sat, 27 Oct 1985 05:00:00 UTC",
  438. &mock_ns.valid_until);
  439. /* fetch the descriptor and make sure it's there */
  440. const hs_descriptor_t *cached_desc = NULL;
  441. cached_desc = hs_cache_lookup_as_client(&signing_kp.pubkey);
  442. tt_assert(cached_desc);
  443. tt_mem_op(cached_desc->subcredential, OP_EQ, wanted_subcredential,
  444. DIGEST256_LEN);
  445. }
  446. /* Progress time to next TP and check that desc was cleaned */
  447. {
  448. parse_rfc1123_time("Sat, 27 Oct 1985 12:00:00 UTC",
  449. &mock_ns.valid_after);
  450. parse_rfc1123_time("Sat, 27 Oct 1985 13:00:00 UTC",
  451. &mock_ns.fresh_until);
  452. parse_rfc1123_time("Sat, 27 Oct 1985 15:00:00 UTC",
  453. &mock_ns.valid_until);
  454. const hs_descriptor_t *cached_desc = NULL;
  455. cached_desc = hs_cache_lookup_as_client(&signing_kp.pubkey);
  456. tt_assert(!cached_desc);
  457. }
  458. done:
  459. tor_free(args);
  460. hs_descriptor_free(published_desc);
  461. tor_free(published_desc_str);
  462. if (conn) {
  463. tor_free(conn->hs_ident);
  464. tor_free(conn);
  465. }
  466. }
  467. struct testcase_t hs_cache[] = {
  468. /* Encoding tests. */
  469. { "directory", test_directory, TT_FORK,
  470. NULL, NULL },
  471. { "clean_as_dir", test_clean_as_dir, TT_FORK,
  472. NULL, NULL },
  473. { "hsdir_revision_counter_check", test_hsdir_revision_counter_check, TT_FORK,
  474. NULL, NULL },
  475. { "upload_and_download_hs_desc", test_upload_and_download_hs_desc, TT_FORK,
  476. NULL, NULL },
  477. { "client_cache", test_client_cache, TT_FORK,
  478. NULL, NULL },
  479. END_OF_TESTCASES
  480. };