aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_iteration_stop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index bdcdd1706..71b36ba09 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -34,9 +34,9 @@
34 34
35static struct GNUNET_NAMESTORE_Handle *nsh; 35static struct GNUNET_NAMESTORE_Handle *nsh;
36 36
37static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; 37static struct GNUNET_IDENTITY_PrivateKey privkey;
38 38
39static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; 39static struct GNUNET_IDENTITY_PrivateKey privkey2;
40 40
41static struct GNUNET_NAMESTORE_ZoneIterator *zi; 41static struct GNUNET_NAMESTORE_ZoneIterator *zi;
42 42
@@ -112,7 +112,7 @@ fail_cb (void *cls)
112 112
113static void 113static void
114zone_proc (void *cls, 114zone_proc (void *cls,
115 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 115 const struct GNUNET_IDENTITY_PrivateKey *zone,
116 const char *label, 116 const char *label,
117 unsigned int rd_count, 117 unsigned int rd_count,
118 const struct GNUNET_GNSRECORD_Data *rd) 118 const struct GNUNET_GNSRECORD_Data *rd)
@@ -318,7 +318,7 @@ create_record (unsigned int count)
318 */ 318 */
319static void 319static void
320empty_zone_proc (void *cls, 320empty_zone_proc (void *cls,
321 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 321 const struct GNUNET_IDENTITY_PrivateKey *zone,
322 const char *label, 322 const char *label,
323 unsigned int rd_count, 323 unsigned int rd_count,
324 const struct GNUNET_GNSRECORD_Data *rd) 324 const struct GNUNET_GNSRECORD_Data *rd)
@@ -347,34 +347,13 @@ empty_zone_proc (void *cls,
347static void 347static void
348empty_zone_proc_end (void *cls) 348empty_zone_proc_end (void *cls)
349{ 349{
350 char *hostkey_file;
351
352 GNUNET_assert (nsh == cls); 350 GNUNET_assert (nsh == cls);
353 zi = NULL; 351 zi = NULL;
354 GNUNET_asprintf (&hostkey_file, 352 privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
355 "zonefiles%s%s", 353 privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
356 DIR_SEPARATOR_STR, 354 GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
357 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 355 GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key);
358 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 356
359 "Using zonekey file `%s' \n",
360 hostkey_file);
361 GNUNET_assert (GNUNET_SYSERR
362 != GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file,
363 GNUNET_YES,
364 &privkey));
365 GNUNET_free (hostkey_file);
366 GNUNET_asprintf (&hostkey_file,
367 "zonefiles%s%s",
368 DIR_SEPARATOR_STR,
369 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
370 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
371 "Using zonekey file `%s'\n",
372 hostkey_file);
373 GNUNET_assert (GNUNET_SYSERR !=
374 GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file,
375 GNUNET_YES,
376 &privkey2));
377 GNUNET_free (hostkey_file);
378 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 357 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
379 "Created record 1\n"); 358 "Created record 1\n");
380 359