diff options
Diffstat (limited to 'src/gns/gnunet-service-gns_shorten.c')
-rw-r--r-- | src/gns/gnunet-service-gns_shorten.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gns/gnunet-service-gns_shorten.c b/src/gns/gnunet-service-gns_shorten.c index 3ec03a5ef..3e612e862 100644 --- a/src/gns/gnunet-service-gns_shorten.c +++ b/src/gns/gnunet-service-gns_shorten.c | |||
@@ -181,7 +181,7 @@ create_pkey_cont (void* cls, | |||
181 | static void | 181 | static void |
182 | process_pseu_lookup_ns (void *cls, | 182 | process_pseu_lookup_ns (void *cls, |
183 | unsigned int rd_count, | 183 | unsigned int rd_count, |
184 | const struct GNUNET_NAMESTORE_RecordData *rd); | 184 | const struct GNUNET_GNSRECORD_Data *rd); |
185 | 185 | ||
186 | 186 | ||
187 | /** | 187 | /** |
@@ -193,7 +193,7 @@ process_pseu_lookup_ns (void *cls, | |||
193 | */ | 193 | */ |
194 | static void | 194 | static void |
195 | process_pseu_block_ns (void *cls, | 195 | process_pseu_block_ns (void *cls, |
196 | const struct GNUNET_NAMESTORE_Block *block) | 196 | const struct GNUNET_GNSRECORD_Block *block) |
197 | { | 197 | { |
198 | struct GetPseuAuthorityHandle *gph = cls; | 198 | struct GetPseuAuthorityHandle *gph = cls; |
199 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 199 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
@@ -207,7 +207,7 @@ process_pseu_block_ns (void *cls, | |||
207 | GNUNET_CRYPTO_ecdsa_key_get_public (&gph->shorten_zone_key, | 207 | GNUNET_CRYPTO_ecdsa_key_get_public (&gph->shorten_zone_key, |
208 | &pub); | 208 | &pub); |
209 | if (GNUNET_OK != | 209 | if (GNUNET_OK != |
210 | GNUNET_NAMESTORE_block_decrypt (block, | 210 | GNUNET_GNSRECORD_block_decrypt (block, |
211 | &pub, | 211 | &pub, |
212 | gph->current_label, | 212 | gph->current_label, |
213 | &process_pseu_lookup_ns, | 213 | &process_pseu_lookup_ns, |
@@ -237,7 +237,7 @@ perform_pseu_lookup (struct GetPseuAuthorityHandle *gph, | |||
237 | &pub); | 237 | &pub); |
238 | GNUNET_free_non_null (gph->current_label); | 238 | GNUNET_free_non_null (gph->current_label); |
239 | gph->current_label = GNUNET_strdup (label); | 239 | gph->current_label = GNUNET_strdup (label); |
240 | GNUNET_NAMESTORE_query_from_public_key (&pub, | 240 | GNUNET_GNSRECORD_query_from_public_key (&pub, |
241 | label, | 241 | label, |
242 | &query); | 242 | &query); |
243 | gph->namestore_task = GNUNET_NAMESTORE_lookup_block (namestore_handle, | 243 | gph->namestore_task = GNUNET_NAMESTORE_lookup_block (namestore_handle, |
@@ -258,10 +258,10 @@ perform_pseu_lookup (struct GetPseuAuthorityHandle *gph, | |||
258 | static void | 258 | static void |
259 | process_pseu_lookup_ns (void *cls, | 259 | process_pseu_lookup_ns (void *cls, |
260 | unsigned int rd_count, | 260 | unsigned int rd_count, |
261 | const struct GNUNET_NAMESTORE_RecordData *rd) | 261 | const struct GNUNET_GNSRECORD_Data *rd) |
262 | { | 262 | { |
263 | struct GetPseuAuthorityHandle *gph = cls; | 263 | struct GetPseuAuthorityHandle *gph = cls; |
264 | struct GNUNET_NAMESTORE_RecordData new_pkey; | 264 | struct GNUNET_GNSRECORD_Data new_pkey; |
265 | 265 | ||
266 | gph->namestore_task = NULL; | 266 | gph->namestore_task = NULL; |
267 | if (rd_count > 0) | 267 | if (rd_count > 0) |
@@ -285,15 +285,15 @@ process_pseu_lookup_ns (void *cls, | |||
285 | /* name is available */ | 285 | /* name is available */ |
286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
287 | "Shortening `%s' to `%s'\n", | 287 | "Shortening `%s' to `%s'\n", |
288 | GNUNET_NAMESTORE_z2s (&gph->target_zone), | 288 | GNUNET_GNSRECORD_z2s (&gph->target_zone), |
289 | gph->current_label); | 289 | gph->current_label); |
290 | new_pkey.expiration_time = UINT64_MAX; | 290 | new_pkey.expiration_time = UINT64_MAX; |
291 | new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); | 291 | new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); |
292 | new_pkey.data = &gph->target_zone; | 292 | new_pkey.data = &gph->target_zone; |
293 | new_pkey.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 293 | new_pkey.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
294 | new_pkey.flags = GNUNET_NAMESTORE_RF_NONE | 294 | new_pkey.flags = GNUNET_GNSRECORD_RF_NONE |
295 | | GNUNET_NAMESTORE_RF_PRIVATE | 295 | | GNUNET_GNSRECORD_RF_PRIVATE |
296 | | GNUNET_NAMESTORE_RF_PENDING; | 296 | | GNUNET_GNSRECORD_RF_PENDING; |
297 | gph->namestore_task | 297 | gph->namestore_task |
298 | = GNUNET_NAMESTORE_records_store (namestore_handle, | 298 | = GNUNET_NAMESTORE_records_store (namestore_handle, |
299 | &gph->shorten_zone_key, | 299 | &gph->shorten_zone_key, |
@@ -358,7 +358,7 @@ handle_auth_discovery_timeout (void *cls, | |||
358 | static void | 358 | static void |
359 | process_auth_records (void *cls, | 359 | process_auth_records (void *cls, |
360 | unsigned int rd_count, | 360 | unsigned int rd_count, |
361 | const struct GNUNET_NAMESTORE_RecordData *rd) | 361 | const struct GNUNET_GNSRECORD_Data *rd) |
362 | { | 362 | { |
363 | struct GetPseuAuthorityHandle *gph = cls; | 363 | struct GetPseuAuthorityHandle *gph = cls; |
364 | unsigned int i; | 364 | unsigned int i; |
@@ -412,7 +412,7 @@ process_auth_discovery_dht_result (void* cls, | |||
412 | const void *data) | 412 | const void *data) |
413 | { | 413 | { |
414 | struct GetPseuAuthorityHandle *gph = cls; | 414 | struct GetPseuAuthorityHandle *gph = cls; |
415 | const struct GNUNET_NAMESTORE_Block *block; | 415 | const struct GNUNET_GNSRECORD_Block *block; |
416 | 416 | ||
417 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 417 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
418 | "Got DHT result for PSEU request\n"); | 418 | "Got DHT result for PSEU request\n"); |
@@ -428,7 +428,7 @@ process_auth_discovery_dht_result (void* cls, | |||
428 | process_pseu_result (gph, NULL); | 428 | process_pseu_result (gph, NULL); |
429 | return; | 429 | return; |
430 | } | 430 | } |
431 | if (size < sizeof (struct GNUNET_NAMESTORE_Block)) | 431 | if (size < sizeof (struct GNUNET_GNSRECORD_Block)) |
432 | { | 432 | { |
433 | /* how did this pass DHT block validation!? */ | 433 | /* how did this pass DHT block validation!? */ |
434 | GNUNET_break (0); | 434 | GNUNET_break (0); |
@@ -447,7 +447,7 @@ process_auth_discovery_dht_result (void* cls, | |||
447 | return; | 447 | return; |
448 | } | 448 | } |
449 | if (GNUNET_OK != | 449 | if (GNUNET_OK != |
450 | GNUNET_NAMESTORE_block_decrypt (block, | 450 | GNUNET_GNSRECORD_block_decrypt (block, |
451 | &gph->target_zone, | 451 | &gph->target_zone, |
452 | GNUNET_GNS_TLD_PLUS, | 452 | GNUNET_GNS_TLD_PLUS, |
453 | &process_auth_records, | 453 | &process_auth_records, |
@@ -476,7 +476,7 @@ process_zone_to_name_discover (void *cls, | |||
476 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 476 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
477 | const char *name, | 477 | const char *name, |
478 | unsigned int rd_len, | 478 | unsigned int rd_len, |
479 | const struct GNUNET_NAMESTORE_RecordData *rd) | 479 | const struct GNUNET_GNSRECORD_Data *rd) |
480 | { | 480 | { |
481 | struct GetPseuAuthorityHandle* gph = cls; | 481 | struct GetPseuAuthorityHandle* gph = cls; |
482 | struct GNUNET_HashCode lookup_key; | 482 | struct GNUNET_HashCode lookup_key; |
@@ -492,7 +492,7 @@ process_zone_to_name_discover (void *cls, | |||
492 | return; | 492 | return; |
493 | } | 493 | } |
494 | /* record does not yet exist, go into DHT to find PSEU record */ | 494 | /* record does not yet exist, go into DHT to find PSEU record */ |
495 | GNUNET_NAMESTORE_query_from_public_key (&gph->target_zone, | 495 | GNUNET_GNSRECORD_query_from_public_key (&gph->target_zone, |
496 | GNUNET_GNS_TLD_PLUS, | 496 | GNUNET_GNS_TLD_PLUS, |
497 | &lookup_key); | 497 | &lookup_key); |
498 | gph->timeout_task = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, | 498 | gph->timeout_task = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, |
@@ -533,7 +533,7 @@ GNS_shorten_start (const char *original_label, | |||
533 | } | 533 | } |
534 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 534 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
535 | "Starting shortening process for `%s' with old label `%s'\n", | 535 | "Starting shortening process for `%s' with old label `%s'\n", |
536 | GNUNET_NAMESTORE_z2s (pub), | 536 | GNUNET_GNSRECORD_z2s (pub), |
537 | original_label); | 537 | original_label); |
538 | gph = GNUNET_new (struct GetPseuAuthorityHandle); | 538 | gph = GNUNET_new (struct GetPseuAuthorityHandle); |
539 | gph->shorten_zone_key = *shorten_zone; | 539 | gph->shorten_zone_key = *shorten_zone; |