diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-14 19:47:32 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-15 12:11:18 +0200 |
commit | 96c802b46be51e5c45f34e2de823f787d26c2929 (patch) | |
tree | 457ccfd8f9a61563af86318739c4a8f964a57025 /src/namestore | |
parent | c14e3a2769ff0f15fdbb32797e37e43ce2344fa3 (diff) | |
download | gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.tar.gz gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.zip |
- towards crypto agility; wip
Diffstat (limited to 'src/namestore')
28 files changed, 229 insertions, 256 deletions
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index 34641d22e..844f4a990 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -164,7 +164,7 @@ struct Request | |||
164 | */ | 164 | */ |
165 | char public_key[128]; | 165 | char public_key[128]; |
166 | 166 | ||
167 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 167 | struct GNUNET_IDENTITY_PublicKey pub; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | /** | 170 | /** |
@@ -211,7 +211,7 @@ static struct GNUNET_NAMESTORE_Handle *ns; | |||
211 | /** | 211 | /** |
212 | * Private key for the fcfsd zone. | 212 | * Private key for the fcfsd zone. |
213 | */ | 213 | */ |
214 | static struct GNUNET_CRYPTO_EcdsaPrivateKey fcfs_zone_pkey; | 214 | static struct GNUNET_IDENTITY_PrivateKey fcfs_zone_pkey; |
215 | 215 | ||
216 | /** | 216 | /** |
217 | * Connection to identity service. | 217 | * Connection to identity service. |
@@ -306,7 +306,6 @@ zone_iteration_end (void *cls) | |||
306 | /* return static form */ | 306 | /* return static form */ |
307 | GNUNET_asprintf (&full_page, | 307 | GNUNET_asprintf (&full_page, |
308 | ZONEINFO_PAGE, | 308 | ZONEINFO_PAGE, |
309 | zr->zoneinfo, | ||
310 | zr->zoneinfo); | 309 | zr->zoneinfo); |
311 | response = MHD_create_response_from_buffer (strlen (full_page), | 310 | response = MHD_create_response_from_buffer (strlen (full_page), |
312 | (void *) full_page, | 311 | (void *) full_page, |
@@ -332,7 +331,7 @@ zone_iteration_end (void *cls) | |||
332 | */ | 331 | */ |
333 | static void | 332 | static void |
334 | iterate_cb (void *cls, | 333 | iterate_cb (void *cls, |
335 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 334 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
336 | const char *name, | 335 | const char *name, |
337 | unsigned int rd_len, | 336 | unsigned int rd_len, |
338 | const struct GNUNET_GNSRECORD_Data *rd) | 337 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -615,7 +614,7 @@ zone_to_name_error (void *cls) | |||
615 | */ | 614 | */ |
616 | static void | 615 | static void |
617 | zone_to_name_cb (void *cls, | 616 | zone_to_name_cb (void *cls, |
618 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 617 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
619 | const char *name, | 618 | const char *name, |
620 | unsigned int rd_count, | 619 | unsigned int rd_count, |
621 | const struct GNUNET_GNSRECORD_Data *rd) | 620 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -677,7 +676,7 @@ lookup_it_error (void *cls) | |||
677 | */ | 676 | */ |
678 | static void | 677 | static void |
679 | lookup_it_processor (void *cls, | 678 | lookup_it_processor (void *cls, |
680 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zonekey, | 679 | const struct GNUNET_IDENTITY_PrivateKey *zonekey, |
681 | const char *label, | 680 | const char *label, |
682 | unsigned int rd_count, | 681 | unsigned int rd_count, |
683 | const struct GNUNET_GNSRECORD_Data *rd) | 682 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -712,9 +711,8 @@ lookup_it_finished (void *cls) | |||
712 | return; | 711 | return; |
713 | } | 712 | } |
714 | if (GNUNET_OK != | 713 | if (GNUNET_OK != |
715 | GNUNET_CRYPTO_ecdsa_public_key_from_string (request->public_key, | 714 | GNUNET_IDENTITY_public_key_from_string (request->public_key, |
716 | strlen (request->public_key), | 715 | &request->pub)) |
717 | &request->pub)) | ||
718 | { | 716 | { |
719 | GNUNET_break (0); | 717 | GNUNET_break (0); |
720 | request->phase = RP_FAIL; | 718 | request->phase = RP_FAIL; |
@@ -767,7 +765,7 @@ create_response (void *cls, | |||
767 | { | 765 | { |
768 | struct MHD_Response *response; | 766 | struct MHD_Response *response; |
769 | struct Request *request; | 767 | struct Request *request; |
770 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 768 | struct GNUNET_IDENTITY_PublicKey pub; |
771 | MHD_RESULT ret; | 769 | MHD_RESULT ret; |
772 | 770 | ||
773 | (void) cls; | 771 | (void) cls; |
@@ -822,10 +820,8 @@ create_response (void *cls, | |||
822 | request->pp = NULL; | 820 | request->pp = NULL; |
823 | } | 821 | } |
824 | if (GNUNET_OK != | 822 | if (GNUNET_OK != |
825 | GNUNET_CRYPTO_ecdsa_public_key_from_string (request->public_key, | 823 | GNUNET_IDENTITY_public_key_from_string (request->public_key, |
826 | strlen ( | 824 | &pub)) |
827 | request->public_key), | ||
828 | &pub)) | ||
829 | { | 825 | { |
830 | /* parse error */ | 826 | /* parse error */ |
831 | return fill_s_reply ("Failed to parse given public key", | 827 | return fill_s_reply ("Failed to parse given public key", |
@@ -1211,7 +1207,8 @@ main (int argc, | |||
1211 | options, | 1207 | options, |
1212 | &run, NULL)) ? 0 : 1; | 1208 | &run, NULL)) ? 0 : 1; |
1213 | GNUNET_free_nz ((void *) argv); | 1209 | GNUNET_free_nz ((void *) argv); |
1214 | GNUNET_CRYPTO_ecdsa_key_clear (&fcfs_zone_pkey); | 1210 | // FIXME |
1211 | // GNUNET_CRYPTO_ecdsa_key_clear (&fcfs_zone_pkey); | ||
1215 | return ret; | 1212 | return ret; |
1216 | } | 1213 | } |
1217 | 1214 | ||
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 07d045b90..345d76910 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -59,7 +59,7 @@ static struct GNUNET_NAMESTORE_Handle *ns; | |||
59 | /** | 59 | /** |
60 | * Private key for the our zone. | 60 | * Private key for the our zone. |
61 | */ | 61 | */ |
62 | static struct GNUNET_CRYPTO_EcdsaPrivateKey zone_pkey; | 62 | static struct GNUNET_IDENTITY_PrivateKey zone_pkey; |
63 | 63 | ||
64 | /** | 64 | /** |
65 | * Handle to identity lookup. | 65 | * Handle to identity lookup. |
@@ -496,7 +496,7 @@ display_record (const char *rname, | |||
496 | */ | 496 | */ |
497 | static void | 497 | static void |
498 | display_record_iterator (void *cls, | 498 | display_record_iterator (void *cls, |
499 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 499 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
500 | const char *rname, | 500 | const char *rname, |
501 | unsigned int rd_len, | 501 | unsigned int rd_len, |
502 | const struct GNUNET_GNSRECORD_Data *rd) | 502 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -519,7 +519,7 @@ display_record_iterator (void *cls, | |||
519 | */ | 519 | */ |
520 | static void | 520 | static void |
521 | display_record_monitor (void *cls, | 521 | display_record_monitor (void *cls, |
522 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 522 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
523 | const char *rname, | 523 | const char *rname, |
524 | unsigned int rd_len, | 524 | unsigned int rd_len, |
525 | const struct GNUNET_GNSRECORD_Data *rd) | 525 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -542,7 +542,7 @@ display_record_monitor (void *cls, | |||
542 | */ | 542 | */ |
543 | static void | 543 | static void |
544 | display_record_lookup (void *cls, | 544 | display_record_lookup (void *cls, |
545 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 545 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
546 | const char *rname, | 546 | const char *rname, |
547 | unsigned int rd_len, | 547 | unsigned int rd_len, |
548 | const struct GNUNET_GNSRECORD_Data *rd) | 548 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -622,7 +622,7 @@ add_error_cb (void *cls) | |||
622 | */ | 622 | */ |
623 | static void | 623 | static void |
624 | get_existing_record (void *cls, | 624 | get_existing_record (void *cls, |
625 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 625 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
626 | const char *rec_name, | 626 | const char *rec_name, |
627 | unsigned int rd_count, | 627 | unsigned int rd_count, |
628 | const struct GNUNET_GNSRECORD_Data *rd) | 628 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -781,7 +781,7 @@ reverse_error_cb (void *cls) | |||
781 | */ | 781 | */ |
782 | static void | 782 | static void |
783 | handle_reverse_lookup (void *cls, | 783 | handle_reverse_lookup (void *cls, |
784 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 784 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
785 | const char *label, | 785 | const char *label, |
786 | unsigned int rd_count, | 786 | unsigned int rd_count, |
787 | const struct GNUNET_GNSRECORD_Data *rd) | 787 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -826,7 +826,7 @@ del_lookup_error_cb (void *cls) | |||
826 | */ | 826 | */ |
827 | static void | 827 | static void |
828 | del_monitor (void *cls, | 828 | del_monitor (void *cls, |
829 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 829 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
830 | const char *label, | 830 | const char *label, |
831 | unsigned int rd_count, | 831 | unsigned int rd_count, |
832 | const struct GNUNET_GNSRECORD_Data *rd) | 832 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1187,12 +1187,11 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1187 | } | 1187 | } |
1188 | if (NULL != reverse_pkey) | 1188 | if (NULL != reverse_pkey) |
1189 | { | 1189 | { |
1190 | struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 1190 | struct GNUNET_IDENTITY_PublicKey pubkey; |
1191 | 1191 | ||
1192 | if (GNUNET_OK != | 1192 | if (GNUNET_OK != |
1193 | GNUNET_CRYPTO_ecdsa_public_key_from_string (reverse_pkey, | 1193 | GNUNET_IDENTITY_public_key_from_string (reverse_pkey, |
1194 | strlen (reverse_pkey), | 1194 | &pubkey)) |
1195 | &pubkey)) | ||
1196 | { | 1195 | { |
1197 | fprintf (stderr, | 1196 | fprintf (stderr, |
1198 | _ ("Invalid public key for reverse lookup `%s'\n"), | 1197 | _ ("Invalid public key for reverse lookup `%s'\n"), |
@@ -1211,12 +1210,12 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1211 | { | 1210 | { |
1212 | char sh[105]; | 1211 | char sh[105]; |
1213 | char sname[64]; | 1212 | char sname[64]; |
1214 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | 1213 | struct GNUNET_IDENTITY_PublicKey pkey; |
1215 | 1214 | ||
1216 | GNUNET_STRINGS_utf8_tolower (uri, uri); | 1215 | GNUNET_STRINGS_utf8_tolower (uri, uri); |
1217 | if ((2 != (sscanf (uri, "gnunet://gns/%52s/%63s", sh, sname))) || | 1216 | if ((2 != (sscanf (uri, "gnunet://gns/%52s/%63s", sh, sname))) || |
1218 | (GNUNET_OK != | 1217 | (GNUNET_OK != |
1219 | GNUNET_CRYPTO_ecdsa_public_key_from_string (sh, strlen (sh), &pkey))) | 1218 | GNUNET_IDENTITY_public_key_from_string (sh, &pkey))) |
1220 | { | 1219 | { |
1221 | fprintf (stderr, _ ("Invalid URI `%s'\n"), uri); | 1220 | fprintf (stderr, _ ("Invalid URI `%s'\n"), uri); |
1222 | GNUNET_SCHEDULER_shutdown (); | 1221 | GNUNET_SCHEDULER_shutdown (); |
@@ -1242,8 +1241,8 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1242 | } | 1241 | } |
1243 | memset (&rd, 0, sizeof(rd)); | 1242 | memset (&rd, 0, sizeof(rd)); |
1244 | rd.data = &pkey; | 1243 | rd.data = &pkey; |
1245 | rd.data_size = sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey); | 1244 | rd.data_size = GNUNET_IDENTITY_key_get_length (&pkey); |
1246 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 1245 | rd.record_type = ntohl (pkey.type); |
1247 | rd.expiration_time = etime; | 1246 | rd.expiration_time = etime; |
1248 | if (GNUNET_YES == etime_is_rel) | 1247 | if (GNUNET_YES == etime_is_rel) |
1249 | rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; | 1248 | rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
@@ -1704,11 +1703,13 @@ main (int argc, char *const *argv) | |||
1704 | NULL))) | 1703 | NULL))) |
1705 | { | 1704 | { |
1706 | GNUNET_free_nz ((void *) argv); | 1705 | GNUNET_free_nz ((void *) argv); |
1707 | GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey); | 1706 | //FIXME |
1707 | //GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey); | ||
1708 | return lret; | 1708 | return lret; |
1709 | } | 1709 | } |
1710 | GNUNET_free_nz ((void *) argv); | 1710 | GNUNET_free_nz ((void *) argv); |
1711 | GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey); | 1711 | //FIXME |
1712 | //GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey); | ||
1712 | return ret; | 1713 | return ret; |
1713 | } | 1714 | } |
1714 | 1715 | ||
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index b24bb2952..d6774b37b 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -82,7 +82,7 @@ struct ZoneIteration | |||
82 | /** | 82 | /** |
83 | * Key of the zone we are iterating over. | 83 | * Key of the zone we are iterating over. |
84 | */ | 84 | */ |
85 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 85 | struct GNUNET_IDENTITY_PrivateKey zone; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * Last sequence number in the zone iteration used to address next | 88 | * Last sequence number in the zone iteration used to address next |
@@ -174,7 +174,7 @@ struct ZoneMonitor | |||
174 | /** | 174 | /** |
175 | * Private key of the zone. | 175 | * Private key of the zone. |
176 | */ | 176 | */ |
177 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 177 | struct GNUNET_IDENTITY_PrivateKey zone; |
178 | 178 | ||
179 | /** | 179 | /** |
180 | * Task active during initial iteration. | 180 | * Task active during initial iteration. |
@@ -314,7 +314,7 @@ struct NickCache | |||
314 | /** | 314 | /** |
315 | * Zone the cache entry is for. | 315 | * Zone the cache entry is for. |
316 | */ | 316 | */ |
317 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 317 | struct GNUNET_IDENTITY_PrivateKey zone; |
318 | 318 | ||
319 | /** | 319 | /** |
320 | * Cached record data. | 320 | * Cached record data. |
@@ -336,7 +336,7 @@ static struct NickCache nick_cache[NC_SIZE]; | |||
336 | /** | 336 | /** |
337 | * Public key of all zeros. | 337 | * Public key of all zeros. |
338 | */ | 338 | */ |
339 | static const struct GNUNET_CRYPTO_EcdsaPrivateKey zero; | 339 | static const struct GNUNET_IDENTITY_PrivateKey zero; |
340 | 340 | ||
341 | /** | 341 | /** |
342 | * Configuration handle. | 342 | * Configuration handle. |
@@ -481,7 +481,7 @@ free_store_activity (struct StoreActivity *sa) | |||
481 | static void | 481 | static void |
482 | lookup_nick_it (void *cls, | 482 | lookup_nick_it (void *cls, |
483 | uint64_t seq, | 483 | uint64_t seq, |
484 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, | 484 | const struct GNUNET_IDENTITY_PrivateKey *private_key, |
485 | const char *label, | 485 | const char *label, |
486 | unsigned int rd_count, | 486 | unsigned int rd_count, |
487 | const struct GNUNET_GNSRECORD_Data *rd) | 487 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -521,7 +521,7 @@ lookup_nick_it (void *cls, | |||
521 | * @param nick nick entry to cache | 521 | * @param nick nick entry to cache |
522 | */ | 522 | */ |
523 | static void | 523 | static void |
524 | cache_nick (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 524 | cache_nick (const struct GNUNET_IDENTITY_PrivateKey *zone, |
525 | const struct GNUNET_GNSRECORD_Data *nick) | 525 | const struct GNUNET_GNSRECORD_Data *nick) |
526 | { | 526 | { |
527 | struct NickCache *oldest; | 527 | struct NickCache *oldest; |
@@ -564,9 +564,9 @@ cache_nick (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | |||
564 | * @return NULL if no NICK record was found | 564 | * @return NULL if no NICK record was found |
565 | */ | 565 | */ |
566 | static struct GNUNET_GNSRECORD_Data * | 566 | static struct GNUNET_GNSRECORD_Data * |
567 | get_nick_record (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone) | 567 | get_nick_record (const struct GNUNET_IDENTITY_PrivateKey *zone) |
568 | { | 568 | { |
569 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 569 | struct GNUNET_IDENTITY_PublicKey pub; |
570 | struct GNUNET_GNSRECORD_Data *nick; | 570 | struct GNUNET_GNSRECORD_Data *nick; |
571 | int res; | 571 | int res; |
572 | 572 | ||
@@ -606,7 +606,7 @@ get_nick_record (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone) | |||
606 | __LINE__); | 606 | __LINE__); |
607 | if (1 == do_log) | 607 | if (1 == do_log) |
608 | { | 608 | { |
609 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &pub); | 609 | GNUNET_IDENTITY_key_get_public (zone, &pub); |
610 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | 610 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, |
611 | "No nick name set for zone `%s'\n", | 611 | "No nick name set for zone `%s'\n", |
612 | GNUNET_GNSRECORD_z2s (&pub)); | 612 | GNUNET_GNSRECORD_z2s (&pub)); |
@@ -720,7 +720,7 @@ merge_with_nick_records (const struct GNUNET_GNSRECORD_Data *nick_rd, | |||
720 | static void | 720 | static void |
721 | send_lookup_response (struct NamestoreClient *nc, | 721 | send_lookup_response (struct NamestoreClient *nc, |
722 | uint32_t request_id, | 722 | uint32_t request_id, |
723 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 723 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
724 | const char *name, | 724 | const char *name, |
725 | unsigned int rd_count, | 725 | unsigned int rd_count, |
726 | const struct GNUNET_GNSRECORD_Data *rd) | 726 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -899,14 +899,14 @@ static void | |||
899 | refresh_block (struct NamestoreClient *nc, | 899 | refresh_block (struct NamestoreClient *nc, |
900 | struct ZoneIteration *zi, | 900 | struct ZoneIteration *zi, |
901 | uint32_t rid, | 901 | uint32_t rid, |
902 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 902 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
903 | const char *name, | 903 | const char *name, |
904 | unsigned int rd_count, | 904 | unsigned int rd_count, |
905 | const struct GNUNET_GNSRECORD_Data *rd) | 905 | const struct GNUNET_GNSRECORD_Data *rd) |
906 | { | 906 | { |
907 | struct GNUNET_GNSRECORD_Block *block; | 907 | struct GNUNET_GNSRECORD_Block *block; |
908 | struct CacheOperation *cop; | 908 | struct CacheOperation *cop; |
909 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | 909 | struct GNUNET_IDENTITY_PublicKey pkey; |
910 | struct GNUNET_GNSRECORD_Data *nick; | 910 | struct GNUNET_GNSRECORD_Data *nick; |
911 | struct GNUNET_GNSRECORD_Data *res; | 911 | struct GNUNET_GNSRECORD_Data *res; |
912 | unsigned int res_count; | 912 | unsigned int res_count; |
@@ -946,7 +946,7 @@ refresh_block (struct NamestoreClient *nc, | |||
946 | block = | 946 | block = |
947 | GNUNET_GNSRECORD_block_create (zone_key, exp_time, name, res, res_count); | 947 | GNUNET_GNSRECORD_block_create (zone_key, exp_time, name, res, res_count); |
948 | GNUNET_assert (NULL != block); | 948 | GNUNET_assert (NULL != block); |
949 | GNUNET_CRYPTO_ecdsa_key_get_public (zone_key, &pkey); | 949 | GNUNET_IDENTITY_key_get_public (zone_key, &pkey); |
950 | GNUNET_log ( | 950 | GNUNET_log ( |
951 | GNUNET_ERROR_TYPE_DEBUG, | 951 | GNUNET_ERROR_TYPE_DEBUG, |
952 | "Caching block for label `%s' with %u records and expiration %s in zone `%s' in namecache\n", | 952 | "Caching block for label `%s' with %u records and expiration %s in zone `%s' in namecache\n", |
@@ -1214,7 +1214,7 @@ struct RecordLookupContext | |||
1214 | static void | 1214 | static void |
1215 | lookup_it (void *cls, | 1215 | lookup_it (void *cls, |
1216 | uint64_t seq, | 1216 | uint64_t seq, |
1217 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, | 1217 | const struct GNUNET_IDENTITY_PrivateKey *private_key, |
1218 | const char *label, | 1218 | const char *label, |
1219 | unsigned int rd_count, | 1219 | unsigned int rd_count, |
1220 | const struct GNUNET_GNSRECORD_Data *rd) | 1220 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1605,7 +1605,7 @@ struct ZoneToNameCtx | |||
1605 | static void | 1605 | static void |
1606 | handle_zone_to_name_it (void *cls, | 1606 | handle_zone_to_name_it (void *cls, |
1607 | uint64_t seq, | 1607 | uint64_t seq, |
1608 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 1608 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
1609 | const char *name, | 1609 | const char *name, |
1610 | unsigned int rd_count, | 1610 | unsigned int rd_count, |
1611 | const struct GNUNET_GNSRECORD_Data *rd) | 1611 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1738,7 +1738,7 @@ struct ZoneIterationProcResult | |||
1738 | static void | 1738 | static void |
1739 | zone_iterate_proc (void *cls, | 1739 | zone_iterate_proc (void *cls, |
1740 | uint64_t seq, | 1740 | uint64_t seq, |
1741 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 1741 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
1742 | const char *name, | 1742 | const char *name, |
1743 | unsigned int rd_count, | 1743 | unsigned int rd_count, |
1744 | const struct GNUNET_GNSRECORD_Data *rd) | 1744 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -2009,7 +2009,7 @@ monitor_iteration_next (void *cls); | |||
2009 | static void | 2009 | static void |
2010 | monitor_iterate_cb (void *cls, | 2010 | monitor_iterate_cb (void *cls, |
2011 | uint64_t seq, | 2011 | uint64_t seq, |
2012 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 2012 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
2013 | const char *name, | 2013 | const char *name, |
2014 | unsigned int rd_count, | 2014 | unsigned int rd_count, |
2015 | const struct GNUNET_GNSRECORD_Data *rd) | 2015 | const struct GNUNET_GNSRECORD_Data *rd) |
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c index 5b4e41475..ce62b52d5 100644 --- a/src/namestore/gnunet-zoneimport.c +++ b/src/namestore/gnunet-zoneimport.c | |||
@@ -96,7 +96,7 @@ struct Zone | |||
96 | /** | 96 | /** |
97 | * Private key of the zone. | 97 | * Private key of the zone. |
98 | */ | 98 | */ |
99 | struct GNUNET_CRYPTO_EcdsaPrivateKey key; | 99 | struct GNUNET_IDENTITY_PrivateKey key; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | 102 | ||
@@ -1405,7 +1405,7 @@ ns_lookup_error_cb (void *cls) | |||
1405 | */ | 1405 | */ |
1406 | static void | 1406 | static void |
1407 | ns_lookup_result_cb (void *cls, | 1407 | ns_lookup_result_cb (void *cls, |
1408 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 1408 | const struct GNUNET_IDENTITY_PrivateKey *key, |
1409 | const char *label, | 1409 | const char *label, |
1410 | unsigned int rd_count, | 1410 | unsigned int rd_count, |
1411 | const struct GNUNET_GNSRECORD_Data *rd) | 1411 | const struct GNUNET_GNSRECORD_Data *rd) |
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h index 6f45ab1c1..fd9a8ed47 100644 --- a/src/namestore/namestore.h +++ b/src/namestore/namestore.h | |||
@@ -90,7 +90,7 @@ struct RecordStoreMessage | |||
90 | /** | 90 | /** |
91 | * The private key of the authority. | 91 | * The private key of the authority. |
92 | */ | 92 | */ |
93 | struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; | 93 | struct GNUNET_IDENTITY_PrivateKey private_key; |
94 | 94 | ||
95 | /* followed by: | 95 | /* followed by: |
96 | * name with length name_len | 96 | * name with length name_len |
@@ -134,7 +134,7 @@ struct LabelLookupMessage | |||
134 | /** | 134 | /** |
135 | * The private key of the zone to look up in | 135 | * The private key of the zone to look up in |
136 | */ | 136 | */ |
137 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 137 | struct GNUNET_IDENTITY_PrivateKey zone; |
138 | 138 | ||
139 | /* followed by: | 139 | /* followed by: |
140 | * name with length name_len | 140 | * name with length name_len |
@@ -176,7 +176,7 @@ struct LabelLookupResponseMessage | |||
176 | /** | 176 | /** |
177 | * The private key of the authority. | 177 | * The private key of the authority. |
178 | */ | 178 | */ |
179 | struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; | 179 | struct GNUNET_IDENTITY_PrivateKey private_key; |
180 | 180 | ||
181 | /* followed by: | 181 | /* followed by: |
182 | * name with length name_len | 182 | * name with length name_len |
@@ -198,12 +198,12 @@ struct ZoneToNameMessage | |||
198 | /** | 198 | /** |
199 | * The private key of the zone to look up in | 199 | * The private key of the zone to look up in |
200 | */ | 200 | */ |
201 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 201 | struct GNUNET_IDENTITY_PrivateKey zone; |
202 | 202 | ||
203 | /** | 203 | /** |
204 | * The public key of the target zone | 204 | * The public key of the target zone |
205 | */ | 205 | */ |
206 | struct GNUNET_CRYPTO_EcdsaPublicKey value_zone; | 206 | struct GNUNET_IDENTITY_PublicKey value_zone; |
207 | }; | 207 | }; |
208 | 208 | ||
209 | 209 | ||
@@ -241,7 +241,7 @@ struct ZoneToNameResponseMessage | |||
241 | /** | 241 | /** |
242 | * The private key of the zone that contained the name. | 242 | * The private key of the zone that contained the name. |
243 | */ | 243 | */ |
244 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 244 | struct GNUNET_IDENTITY_PrivateKey zone; |
245 | 245 | ||
246 | /* followed by: | 246 | /* followed by: |
247 | * name with length name_len | 247 | * name with length name_len |
@@ -283,7 +283,7 @@ struct RecordResultMessage | |||
283 | /** | 283 | /** |
284 | * The private key of the authority. | 284 | * The private key of the authority. |
285 | */ | 285 | */ |
286 | struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; | 286 | struct GNUNET_IDENTITY_PrivateKey private_key; |
287 | 287 | ||
288 | /* followed by: | 288 | /* followed by: |
289 | * name with length name_len | 289 | * name with length name_len |
@@ -311,7 +311,7 @@ struct ZoneMonitorStartMessage | |||
311 | /** | 311 | /** |
312 | * Zone key. | 312 | * Zone key. |
313 | */ | 313 | */ |
314 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 314 | struct GNUNET_IDENTITY_PrivateKey zone; |
315 | }; | 315 | }; |
316 | 316 | ||
317 | 317 | ||
@@ -352,7 +352,7 @@ struct ZoneIterationStartMessage | |||
352 | /** | 352 | /** |
353 | * Zone key. All zeros for "all zones". | 353 | * Zone key. All zeros for "all zones". |
354 | */ | 354 | */ |
355 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 355 | struct GNUNET_IDENTITY_PrivateKey zone; |
356 | }; | 356 | }; |
357 | 357 | ||
358 | 358 | ||
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index f383f8b4a..c845b5019 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -174,7 +174,7 @@ struct GNUNET_NAMESTORE_ZoneIterator | |||
174 | /** | 174 | /** |
175 | * Private key of the zone. | 175 | * Private key of the zone. |
176 | */ | 176 | */ |
177 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 177 | struct GNUNET_IDENTITY_PrivateKey zone; |
178 | 178 | ||
179 | /** | 179 | /** |
180 | * The operation id this zone iteration operation has | 180 | * The operation id this zone iteration operation has |
@@ -493,7 +493,7 @@ handle_lookup_result (void *cls, const struct LabelLookupResponseMessage *msg) | |||
493 | static int | 493 | static int |
494 | check_record_result (void *cls, const struct RecordResultMessage *msg) | 494 | check_record_result (void *cls, const struct RecordResultMessage *msg) |
495 | { | 495 | { |
496 | static struct GNUNET_CRYPTO_EcdsaPrivateKey priv_dummy; | 496 | static struct GNUNET_IDENTITY_PrivateKey priv_dummy; |
497 | const char *name; | 497 | const char *name; |
498 | size_t msg_len; | 498 | size_t msg_len; |
499 | size_t name_len; | 499 | size_t name_len; |
@@ -981,7 +981,7 @@ warn_delay (void *cls) | |||
981 | struct GNUNET_NAMESTORE_QueueEntry * | 981 | struct GNUNET_NAMESTORE_QueueEntry * |
982 | GNUNET_NAMESTORE_records_store ( | 982 | GNUNET_NAMESTORE_records_store ( |
983 | struct GNUNET_NAMESTORE_Handle *h, | 983 | struct GNUNET_NAMESTORE_Handle *h, |
984 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 984 | const struct GNUNET_IDENTITY_PrivateKey *pkey, |
985 | const char *label, | 985 | const char *label, |
986 | unsigned int rd_count, | 986 | unsigned int rd_count, |
987 | const struct GNUNET_GNSRECORD_Data *rd, | 987 | const struct GNUNET_GNSRECORD_Data *rd, |
@@ -1080,7 +1080,7 @@ GNUNET_NAMESTORE_records_store ( | |||
1080 | struct GNUNET_NAMESTORE_QueueEntry * | 1080 | struct GNUNET_NAMESTORE_QueueEntry * |
1081 | GNUNET_NAMESTORE_records_lookup ( | 1081 | GNUNET_NAMESTORE_records_lookup ( |
1082 | struct GNUNET_NAMESTORE_Handle *h, | 1082 | struct GNUNET_NAMESTORE_Handle *h, |
1083 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 1083 | const struct GNUNET_IDENTITY_PrivateKey *pkey, |
1084 | const char *label, | 1084 | const char *label, |
1085 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1085 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1086 | void *error_cb_cls, | 1086 | void *error_cb_cls, |
@@ -1140,8 +1140,8 @@ GNUNET_NAMESTORE_records_lookup ( | |||
1140 | struct GNUNET_NAMESTORE_QueueEntry * | 1140 | struct GNUNET_NAMESTORE_QueueEntry * |
1141 | GNUNET_NAMESTORE_zone_to_name ( | 1141 | GNUNET_NAMESTORE_zone_to_name ( |
1142 | struct GNUNET_NAMESTORE_Handle *h, | 1142 | struct GNUNET_NAMESTORE_Handle *h, |
1143 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 1143 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
1144 | const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone, | 1144 | const struct GNUNET_IDENTITY_PublicKey *value_zone, |
1145 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1145 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1146 | void *error_cb_cls, | 1146 | void *error_cb_cls, |
1147 | GNUNET_NAMESTORE_RecordMonitor proc, | 1147 | GNUNET_NAMESTORE_RecordMonitor proc, |
@@ -1196,7 +1196,7 @@ GNUNET_NAMESTORE_zone_to_name ( | |||
1196 | struct GNUNET_NAMESTORE_ZoneIterator * | 1196 | struct GNUNET_NAMESTORE_ZoneIterator * |
1197 | GNUNET_NAMESTORE_zone_iteration_start ( | 1197 | GNUNET_NAMESTORE_zone_iteration_start ( |
1198 | struct GNUNET_NAMESTORE_Handle *h, | 1198 | struct GNUNET_NAMESTORE_Handle *h, |
1199 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 1199 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
1200 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1200 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1201 | void *error_cb_cls, | 1201 | void *error_cb_cls, |
1202 | GNUNET_NAMESTORE_RecordMonitor proc, | 1202 | GNUNET_NAMESTORE_RecordMonitor proc, |
diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c index 9dc955544..6670e54ce 100644 --- a/src/namestore/namestore_api_monitor.c +++ b/src/namestore/namestore_api_monitor.c | |||
@@ -82,7 +82,7 @@ struct GNUNET_NAMESTORE_ZoneMonitor | |||
82 | /** | 82 | /** |
83 | * Monitored zone. | 83 | * Monitored zone. |
84 | */ | 84 | */ |
85 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone; | 85 | struct GNUNET_IDENTITY_PrivateKey zone; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * Do we first iterate over all existing records? | 88 | * Do we first iterate over all existing records? |
@@ -302,7 +302,7 @@ reconnect (struct GNUNET_NAMESTORE_ZoneMonitor *zm) | |||
302 | struct GNUNET_NAMESTORE_ZoneMonitor * | 302 | struct GNUNET_NAMESTORE_ZoneMonitor * |
303 | GNUNET_NAMESTORE_zone_monitor_start ( | 303 | GNUNET_NAMESTORE_zone_monitor_start ( |
304 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 304 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
305 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 305 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
306 | int iterate_first, | 306 | int iterate_first, |
307 | GNUNET_SCHEDULER_TaskCallback error_cb, | 307 | GNUNET_SCHEDULER_TaskCallback error_cb, |
308 | void *error_cb_cls, | 308 | void *error_cb_cls, |
diff --git a/src/namestore/perf_namestore_api_zone_iteration.c b/src/namestore/perf_namestore_api_zone_iteration.c index c1012de62..f46a1c523 100644 --- a/src/namestore/perf_namestore_api_zone_iteration.c +++ b/src/namestore/perf_namestore_api_zone_iteration.c | |||
@@ -64,7 +64,7 @@ static struct GNUNET_SCHEDULER_Task *timeout_task; | |||
64 | 64 | ||
65 | static struct GNUNET_SCHEDULER_Task *t; | 65 | static struct GNUNET_SCHEDULER_Task *t; |
66 | 66 | ||
67 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 67 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
68 | 68 | ||
69 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 69 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
70 | 70 | ||
@@ -188,7 +188,7 @@ fail_cb (void *cls) | |||
188 | 188 | ||
189 | static void | 189 | static void |
190 | zone_proc (void *cls, | 190 | zone_proc (void *cls, |
191 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 191 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
192 | const char *label, | 192 | const char *label, |
193 | unsigned int rd_count, | 193 | unsigned int rd_count, |
194 | const struct GNUNET_GNSRECORD_Data *rd) | 194 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -341,7 +341,8 @@ run (void *cls, | |||
341 | NULL); | 341 | NULL); |
342 | nsh = GNUNET_NAMESTORE_connect (cfg); | 342 | nsh = GNUNET_NAMESTORE_connect (cfg); |
343 | GNUNET_assert (NULL != nsh); | 343 | GNUNET_assert (NULL != nsh); |
344 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 344 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
345 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); | ||
345 | start = GNUNET_TIME_absolute_get (); | 346 | start = GNUNET_TIME_absolute_get (); |
346 | t = GNUNET_SCHEDULER_add_now (&publish_record, | 347 | t = GNUNET_SCHEDULER_add_now (&publish_record, |
347 | NULL); | 348 | NULL); |
diff --git a/src/namestore/plugin_namestore_flat.c b/src/namestore/plugin_namestore_flat.c index 60b24df67..1a071fd80 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_CRYPTO_EcdsaPrivateKey private_key; | 57 | struct GNUNET_IDENTITY_PrivateKey private_key; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Record cound | 60 | * Record cound |
@@ -86,7 +86,7 @@ struct FlatFileEntry | |||
86 | * @param h[out] initialized hash | 86 | * @param h[out] initialized hash |
87 | */ | 87 | */ |
88 | static void | 88 | static void |
89 | hash_pkey_and_label (const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 89 | hash_pkey_and_label (const struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPrivateKey *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_CRYPTO_EcdsaPrivateKey); | 98 | key_len = label_len + sizeof(struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPrivateKey)); | 105 | sizeof(struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPrivateKey *private_key; | 299 | struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPrivateKey), | 348 | sizeof(struct GNUNET_IDENTITY_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) | |||
452 | static int | 452 | static int |
453 | namestore_flat_store_records (void *cls, | 453 | namestore_flat_store_records (void *cls, |
454 | const struct | 454 | const struct |
455 | GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 455 | GNUNET_IDENTITY_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_CRYPTO_EcdsaPrivateKey)); | 485 | sizeof(struct GNUNET_IDENTITY_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 | */ |
518 | static int | 518 | static int |
519 | namestore_flat_lookup_records (void *cls, | 519 | namestore_flat_lookup_records (void *cls, |
520 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 520 | const struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPrivateKey *zone; | 577 | const struct GNUNET_IDENTITY_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, | |||
647 | static int | 647 | static int |
648 | namestore_flat_iterate_records (void *cls, | 648 | namestore_flat_iterate_records (void *cls, |
649 | const struct | 649 | const struct |
650 | GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 650 | GNUNET_IDENTITY_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 | */ |
675 | struct ZoneToNameContext | 675 | struct ZoneToNameContext |
676 | { | 676 | { |
677 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone; | 677 | const struct GNUNET_IDENTITY_PrivateKey *zone; |
678 | const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone; | 678 | const struct GNUNET_IDENTITY_PublicKey *value_zone; |
679 | GNUNET_NAMESTORE_RecordIterator iter; | 679 | GNUNET_NAMESTORE_RecordIterator iter; |
680 | void *iter_cls; | 680 | void *iter_cls; |
681 | 681 | ||
@@ -702,7 +702,7 @@ zone_to_name (void *cls, | |||
702 | continue; | 702 | continue; |
703 | if (0 == memcmp (ztn->value_zone, | 703 | if (0 == memcmp (ztn->value_zone, |
704 | entry->record_data[i].data, | 704 | entry->record_data[i].data, |
705 | sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey))) | 705 | sizeof(struct GNUNET_IDENTITY_PublicKey))) |
706 | { | 706 | { |
707 | ztn->iter (ztn->iter_cls, | 707 | ztn->iter (ztn->iter_cls, |
708 | i + 1, /* zero is illegal! */ | 708 | i + 1, /* zero is illegal! */ |
@@ -730,9 +730,9 @@ zone_to_name (void *cls, | |||
730 | */ | 730 | */ |
731 | static int | 731 | static int |
732 | namestore_flat_zone_to_name (void *cls, | 732 | namestore_flat_zone_to_name (void *cls, |
733 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 733 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
734 | const struct | 734 | const struct |
735 | GNUNET_CRYPTO_EcdsaPublicKey *value_zone, | 735 | GNUNET_IDENTITY_PublicKey *value_zone, |
736 | GNUNET_NAMESTORE_RecordIterator iter, | 736 | GNUNET_NAMESTORE_RecordIterator iter, |
737 | void *iter_cls) | 737 | void *iter_cls) |
738 | { | 738 | { |
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 04100567c..358fd35d6 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -180,13 +180,13 @@ database_setup (struct Plugin *plugin) | |||
180 | static int | 180 | static int |
181 | namestore_postgres_store_records (void *cls, | 181 | namestore_postgres_store_records (void *cls, |
182 | const struct | 182 | const struct |
183 | GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 183 | GNUNET_IDENTITY_PrivateKey *zone_key, |
184 | const char *label, | 184 | const char *label, |
185 | unsigned int rd_count, | 185 | unsigned int rd_count, |
186 | const struct GNUNET_GNSRECORD_Data *rd) | 186 | const struct GNUNET_GNSRECORD_Data *rd) |
187 | { | 187 | { |
188 | struct Plugin *plugin = cls; | 188 | struct Plugin *plugin = cls; |
189 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | 189 | struct GNUNET_IDENTITY_PublicKey pkey; |
190 | uint64_t rvalue; | 190 | uint64_t rvalue; |
191 | uint32_t rd_count32 = (uint32_t) rd_count; | 191 | uint32_t rd_count32 = (uint32_t) rd_count; |
192 | ssize_t data_size; | 192 | ssize_t data_size; |
@@ -197,7 +197,7 @@ namestore_postgres_store_records (void *cls, | |||
197 | for (unsigned int i = 0; i < rd_count; i++) | 197 | for (unsigned int i = 0; i < rd_count; i++) |
198 | if (GNUNET_GNSRECORD_TYPE_PKEY == rd[i].record_type) | 198 | if (GNUNET_GNSRECORD_TYPE_PKEY == rd[i].record_type) |
199 | { | 199 | { |
200 | GNUNET_break (sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey) == | 200 | GNUNET_break (sizeof(struct GNUNET_IDENTITY_PublicKey) == |
201 | rd[i].data_size); | 201 | rd[i].data_size); |
202 | GNUNET_memcpy (&pkey, | 202 | GNUNET_memcpy (&pkey, |
203 | rd[i].data, | 203 | rd[i].data, |
@@ -296,7 +296,7 @@ struct ParserContext | |||
296 | /** | 296 | /** |
297 | * Zone key, NULL if part of record. | 297 | * Zone key, NULL if part of record. |
298 | */ | 298 | */ |
299 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key; | 299 | const struct GNUNET_IDENTITY_PrivateKey *zone_key; |
300 | 300 | ||
301 | /** | 301 | /** |
302 | * Number of results still to return (counted down by | 302 | * Number of results still to return (counted down by |
@@ -330,7 +330,7 @@ parse_result_call_iterator (void *cls, | |||
330 | size_t data_size; | 330 | size_t data_size; |
331 | uint32_t record_count; | 331 | uint32_t record_count; |
332 | char *label; | 332 | char *label; |
333 | struct GNUNET_CRYPTO_EcdsaPrivateKey zk; | 333 | struct GNUNET_IDENTITY_PrivateKey zk; |
334 | struct GNUNET_PQ_ResultSpec rs_with_zone[] = { | 334 | struct GNUNET_PQ_ResultSpec rs_with_zone[] = { |
335 | GNUNET_PQ_result_spec_uint64 ("seq", &serial), | 335 | GNUNET_PQ_result_spec_uint64 ("seq", &serial), |
336 | GNUNET_PQ_result_spec_uint32 ("record_count", &record_count), | 336 | GNUNET_PQ_result_spec_uint32 ("record_count", &record_count), |
@@ -407,7 +407,7 @@ parse_result_call_iterator (void *cls, | |||
407 | static int | 407 | static int |
408 | namestore_postgres_lookup_records (void *cls, | 408 | namestore_postgres_lookup_records (void *cls, |
409 | const struct | 409 | const struct |
410 | GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 410 | GNUNET_IDENTITY_PrivateKey *zone, |
411 | const char *label, | 411 | const char *label, |
412 | GNUNET_NAMESTORE_RecordIterator iter, | 412 | GNUNET_NAMESTORE_RecordIterator iter, |
413 | void *iter_cls) | 413 | void *iter_cls) |
@@ -457,7 +457,7 @@ namestore_postgres_lookup_records (void *cls, | |||
457 | static int | 457 | static int |
458 | namestore_postgres_iterate_records (void *cls, | 458 | namestore_postgres_iterate_records (void *cls, |
459 | const struct | 459 | const struct |
460 | GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 460 | GNUNET_IDENTITY_PrivateKey *zone, |
461 | uint64_t serial, | 461 | uint64_t serial, |
462 | uint64_t limit, | 462 | uint64_t limit, |
463 | GNUNET_NAMESTORE_RecordIterator iter, | 463 | GNUNET_NAMESTORE_RecordIterator iter, |
@@ -524,9 +524,9 @@ namestore_postgres_iterate_records (void *cls, | |||
524 | static int | 524 | static int |
525 | namestore_postgres_zone_to_name (void *cls, | 525 | namestore_postgres_zone_to_name (void *cls, |
526 | const struct | 526 | const struct |
527 | GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 527 | GNUNET_IDENTITY_PrivateKey *zone, |
528 | const struct | 528 | const struct |
529 | GNUNET_CRYPTO_EcdsaPublicKey *value_zone, | 529 | GNUNET_IDENTITY_PublicKey *value_zone, |
530 | GNUNET_NAMESTORE_RecordIterator iter, | 530 | GNUNET_NAMESTORE_RecordIterator iter, |
531 | void *iter_cls) | 531 | void *iter_cls) |
532 | { | 532 | { |
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index 45fb782f7..4a4ce3d8d 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -314,14 +314,14 @@ database_shutdown (struct Plugin *plugin) | |||
314 | static int | 314 | static int |
315 | namestore_sqlite_store_records (void *cls, | 315 | namestore_sqlite_store_records (void *cls, |
316 | const struct | 316 | const struct |
317 | GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 317 | GNUNET_IDENTITY_PrivateKey *zone_key, |
318 | const char *label, | 318 | const char *label, |
319 | unsigned int rd_count, | 319 | unsigned int rd_count, |
320 | const struct GNUNET_GNSRECORD_Data *rd) | 320 | const struct GNUNET_GNSRECORD_Data *rd) |
321 | { | 321 | { |
322 | struct Plugin *plugin = cls; | 322 | struct Plugin *plugin = cls; |
323 | int n; | 323 | int n; |
324 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | 324 | struct GNUNET_IDENTITY_PublicKey pkey; |
325 | uint64_t rvalue; | 325 | uint64_t rvalue; |
326 | ssize_t data_size; | 326 | ssize_t data_size; |
327 | 327 | ||
@@ -331,7 +331,7 @@ namestore_sqlite_store_records (void *cls, | |||
331 | for (unsigned int i = 0; i < rd_count; i++) | 331 | for (unsigned int i = 0; i < rd_count; i++) |
332 | if (GNUNET_GNSRECORD_TYPE_PKEY == rd[i].record_type) | 332 | if (GNUNET_GNSRECORD_TYPE_PKEY == rd[i].record_type) |
333 | { | 333 | { |
334 | GNUNET_break (sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey) == | 334 | GNUNET_break (sizeof(struct GNUNET_IDENTITY_PublicKey) == |
335 | rd[i].data_size); | 335 | rd[i].data_size); |
336 | GNUNET_memcpy (&pkey, | 336 | GNUNET_memcpy (&pkey, |
337 | rd[i].data, | 337 | rd[i].data, |
@@ -461,7 +461,7 @@ static int | |||
461 | get_records_and_call_iterator (struct Plugin *plugin, | 461 | get_records_and_call_iterator (struct Plugin *plugin, |
462 | sqlite3_stmt *stmt, | 462 | sqlite3_stmt *stmt, |
463 | const struct | 463 | const struct |
464 | GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 464 | GNUNET_IDENTITY_PrivateKey *zone_key, |
465 | uint64_t limit, | 465 | uint64_t limit, |
466 | GNUNET_NAMESTORE_RecordIterator iter, | 466 | GNUNET_NAMESTORE_RecordIterator iter, |
467 | void *iter_cls) | 467 | void *iter_cls) |
@@ -496,7 +496,7 @@ get_records_and_call_iterator (struct Plugin *plugin, | |||
496 | size_t data_size; | 496 | size_t data_size; |
497 | void *data; | 497 | void *data; |
498 | char *label; | 498 | char *label; |
499 | struct GNUNET_CRYPTO_EcdsaPrivateKey zk; | 499 | struct GNUNET_IDENTITY_PrivateKey zk; |
500 | struct GNUNET_SQ_ResultSpec rs[] = { | 500 | struct GNUNET_SQ_ResultSpec rs[] = { |
501 | GNUNET_SQ_result_spec_uint64 (&seq), | 501 | GNUNET_SQ_result_spec_uint64 (&seq), |
502 | GNUNET_SQ_result_spec_uint32 (&record_count), | 502 | GNUNET_SQ_result_spec_uint32 (&record_count), |
@@ -578,7 +578,7 @@ get_records_and_call_iterator (struct Plugin *plugin, | |||
578 | static int | 578 | static int |
579 | namestore_sqlite_lookup_records (void *cls, | 579 | namestore_sqlite_lookup_records (void *cls, |
580 | const struct | 580 | const struct |
581 | GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 581 | GNUNET_IDENTITY_PrivateKey *zone, |
582 | const char *label, | 582 | const char *label, |
583 | GNUNET_NAMESTORE_RecordIterator iter, | 583 | GNUNET_NAMESTORE_RecordIterator iter, |
584 | void *iter_cls) | 584 | void *iter_cls) |
@@ -629,7 +629,7 @@ namestore_sqlite_lookup_records (void *cls, | |||
629 | static int | 629 | static int |
630 | namestore_sqlite_iterate_records (void *cls, | 630 | namestore_sqlite_iterate_records (void *cls, |
631 | const struct | 631 | const struct |
632 | GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 632 | GNUNET_IDENTITY_PrivateKey *zone, |
633 | uint64_t serial, | 633 | uint64_t serial, |
634 | uint64_t limit, | 634 | uint64_t limit, |
635 | GNUNET_NAMESTORE_RecordIterator iter, | 635 | GNUNET_NAMESTORE_RecordIterator iter, |
@@ -695,9 +695,9 @@ namestore_sqlite_iterate_records (void *cls, | |||
695 | */ | 695 | */ |
696 | static int | 696 | static int |
697 | namestore_sqlite_zone_to_name (void *cls, | 697 | namestore_sqlite_zone_to_name (void *cls, |
698 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 698 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
699 | const struct | 699 | const struct |
700 | GNUNET_CRYPTO_EcdsaPublicKey *value_zone, | 700 | GNUNET_IDENTITY_PublicKey *value_zone, |
701 | GNUNET_NAMESTORE_RecordIterator iter, | 701 | GNUNET_NAMESTORE_RecordIterator iter, |
702 | void *iter_cls) | 702 | void *iter_cls) |
703 | { | 703 | { |
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index 9354b9896..f295951bc 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -214,7 +214,7 @@ struct RequestHandle | |||
214 | /** | 214 | /** |
215 | * Private key for the zone | 215 | * Private key for the zone |
216 | */ | 216 | */ |
217 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_pkey; | 217 | const struct GNUNET_IDENTITY_PrivateKey *zone_pkey; |
218 | 218 | ||
219 | /** | 219 | /** |
220 | * IDENTITY Operation | 220 | * IDENTITY Operation |
@@ -510,7 +510,7 @@ namestore_list_finished (void *cls) | |||
510 | */ | 510 | */ |
511 | static void | 511 | static void |
512 | namestore_list_iteration (void *cls, | 512 | namestore_list_iteration (void *cls, |
513 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 513 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
514 | const char *rname, | 514 | const char *rname, |
515 | unsigned int rd_len, | 515 | unsigned int rd_len, |
516 | const struct GNUNET_GNSRECORD_Data *rd) | 516 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -561,7 +561,7 @@ ns_lookup_error_cb (void *cls) | |||
561 | 561 | ||
562 | static void | 562 | static void |
563 | ns_get_lookup_cb (void *cls, | 563 | ns_get_lookup_cb (void *cls, |
564 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 564 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
565 | const char *label, | 565 | const char *label, |
566 | unsigned int rd_len, | 566 | unsigned int rd_len, |
567 | const struct GNUNET_GNSRECORD_Data *rd) | 567 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -689,7 +689,7 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle, | |||
689 | 689 | ||
690 | static void | 690 | static void |
691 | ns_lookup_cb (void *cls, | 691 | ns_lookup_cb (void *cls, |
692 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 692 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
693 | const char *label, | 693 | const char *label, |
694 | unsigned int rd_count, | 694 | unsigned int rd_count, |
695 | const struct GNUNET_GNSRECORD_Data *rd) | 695 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -946,7 +946,7 @@ list_ego (void *cls, | |||
946 | const char *identifier) | 946 | const char *identifier) |
947 | { | 947 | { |
948 | struct EgoEntry *ego_entry; | 948 | struct EgoEntry *ego_entry; |
949 | struct GNUNET_CRYPTO_EcdsaPublicKey pk; | 949 | struct GNUNET_IDENTITY_PublicKey pk; |
950 | 950 | ||
951 | if ((NULL == ego) && (ID_REST_STATE_INIT == state)) | 951 | if ((NULL == ego) && (ID_REST_STATE_INIT == state)) |
952 | { | 952 | { |
@@ -957,7 +957,7 @@ list_ego (void *cls, | |||
957 | { | 957 | { |
958 | ego_entry = GNUNET_new (struct EgoEntry); | 958 | ego_entry = GNUNET_new (struct EgoEntry); |
959 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 959 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
960 | ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 960 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); |
961 | ego_entry->ego = ego; | 961 | ego_entry->ego = ego; |
962 | ego_entry->identifier = GNUNET_strdup (identifier); | 962 | ego_entry->identifier = GNUNET_strdup (identifier); |
963 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 963 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
@@ -983,7 +983,7 @@ list_ego (void *cls, | |||
983 | /* Add */ | 983 | /* Add */ |
984 | ego_entry = GNUNET_new (struct EgoEntry); | 984 | ego_entry = GNUNET_new (struct EgoEntry); |
985 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 985 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
986 | ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 986 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); |
987 | ego_entry->ego = ego; | 987 | ego_entry->ego = ego; |
988 | ego_entry->identifier = GNUNET_strdup (identifier); | 988 | ego_entry->identifier = GNUNET_strdup (identifier); |
989 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 989 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 14fe7fc70..6ce969c9b 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -41,9 +41,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
41 | 41 | ||
42 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 42 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 44 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 46 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
47 | 47 | ||
48 | static int res; | 48 | static int res; |
49 | 49 | ||
@@ -98,7 +98,7 @@ end (void *cls) | |||
98 | 98 | ||
99 | static void | 99 | static void |
100 | lookup_it (void *cls, | 100 | lookup_it (void *cls, |
101 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 101 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
102 | const char *label, | 102 | const char *label, |
103 | unsigned int rd_count, | 103 | unsigned int rd_count, |
104 | const struct GNUNET_GNSRECORD_Data *rd) | 104 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -288,8 +288,9 @@ run (void *cls, | |||
288 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 288 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
289 | &endbadly, | 289 | &endbadly, |
290 | NULL); | 290 | NULL); |
291 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 291 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
292 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 292 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
293 | GNUNET_IDENTITY_key_get_public (&privkey, | ||
293 | &pubkey); | 294 | &pubkey); |
294 | 295 | ||
295 | nsh = GNUNET_NAMESTORE_connect (cfg); | 296 | nsh = GNUNET_NAMESTORE_connect (cfg); |
diff --git a/src/namestore/test_namestore_api_lookup_private.c b/src/namestore/test_namestore_api_lookup_private.c index d0ad726cc..67cf54582 100644 --- a/src/namestore/test_namestore_api_lookup_private.c +++ b/src/namestore/test_namestore_api_lookup_private.c | |||
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
38 | 38 | ||
39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 41 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 43 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
44 | 44 | ||
45 | static int res; | 45 | static int res; |
46 | 46 | ||
@@ -91,7 +91,7 @@ end (void *cls) | |||
91 | 91 | ||
92 | static void | 92 | static void |
93 | lookup_it (void *cls, | 93 | lookup_it (void *cls, |
94 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 94 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
95 | const char *label, | 95 | const char *label, |
96 | unsigned int rd_count, | 96 | unsigned int rd_count, |
97 | const struct GNUNET_GNSRECORD_Data *rd) | 97 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -187,8 +187,9 @@ run (void *cls, | |||
187 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 187 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
188 | &endbadly, | 188 | &endbadly, |
189 | NULL); | 189 | NULL); |
190 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 190 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
191 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, &pubkey); | 191 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
192 | GNUNET_IDENTITY_key_get_public (&privkey, &pubkey); | ||
192 | 193 | ||
193 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; | 194 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; |
194 | rd.record_type = TEST_RECORD_TYPE; | 195 | rd.record_type = TEST_RECORD_TYPE; |
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index 039c7cbf6..5e3e7bbd8 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -42,9 +42,9 @@ static struct GNUNET_NAMECACHE_Handle *nch; | |||
42 | 42 | ||
43 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 43 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 45 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 47 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
48 | 48 | ||
49 | static int res; | 49 | static int res; |
50 | 50 | ||
@@ -163,7 +163,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
163 | { | 163 | { |
164 | const char *name = cls; | 164 | const char *name = cls; |
165 | struct GNUNET_HashCode derived_hash; | 165 | struct GNUNET_HashCode derived_hash; |
166 | struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 166 | struct GNUNET_IDENTITY_PublicKey pubkey; |
167 | 167 | ||
168 | nsqe = NULL; | 168 | nsqe = NULL; |
169 | GNUNET_assert (NULL != cls); | 169 | GNUNET_assert (NULL != cls); |
@@ -173,8 +173,8 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
173 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 173 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
174 | 174 | ||
175 | /* Create derived hash */ | 175 | /* Create derived hash */ |
176 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 176 | GNUNET_IDENTITY_key_get_public (&privkey, |
177 | &pubkey); | 177 | &pubkey); |
178 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, name, &derived_hash); | 178 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, name, &derived_hash); |
179 | 179 | ||
180 | ncqe = GNUNET_NAMECACHE_lookup_block (nch, &derived_hash, | 180 | ncqe = GNUNET_NAMECACHE_lookup_block (nch, &derived_hash, |
@@ -193,9 +193,10 @@ run (void *cls, | |||
193 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 193 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
194 | &endbadly, | 194 | &endbadly, |
195 | NULL); | 195 | NULL); |
196 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 196 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
197 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 197 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
198 | &pubkey); | 198 | GNUNET_IDENTITY_key_get_public (&privkey, |
199 | &pubkey); | ||
199 | 200 | ||
200 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; | 201 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; |
201 | rd.record_type = TEST_RECORD_TYPE; | 202 | rd.record_type = TEST_RECORD_TYPE; |
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c index d399d903a..79fa4c9c6 100644 --- a/src/namestore/test_namestore_api_lookup_shadow.c +++ b/src/namestore/test_namestore_api_lookup_shadow.c | |||
@@ -44,9 +44,9 @@ static struct GNUNET_NAMECACHE_Handle *nch; | |||
44 | 44 | ||
45 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 45 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 47 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
48 | 48 | ||
49 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 49 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
50 | 50 | ||
51 | static int res; | 51 | static int res; |
52 | 52 | ||
@@ -195,7 +195,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
195 | { | 195 | { |
196 | const char *name = cls; | 196 | const char *name = cls; |
197 | struct GNUNET_HashCode derived_hash; | 197 | struct GNUNET_HashCode derived_hash; |
198 | struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 198 | struct GNUNET_IDENTITY_PublicKey pubkey; |
199 | 199 | ||
200 | nsqe = NULL; | 200 | nsqe = NULL; |
201 | GNUNET_assert (NULL != cls); | 201 | GNUNET_assert (NULL != cls); |
@@ -205,8 +205,8 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
205 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 205 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
206 | 206 | ||
207 | /* Create derived hash */ | 207 | /* Create derived hash */ |
208 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 208 | GNUNET_IDENTITY_key_get_public (&privkey, |
209 | &pubkey); | 209 | &pubkey); |
210 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, | 210 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, |
211 | name, | 211 | name, |
212 | &derived_hash); | 212 | &derived_hash); |
@@ -228,9 +228,10 @@ run (void *cls, | |||
228 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 228 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
229 | &endbadly, | 229 | &endbadly, |
230 | NULL); | 230 | NULL); |
231 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 231 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
232 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 232 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
233 | &pubkey); | 233 | GNUNET_IDENTITY_key_get_public (&privkey, |
234 | &pubkey); | ||
234 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; | 235 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; |
235 | rd.record_type = TEST_RECORD_TYPE; | 236 | rd.record_type = TEST_RECORD_TYPE; |
236 | rd.data_size = TEST_RECORD_DATALEN; | 237 | rd.data_size = TEST_RECORD_DATALEN; |
diff --git a/src/namestore/test_namestore_api_lookup_shadow_filter.c b/src/namestore/test_namestore_api_lookup_shadow_filter.c index 40dbeb90f..4fc197750 100644 --- a/src/namestore/test_namestore_api_lookup_shadow_filter.c +++ b/src/namestore/test_namestore_api_lookup_shadow_filter.c | |||
@@ -48,9 +48,9 @@ static struct GNUNET_SCHEDULER_Task *endbadly_task; | |||
48 | 48 | ||
49 | static struct GNUNET_SCHEDULER_Task *delayed_lookup_task; | 49 | static struct GNUNET_SCHEDULER_Task *delayed_lookup_task; |
50 | 50 | ||
51 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 51 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
52 | 52 | ||
53 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 53 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
54 | 54 | ||
55 | static int res; | 55 | static int res; |
56 | 56 | ||
@@ -66,7 +66,7 @@ static struct GNUNET_TIME_Absolute record_expiration; | |||
66 | 66 | ||
67 | static struct GNUNET_HashCode derived_hash; | 67 | static struct GNUNET_HashCode derived_hash; |
68 | 68 | ||
69 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 69 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
70 | 70 | ||
71 | 71 | ||
72 | static void | 72 | static void |
@@ -267,8 +267,8 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
267 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 267 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
268 | 268 | ||
269 | /* Create derived hash */ | 269 | /* Create derived hash */ |
270 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 270 | GNUNET_IDENTITY_key_get_public (&privkey, |
271 | &pubkey); | 271 | &pubkey); |
272 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, TEST_NAME, &derived_hash); | 272 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, TEST_NAME, &derived_hash); |
273 | 273 | ||
274 | if (0 == GNUNET_TIME_absolute_get_remaining (record_expiration).rel_value_us) | 274 | if (0 == GNUNET_TIME_absolute_get_remaining (record_expiration).rel_value_us) |
@@ -297,9 +297,10 @@ run (void *cls, | |||
297 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 297 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
298 | &endbadly, | 298 | &endbadly, |
299 | NULL); | 299 | NULL); |
300 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 300 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
301 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 301 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
302 | &pubkey); | 302 | GNUNET_IDENTITY_key_get_public (&privkey, |
303 | &pubkey); | ||
303 | 304 | ||
304 | record_expiration = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), | 305 | record_expiration = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), |
305 | EXPIRATION); | 306 | EXPIRATION); |
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index 3f1be1403..df0c38608 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -37,9 +37,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
37 | 37 | ||
38 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 38 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
39 | 39 | ||
40 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 40 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 42 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
43 | 43 | ||
44 | static struct GNUNET_NAMESTORE_ZoneMonitor *zm; | 44 | static struct GNUNET_NAMESTORE_ZoneMonitor *zm; |
45 | 45 | ||
@@ -133,7 +133,7 @@ end (void *cls) | |||
133 | 133 | ||
134 | static void | 134 | static void |
135 | zone_proc (void *cls, | 135 | zone_proc (void *cls, |
136 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 136 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
137 | const char *name, | 137 | const char *name, |
138 | unsigned int rd_count, | 138 | unsigned int rd_count, |
139 | const struct GNUNET_GNSRECORD_Data *rd) | 139 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -273,7 +273,8 @@ run (void *cls, | |||
273 | struct GNUNET_TESTING_Peer *peer) | 273 | struct GNUNET_TESTING_Peer *peer) |
274 | { | 274 | { |
275 | res = 1; | 275 | res = 1; |
276 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 276 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
277 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); | ||
277 | /* Start monitoring */ | 278 | /* Start monitoring */ |
278 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, | 279 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, |
279 | &privkey, | 280 | &privkey, |
@@ -304,7 +305,8 @@ run (void *cls, | |||
304 | return; | 305 | return; |
305 | } | 306 | } |
306 | 307 | ||
307 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2); | 308 | privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
309 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key); | ||
308 | 310 | ||
309 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 311 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
310 | "Created record 3\n"); | 312 | "Created record 3\n"); |
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c index 728fcc25e..366f5739f 100644 --- a/src/namestore/test_namestore_api_monitoring_existing.c +++ b/src/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
38 | 38 | ||
39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 41 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 43 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
44 | 44 | ||
45 | static struct GNUNET_NAMESTORE_ZoneMonitor *zm; | 45 | static struct GNUNET_NAMESTORE_ZoneMonitor *zm; |
46 | 46 | ||
@@ -129,7 +129,7 @@ end (void *cls) | |||
129 | 129 | ||
130 | static void | 130 | static void |
131 | zone_proc (void *cls, | 131 | zone_proc (void *cls, |
132 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 132 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
133 | const char *name, | 133 | const char *name, |
134 | unsigned int rd_count, | 134 | unsigned int rd_count, |
135 | const struct GNUNET_GNSRECORD_Data *rd) | 135 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -302,8 +302,10 @@ run (void *cls, | |||
302 | struct GNUNET_TESTING_Peer *peer) | 302 | struct GNUNET_TESTING_Peer *peer) |
303 | { | 303 | { |
304 | res = 1; | 304 | res = 1; |
305 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 305 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
306 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2); | 306 | privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
307 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); | ||
308 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key); | ||
307 | 309 | ||
308 | cfg = mycfg; | 310 | cfg = mycfg; |
309 | GNUNET_SCHEDULER_add_shutdown (&end, | 311 | GNUNET_SCHEDULER_add_shutdown (&end, |
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index e575821e8..b6254e531 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -39,9 +39,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
39 | 39 | ||
40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 42 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 44 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
45 | 45 | ||
46 | static int res; | 46 | static int res; |
47 | 47 | ||
@@ -158,9 +158,10 @@ run (void *cls, | |||
158 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 158 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
159 | &endbadly, | 159 | &endbadly, |
160 | NULL); | 160 | NULL); |
161 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 161 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
162 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 162 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
163 | &pubkey); | 163 | GNUNET_IDENTITY_key_get_public (&privkey, |
164 | &pubkey); | ||
164 | 165 | ||
165 | removed = GNUNET_NO; | 166 | removed = GNUNET_NO; |
166 | 167 | ||
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index 75e1cc3ed..e66992909 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
38 | 38 | ||
39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 41 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 43 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
44 | 44 | ||
45 | static int res; | 45 | static int res; |
46 | 46 | ||
@@ -132,8 +132,9 @@ run (void *cls, | |||
132 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 132 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
133 | &endbadly, | 133 | &endbadly, |
134 | NULL); | 134 | NULL); |
135 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 135 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
136 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, &pubkey); | 136 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
137 | GNUNET_IDENTITY_key_get_public (&privkey, &pubkey); | ||
137 | 138 | ||
138 | nsh = GNUNET_NAMESTORE_connect (cfg); | 139 | nsh = GNUNET_NAMESTORE_connect (cfg); |
139 | GNUNET_break (NULL != nsh); | 140 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index 9223b56a3..e0b7daa5d 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.c | |||
@@ -39,9 +39,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
39 | 39 | ||
40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 42 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 44 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
45 | 45 | ||
46 | static int res; | 46 | static int res; |
47 | 47 | ||
@@ -113,8 +113,9 @@ run (void *cls, | |||
113 | 113 | ||
114 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 114 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
115 | &endbadly, NULL); | 115 | &endbadly, NULL); |
116 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 116 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
117 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, &pubkey); | 117 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
118 | GNUNET_IDENTITY_key_get_public (&privkey, &pubkey); | ||
118 | 119 | ||
119 | 120 | ||
120 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; | 121 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; |
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 7a5a69a6c..5c169734a 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -48,9 +48,9 @@ static struct GNUNET_NAMECACHE_Handle *nch; | |||
48 | 48 | ||
49 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 49 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
50 | 50 | ||
51 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 51 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
52 | 52 | ||
53 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 53 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
54 | 54 | ||
55 | static int res; | 55 | static int res; |
56 | 56 | ||
@@ -246,9 +246,10 @@ run (void *cls, | |||
246 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 246 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
247 | &endbadly, | 247 | &endbadly, |
248 | NULL); | 248 | NULL); |
249 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 249 | memset (&privkey, 0, sizeof (privkey)); |
250 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 250 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
251 | &pubkey); | 251 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
252 | GNUNET_IDENTITY_key_get_public (&privkey, &pubkey); | ||
252 | rd.flags = GNUNET_GNSRECORD_RF_NONE; | 253 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
253 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; | 254 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; |
254 | rd.record_type = TEST_RECORD_TYPE; | 255 | rd.record_type = TEST_RECORD_TYPE; |
@@ -291,7 +292,7 @@ main (int argc, | |||
291 | SETUP_CFG (plugin_name, cfg_name); | 292 | SETUP_CFG (plugin_name, cfg_name); |
292 | res = 1; | 293 | res = 1; |
293 | if (0 != | 294 | if (0 != |
294 | GNUNET_TESTING_peer_run ("test-namestore-api-store-update", | 295 | GNUNET_TESTING_peer_run ("test--store-update", |
295 | cfg_name, | 296 | cfg_name, |
296 | &run, | 297 | &run, |
297 | NULL)) | 298 | NULL)) |
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index 5d02b9e49..55ca901e2 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -37,9 +37,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
37 | 37 | ||
38 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 38 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
39 | 39 | ||
40 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 40 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 42 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
43 | 43 | ||
44 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 44 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
45 | 45 | ||
@@ -142,7 +142,7 @@ fail_cb (void *cls) | |||
142 | 142 | ||
143 | static void | 143 | static void |
144 | zone_proc (void *cls, | 144 | zone_proc (void *cls, |
145 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 145 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
146 | const char *label, | 146 | const char *label, |
147 | unsigned int rd_count, | 147 | unsigned int rd_count, |
148 | const struct GNUNET_GNSRECORD_Data *rd) | 148 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -331,7 +331,7 @@ create_record (unsigned int count) | |||
331 | */ | 331 | */ |
332 | static void | 332 | static void |
333 | empty_zone_proc (void *cls, | 333 | empty_zone_proc (void *cls, |
334 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 334 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
335 | const char *label, | 335 | const char *label, |
336 | unsigned int rd_count, | 336 | unsigned int rd_count, |
337 | const struct GNUNET_GNSRECORD_Data *rd) | 337 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -362,34 +362,11 @@ empty_zone_proc (void *cls, | |||
362 | static void | 362 | static void |
363 | empty_zone_end (void *cls) | 363 | empty_zone_end (void *cls) |
364 | { | 364 | { |
365 | char *hostkey_file; | ||
366 | |||
367 | zi = NULL; | 365 | zi = NULL; |
368 | GNUNET_asprintf (&hostkey_file, | 366 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
369 | "zonefiles%s%s", | 367 | privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
370 | DIR_SEPARATOR_STR, | 368 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
371 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 369 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key); |
372 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
373 | "Using zonekey file `%s' \n", | ||
374 | hostkey_file); | ||
375 | GNUNET_assert (GNUNET_SYSERR != | ||
376 | GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file, | ||
377 | GNUNET_YES, | ||
378 | &privkey)); | ||
379 | GNUNET_free (hostkey_file); | ||
380 | |||
381 | GNUNET_asprintf (&hostkey_file, | ||
382 | "zonefiles%s%s", | ||
383 | DIR_SEPARATOR_STR, | ||
384 | "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); | ||
385 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
386 | "Using zonekey file `%s' \n", | ||
387 | hostkey_file); | ||
388 | GNUNET_assert (GNUNET_SYSERR != | ||
389 | GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file, | ||
390 | GNUNET_YES, | ||
391 | &privkey2)); | ||
392 | GNUNET_free (hostkey_file); | ||
393 | 370 | ||
394 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 1\n"); | 371 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 1\n"); |
395 | 372 | ||
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 4e54a05d2..c203a63a6 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -38,9 +38,9 @@ | |||
38 | 38 | ||
39 | static struct GNUNET_NAMESTORE_Handle *nsh; | 39 | static struct GNUNET_NAMESTORE_Handle *nsh; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 41 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 43 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
44 | 44 | ||
45 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 45 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
46 | 46 | ||
@@ -153,7 +153,7 @@ zone_proc_end (void *cls) | |||
153 | 153 | ||
154 | static void | 154 | static void |
155 | zone_proc (void *cls, | 155 | zone_proc (void *cls, |
156 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 156 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
157 | const char *label, | 157 | const char *label, |
158 | unsigned int rd_count, | 158 | unsigned int rd_count, |
159 | const struct GNUNET_GNSRECORD_Data *rd) | 159 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -345,7 +345,7 @@ nick_1_cont (void *cls, int32_t success, const char *emsg) | |||
345 | */ | 345 | */ |
346 | static void | 346 | static void |
347 | empty_zone_proc (void *cls, | 347 | empty_zone_proc (void *cls, |
348 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 348 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
349 | const char *label, | 349 | const char *label, |
350 | unsigned int rd_count, | 350 | unsigned int rd_count, |
351 | const struct GNUNET_GNSRECORD_Data *rd) | 351 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -379,8 +379,10 @@ empty_zone_end (void *cls) | |||
379 | struct GNUNET_GNSRECORD_Data rd; | 379 | struct GNUNET_GNSRECORD_Data rd; |
380 | 380 | ||
381 | zi = NULL; | 381 | zi = NULL; |
382 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 382 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
383 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2); | 383 | privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
384 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); | ||
385 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key); | ||
384 | 386 | ||
385 | memset (&rd, 0, sizeof(rd)); | 387 | memset (&rd, 0, sizeof(rd)); |
386 | rd.data = ZONE_NICK_1; | 388 | rd.data = ZONE_NICK_1; |
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 30920713f..70097a69e 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
38 | 38 | ||
39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 41 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 43 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
44 | 44 | ||
45 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 45 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
46 | 46 | ||
@@ -124,7 +124,7 @@ fail_cb (void *cls) | |||
124 | 124 | ||
125 | static void | 125 | static void |
126 | zone_proc (void *cls, | 126 | zone_proc (void *cls, |
127 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 127 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
128 | const char *label, | 128 | const char *label, |
129 | unsigned int rd_count, | 129 | unsigned int rd_count, |
130 | const struct GNUNET_GNSRECORD_Data *rd) | 130 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -309,7 +309,7 @@ create_record (unsigned int count) | |||
309 | */ | 309 | */ |
310 | static void | 310 | static void |
311 | empty_zone_proc (void *cls, | 311 | empty_zone_proc (void *cls, |
312 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 312 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
313 | const char *label, | 313 | const char *label, |
314 | unsigned int rd_count, | 314 | unsigned int rd_count, |
315 | const struct GNUNET_GNSRECORD_Data *rd) | 315 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -341,8 +341,10 @@ static void | |||
341 | empty_zone_proc_end (void *cls) | 341 | empty_zone_proc_end (void *cls) |
342 | { | 342 | { |
343 | zi = NULL; | 343 | zi = NULL; |
344 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 344 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
345 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2); | 345 | privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
346 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); | ||
347 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key); | ||
346 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 348 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
347 | "Created record 1\n"); | 349 | "Created record 1\n"); |
348 | GNUNET_asprintf (&s_name_1, | 350 | GNUNET_asprintf (&s_name_1, |
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index bdcdd1706..71b36ba09 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -34,9 +34,9 @@ | |||
34 | 34 | ||
35 | static struct GNUNET_NAMESTORE_Handle *nsh; | 35 | static struct GNUNET_NAMESTORE_Handle *nsh; |
36 | 36 | ||
37 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 37 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
38 | 38 | ||
39 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; | 39 | static struct GNUNET_IDENTITY_PrivateKey privkey2; |
40 | 40 | ||
41 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 41 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
42 | 42 | ||
@@ -112,7 +112,7 @@ fail_cb (void *cls) | |||
112 | 112 | ||
113 | static void | 113 | static void |
114 | zone_proc (void *cls, | 114 | zone_proc (void *cls, |
115 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 115 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
116 | const char *label, | 116 | const char *label, |
117 | unsigned int rd_count, | 117 | unsigned int rd_count, |
118 | const struct GNUNET_GNSRECORD_Data *rd) | 118 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -318,7 +318,7 @@ create_record (unsigned int count) | |||
318 | */ | 318 | */ |
319 | static void | 319 | static void |
320 | empty_zone_proc (void *cls, | 320 | empty_zone_proc (void *cls, |
321 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 321 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
322 | const char *label, | 322 | const char *label, |
323 | unsigned int rd_count, | 323 | unsigned int rd_count, |
324 | const struct GNUNET_GNSRECORD_Data *rd) | 324 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -347,34 +347,13 @@ empty_zone_proc (void *cls, | |||
347 | static void | 347 | static void |
348 | empty_zone_proc_end (void *cls) | 348 | empty_zone_proc_end (void *cls) |
349 | { | 349 | { |
350 | char *hostkey_file; | ||
351 | |||
352 | GNUNET_assert (nsh == cls); | 350 | GNUNET_assert (nsh == cls); |
353 | zi = NULL; | 351 | zi = NULL; |
354 | GNUNET_asprintf (&hostkey_file, | 352 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
355 | "zonefiles%s%s", | 353 | privkey2.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
356 | DIR_SEPARATOR_STR, | 354 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
357 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 355 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2.ecdsa_key); |
358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 356 | |
359 | "Using zonekey file `%s' \n", | ||
360 | hostkey_file); | ||
361 | GNUNET_assert (GNUNET_SYSERR | ||
362 | != GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file, | ||
363 | GNUNET_YES, | ||
364 | &privkey)); | ||
365 | GNUNET_free (hostkey_file); | ||
366 | GNUNET_asprintf (&hostkey_file, | ||
367 | "zonefiles%s%s", | ||
368 | DIR_SEPARATOR_STR, | ||
369 | "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); | ||
370 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
371 | "Using zonekey file `%s'\n", | ||
372 | hostkey_file); | ||
373 | GNUNET_assert (GNUNET_SYSERR != | ||
374 | GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file, | ||
375 | GNUNET_YES, | ||
376 | &privkey2)); | ||
377 | GNUNET_free (hostkey_file); | ||
378 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 357 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
379 | "Created record 1\n"); | 358 | "Created record 1\n"); |
380 | 359 | ||
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 94cc5c285..e5ede6bcd 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -42,11 +42,11 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
42 | 42 | ||
43 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 43 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 45 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 47 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
48 | 48 | ||
49 | static struct GNUNET_CRYPTO_EcdsaPublicKey s_zone_value; | 49 | static struct GNUNET_IDENTITY_PublicKey s_zone_value; |
50 | 50 | ||
51 | static char *s_name; | 51 | static char *s_name; |
52 | 52 | ||
@@ -92,7 +92,7 @@ end (void *cls) | |||
92 | 92 | ||
93 | static void | 93 | static void |
94 | zone_to_name_proc (void *cls, | 94 | zone_to_name_proc (void *cls, |
95 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 95 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
96 | const char *n, | 96 | const char *n, |
97 | unsigned int rd_count, | 97 | unsigned int rd_count, |
98 | const struct GNUNET_GNSRECORD_Data *rd) | 98 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -203,10 +203,11 @@ run (void *cls, | |||
203 | GNUNET_SCHEDULER_add_shutdown (&end, | 203 | GNUNET_SCHEDULER_add_shutdown (&end, |
204 | NULL); | 204 | NULL); |
205 | GNUNET_asprintf (&s_name, "dummy"); | 205 | GNUNET_asprintf (&s_name, "dummy"); |
206 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); | 206 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
207 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); | ||
207 | /* get public key */ | 208 | /* get public key */ |
208 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, | 209 | GNUNET_IDENTITY_key_get_public (&privkey, |
209 | &pubkey); | 210 | &pubkey); |
210 | 211 | ||
211 | GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, | 212 | GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, |
212 | &s_zone_value, | 213 | &s_zone_value, |