diff options
Diffstat (limited to 'src/gns/test_gns_simple_shorten.c')
-rw-r--r-- | src/gns/test_gns_simple_shorten.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c index 8cab0dbb2..1b383a0bd 100644 --- a/src/gns/test_gns_simple_shorten.c +++ b/src/gns/test_gns_simple_shorten.c | |||
@@ -135,7 +135,7 @@ process_shorten_result(void* cls, const char* sname) | |||
135 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shorten test succeeded!\n"); | 135 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shorten test succeeded!\n"); |
136 | ok = 0; | 136 | ok = 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 139 | GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
140 | } | 140 | } |
141 | 141 | ||
@@ -205,7 +205,7 @@ void do_check (void *cls, | |||
205 | end_badly_now (); | 205 | end_badly_now (); |
206 | return; | 206 | return; |
207 | } | 207 | } |
208 | 208 | ||
209 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", | 209 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", |
210 | "SHORTEN_ZONEKEY", | 210 | "SHORTEN_ZONEKEY", |
211 | &shorten_keyfile)) | 211 | &shorten_keyfile)) |
@@ -215,7 +215,7 @@ void do_check (void *cls, | |||
215 | end_badly_now (); | 215 | end_badly_now (); |
216 | return; | 216 | return; |
217 | } | 217 | } |
218 | 218 | ||
219 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", | 219 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", |
220 | "PRIVATE_ZONEKEY", | 220 | "PRIVATE_ZONEKEY", |
221 | &private_keyfile)) | 221 | &private_keyfile)) |
@@ -236,7 +236,7 @@ void do_check (void *cls, | |||
236 | 236 | ||
237 | GNUNET_free(shorten_keyfile); | 237 | GNUNET_free(shorten_keyfile); |
238 | GNUNET_free(private_keyfile); | 238 | GNUNET_free(private_keyfile); |
239 | 239 | ||
240 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (our_key, &our_pkey); | 240 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (our_key, &our_pkey); |
241 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); | 241 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); |
242 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); | 242 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); |
@@ -251,14 +251,14 @@ void do_check (void *cls, | |||
251 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 251 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
252 | rd.expiration_time = UINT64_MAX; | 252 | rd.expiration_time = UINT64_MAX; |
253 | GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); | 253 | GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); |
254 | 254 | ||
255 | GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); | 255 | GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); |
256 | 256 | ||
257 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 257 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
258 | rd.data = &bob_hash; | 258 | rd.data = &bob_hash; |
259 | rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; | 259 | rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; |
260 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 260 | rd.flags = GNUNET_NAMESTORE_RF_NONE; |
261 | 261 | ||
262 | /* put bob into our zone */ | 262 | /* put bob into our zone */ |
263 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 263 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
264 | our_key, | 264 | our_key, |
@@ -267,7 +267,7 @@ void do_check (void *cls, | |||
267 | &rd, | 267 | &rd, |
268 | NULL, | 268 | NULL, |
269 | NULL); | 269 | NULL); |
270 | 270 | ||
271 | /* put alice into bobs zone */ | 271 | /* put alice into bobs zone */ |
272 | GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash); | 272 | GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash); |
273 | rd.data = &alice_hash; | 273 | rd.data = &alice_hash; |
@@ -305,7 +305,7 @@ void do_check (void *cls, | |||
305 | sig, | 305 | sig, |
306 | NULL, | 306 | NULL, |
307 | NULL); | 307 | NULL); |
308 | 308 | ||
309 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 309 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
310 | rd.data = &alice_hash; | 310 | rd.data = &alice_hash; |
311 | rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; | 311 | rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; |
@@ -336,7 +336,7 @@ main (int argc, char *argv[]) | |||
336 | "WARNING", | 336 | "WARNING", |
337 | NULL); | 337 | NULL); |
338 | GNUNET_TESTING_peer_run ("test-gns-simple-shorten", | 338 | GNUNET_TESTING_peer_run ("test-gns-simple-shorten", |
339 | "test_gns_simple_lookup.conf", | 339 | "test_gns_simple_lookup.conf", |
340 | &do_check, NULL); | 340 | &do_check, NULL); |
341 | return ok; | 341 | return ok; |
342 | } | 342 | } |