aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/plugin_namestore_flat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/plugin_namestore_flat.c')
-rw-r--r--src/namestore/plugin_namestore_flat.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/namestore/plugin_namestore_flat.c b/src/namestore/plugin_namestore_flat.c
index 3249d524a..8b574d2cf 100644
--- a/src/namestore/plugin_namestore_flat.c
+++ b/src/namestore/plugin_namestore_flat.c
@@ -54,7 +54,7 @@ struct FlatFileEntry
54 /** 54 /**
55 * Entry zone 55 * Entry zone
56 */ 56 */
57 struct GNUNET_IDENTITY_PrivateKey private_key; 57 struct GNUNET_CRYPTO_PrivateKey private_key;
58 58
59 /** 59 /**
60 * Record count. 60 * Record count.
@@ -86,7 +86,7 @@ struct FlatFileEntry
86 * @param[out] h initialized hash 86 * @param[out] h initialized hash
87 */ 87 */
88static void 88static void
89hash_pkey_and_label (const struct GNUNET_IDENTITY_PrivateKey *pkey, 89hash_pkey_and_label (const struct GNUNET_CRYPTO_PrivateKey *pkey,
90 const char *label, 90 const char *label,
91 struct GNUNET_HashCode *h) 91 struct GNUNET_HashCode *h)
92{ 92{
@@ -95,14 +95,14 @@ hash_pkey_and_label (const struct GNUNET_IDENTITY_PrivateKey *pkey,
95 size_t key_len; 95 size_t key_len;
96 96
97 label_len = strlen (label); 97 label_len = strlen (label);
98 key_len = label_len + sizeof(struct GNUNET_IDENTITY_PrivateKey); 98 key_len = label_len + sizeof(struct GNUNET_CRYPTO_PrivateKey);
99 key = GNUNET_malloc (key_len); 99 key = GNUNET_malloc (key_len);
100 GNUNET_memcpy (key, 100 GNUNET_memcpy (key,
101 label, 101 label,
102 label_len); 102 label_len);
103 GNUNET_memcpy (key + label_len, 103 GNUNET_memcpy (key + label_len,
104 pkey, 104 pkey,
105 sizeof(struct GNUNET_IDENTITY_PrivateKey)); 105 sizeof(struct GNUNET_CRYPTO_PrivateKey));
106 GNUNET_CRYPTO_hash (key, 106 GNUNET_CRYPTO_hash (key,
107 key_len, 107 key_len,
108 h); 108 h);
@@ -296,7 +296,7 @@ database_setup (struct Plugin *plugin)
296 GNUNET_free (record_data); 296 GNUNET_free (record_data);
297 297
298 { 298 {
299 struct GNUNET_IDENTITY_PrivateKey *private_key; 299 struct GNUNET_CRYPTO_PrivateKey *private_key;
300 300
301 GNUNET_STRINGS_base64_decode (zone_private_key, 301 GNUNET_STRINGS_base64_decode (zone_private_key,
302 strlen (zone_private_key), 302 strlen (zone_private_key),
@@ -345,7 +345,7 @@ store_and_free_entries (void *cls,
345 345
346 (void) key; 346 (void) key;
347 GNUNET_STRINGS_base64_encode (&entry->private_key, 347 GNUNET_STRINGS_base64_encode (&entry->private_key,
348 sizeof(struct GNUNET_IDENTITY_PrivateKey), 348 sizeof(struct GNUNET_CRYPTO_PrivateKey),
349 &zone_private_key); 349 &zone_private_key);
350 data_size = GNUNET_GNSRECORD_records_get_size (entry->record_count, 350 data_size = GNUNET_GNSRECORD_records_get_size (entry->record_count,
351 entry->record_data); 351 entry->record_data);
@@ -452,7 +452,7 @@ database_shutdown (struct Plugin *plugin)
452static int 452static int
453namestore_flat_store_records (void *cls, 453namestore_flat_store_records (void *cls,
454 const struct 454 const struct
455 GNUNET_IDENTITY_PrivateKey *zone_key, 455 GNUNET_CRYPTO_PrivateKey *zone_key,
456 const char *label, 456 const char *label,
457 unsigned int rd_count, 457 unsigned int rd_count,
458 const struct GNUNET_GNSRECORD_Data *rd) 458 const struct GNUNET_GNSRECORD_Data *rd)
@@ -482,7 +482,7 @@ namestore_flat_store_records (void *cls,
482 strlen (label)); 482 strlen (label));
483 GNUNET_memcpy (&entry->private_key, 483 GNUNET_memcpy (&entry->private_key,
484 zone_key, 484 zone_key,
485 sizeof(struct GNUNET_IDENTITY_PrivateKey)); 485 sizeof(struct GNUNET_CRYPTO_PrivateKey));
486 entry->rvalue = rvalue; 486 entry->rvalue = rvalue;
487 entry->record_count = rd_count; 487 entry->record_count = rd_count;
488 entry->record_data = GNUNET_new_array (rd_count, 488 entry->record_data = GNUNET_new_array (rd_count,
@@ -517,7 +517,7 @@ namestore_flat_store_records (void *cls,
517 */ 517 */
518static int 518static int
519namestore_flat_lookup_records (void *cls, 519namestore_flat_lookup_records (void *cls,
520 const struct GNUNET_IDENTITY_PrivateKey *zone, 520 const struct GNUNET_CRYPTO_PrivateKey *zone,
521 const char *label, 521 const char *label,
522 GNUNET_NAMESTORE_RecordIterator iter, 522 GNUNET_NAMESTORE_RecordIterator iter,
523 void *iter_cls) 523 void *iter_cls)
@@ -574,7 +574,7 @@ struct IterateContext
574 /** 574 /**
575 * Target zone. 575 * Target zone.
576 */ 576 */
577 const struct GNUNET_IDENTITY_PrivateKey *zone; 577 const struct GNUNET_CRYPTO_PrivateKey *zone;
578 578
579 /** 579 /**
580 * Function to call on each record. 580 * Function to call on each record.
@@ -647,7 +647,7 @@ iterate_zones (void *cls,
647static int 647static int
648namestore_flat_iterate_records (void *cls, 648namestore_flat_iterate_records (void *cls,
649 const struct 649 const struct
650 GNUNET_IDENTITY_PrivateKey *zone, 650 GNUNET_CRYPTO_PrivateKey *zone,
651 uint64_t serial, 651 uint64_t serial,
652 uint64_t limit, 652 uint64_t limit,
653 GNUNET_NAMESTORE_RecordIterator iter, 653 GNUNET_NAMESTORE_RecordIterator iter,
@@ -674,8 +674,8 @@ namestore_flat_iterate_records (void *cls,
674 */ 674 */
675struct ZoneToNameContext 675struct ZoneToNameContext
676{ 676{
677 const struct GNUNET_IDENTITY_PrivateKey *zone; 677 const struct GNUNET_CRYPTO_PrivateKey *zone;
678 const struct GNUNET_IDENTITY_PublicKey *value_zone; 678 const struct GNUNET_CRYPTO_PublicKey *value_zone;
679 GNUNET_NAMESTORE_RecordIterator iter; 679 GNUNET_NAMESTORE_RecordIterator iter;
680 void *iter_cls; 680 void *iter_cls;
681 681
@@ -733,9 +733,9 @@ zone_to_name (void *cls,
733 */ 733 */
734static int 734static int
735namestore_flat_zone_to_name (void *cls, 735namestore_flat_zone_to_name (void *cls,
736 const struct GNUNET_IDENTITY_PrivateKey *zone, 736 const struct GNUNET_CRYPTO_PrivateKey *zone,
737 const struct 737 const struct
738 GNUNET_IDENTITY_PublicKey *value_zone, 738 GNUNET_CRYPTO_PublicKey *value_zone,
739 GNUNET_NAMESTORE_RecordIterator iter, 739 GNUNET_NAMESTORE_RecordIterator iter,
740 void *iter_cls) 740 void *iter_cls)
741{ 741{