diff options
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_specific_zone.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_specific_zone.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index 019036991..7d98eefb0 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -40,6 +40,10 @@ static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | |||
40 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 40 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; |
41 | static GNUNET_HashCode zone; | 41 | static GNUNET_HashCode zone; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; | ||
44 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; | ||
45 | static GNUNET_HashCode zone2; | ||
46 | |||
43 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 47 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
44 | static int res; | 48 | static int res; |
45 | 49 | ||
@@ -51,6 +55,10 @@ struct GNUNET_CRYPTO_RsaSignature *sig_2; | |||
51 | char * s_name_2; | 55 | char * s_name_2; |
52 | struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 56 | struct GNUNET_NAMESTORE_RecordData *s_rd_2; |
53 | 57 | ||
58 | struct GNUNET_CRYPTO_RsaSignature *sig_3; | ||
59 | char * s_name_3; | ||
60 | struct GNUNET_NAMESTORE_RecordData *s_rd_3; | ||
61 | |||
54 | static void | 62 | static void |
55 | start_arm (const char *cfgname) | 63 | start_arm (const char *cfgname) |
56 | { | 64 | { |
@@ -334,6 +342,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
334 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 342 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); |
335 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); | 343 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); |
336 | 344 | ||
345 | privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file("hostkey2"); | ||
346 | GNUNET_assert (privkey2 != NULL); | ||
347 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); | ||
348 | GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); | ||
349 | |||
350 | |||
337 | start_arm (cfgfile); | 351 | start_arm (cfgfile); |
338 | GNUNET_assert (arm != NULL); | 352 | GNUNET_assert (arm != NULL); |
339 | 353 | ||
@@ -354,6 +368,13 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
354 | 368 | ||
355 | sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); | 369 | sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1); |
356 | GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); | 370 | GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL); |
371 | |||
372 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n"); | ||
373 | /* name in different zone */ | ||
374 | GNUNET_asprintf(&s_name_3, "dummy3"); | ||
375 | s_rd_3 = create_record(1); | ||
376 | sig_3 = GNUNET_NAMESTORE_create_signature(privkey, s_name_3, s_rd_3, 1); | ||
377 | GNUNET_NAMESTORE_record_put (nsh, &pubkey2, s_name_3, GNUNET_TIME_absolute_get_forever(), 1, s_rd_3, sig_3, &put_cont, NULL); | ||
357 | } | 378 | } |
358 | 379 | ||
359 | static int | 380 | static int |