diff options
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_stop.c | 39 |
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 | ||
35 | static struct GNUNET_NAMESTORE_Handle *nsh; | 35 | static struct GNUNET_NAMESTORE_Handle *nsh; |
36 | 36 | ||
37 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 37 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
38 | 38 | ||
39 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 39 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
40 | 40 | ||
41 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 41 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
42 | 42 | ||
@@ -112,7 +112,7 @@ fail_cb (void *cls) | |||
112 | 112 | ||
113 | static void | 113 | static void |
114 | zone_proc (void *cls, | 114 | zone_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 | */ |
319 | static void | 319 | static void |
320 | empty_zone_proc (void *cls, | 320 | empty_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, | |||
347 | static void | 347 | static void |
348 | empty_zone_proc_end (void *cls) | 348 | empty_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 | ||