diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-08 17:26:46 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-08 17:26:46 +0000 |
commit | 59c5988e74fdaeb193d3daa2dee12b620c7eee75 (patch) | |
tree | 33dbb4f1e357fec076d278fdcf6d7b7f9ae182c8 /src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |
parent | 5b0d869b093391f8979475f00e21cc28e43f107c (diff) | |
download | gnunet-59c5988e74fdaeb193d3daa2dee12b620c7eee75.tar.gz gnunet-59c5988e74fdaeb193d3daa2dee12b620c7eee75.zip |
namestore manages zonekey files with private keys
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 | 11 |
1 files changed, 9 insertions, 2 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 7cdcea42a..4b0ce817f 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -368,12 +368,19 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
368 | delete_existing_db(cfg); | 368 | delete_existing_db(cfg); |
369 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,&endbadly, NULL); | 369 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,&endbadly, NULL); |
370 | 370 | ||
371 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file("hostkey"); | 371 | char *hostkey_file; |
372 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, "4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone"); | ||
373 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | ||
374 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | ||
375 | GNUNET_free (hostkey_file); | ||
372 | GNUNET_assert (privkey != NULL); | 376 | GNUNET_assert (privkey != NULL); |
373 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 377 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); |
374 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); | 378 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); |
375 | 379 | ||
376 | privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file("hostkey2"); | 380 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, "KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zone"); |
381 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | ||
382 | privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | ||
383 | GNUNET_free (hostkey_file); | ||
377 | GNUNET_assert (privkey2 != NULL); | 384 | GNUNET_assert (privkey2 != NULL); |
378 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); | 385 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); |
379 | GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); | 386 | GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); |