test_hs_cache.c 18 KB

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