diff options
Diffstat (limited to 'src/namestore/gnunet-namestore.c')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 0329c9c63..baa036ac7 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -79,7 +79,7 @@ struct MarkedRecord | |||
79 | /** | 79 | /** |
80 | * The zone key | 80 | * The zone key |
81 | */ | 81 | */ |
82 | struct GNUNET_IDENTITY_PrivateKey key; | 82 | struct GNUNET_CRYPTO_PrivateKey key; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | /** | 85 | /** |
@@ -116,7 +116,7 @@ static struct GNUNET_NAMESTORE_Handle *ns; | |||
116 | /** | 116 | /** |
117 | * Private key for the our zone. | 117 | * Private key for the our zone. |
118 | */ | 118 | */ |
119 | static struct GNUNET_IDENTITY_PrivateKey zone_pkey; | 119 | static struct GNUNET_CRYPTO_PrivateKey zone_pkey; |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * Identity service handle | 122 | * Identity service handle |
@@ -765,7 +765,7 @@ zone_iteration_error_cb (void *cls) | |||
765 | 765 | ||
766 | static void | 766 | static void |
767 | collect_zone_records_to_purge (const struct | 767 | collect_zone_records_to_purge (const struct |
768 | GNUNET_IDENTITY_PrivateKey *zone_key, | 768 | GNUNET_CRYPTO_PrivateKey *zone_key, |
769 | const char *rname, | 769 | const char *rname, |
770 | unsigned int rd_len, | 770 | unsigned int rd_len, |
771 | const struct GNUNET_GNSRECORD_Data *rd) | 771 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -782,7 +782,7 @@ collect_zone_records_to_purge (const struct | |||
782 | 782 | ||
783 | 783 | ||
784 | static void | 784 | static void |
785 | collect_orphans (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 785 | collect_orphans (const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
786 | const char *rname, | 786 | const char *rname, |
787 | unsigned int rd_len, | 787 | unsigned int rd_len, |
788 | const struct GNUNET_GNSRECORD_Data *rd) | 788 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -820,7 +820,7 @@ collect_orphans (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | |||
820 | * @param rd array of records with data to store | 820 | * @param rd array of records with data to store |
821 | */ | 821 | */ |
822 | static void | 822 | static void |
823 | display_record (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 823 | display_record (const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
824 | const char *rname, | 824 | const char *rname, |
825 | unsigned int rd_len, | 825 | unsigned int rd_len, |
826 | const struct GNUNET_GNSRECORD_Data *rd) | 826 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -864,7 +864,7 @@ display_record (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | |||
864 | return; | 864 | return; |
865 | if (! list_orphaned && is_orphaned) | 865 | if (! list_orphaned && is_orphaned) |
866 | return; | 866 | return; |
867 | orphaned_str = GNUNET_IDENTITY_private_key_to_string (zone_key); | 867 | orphaned_str = GNUNET_CRYPTO_private_key_to_string (zone_key); |
868 | fprintf (stdout, "%s.%s:\n", rname, is_orphaned ? orphaned_str : | 868 | fprintf (stdout, "%s.%s:\n", rname, is_orphaned ? orphaned_str : |
869 | ego->identifier); | 869 | ego->identifier); |
870 | GNUNET_free (orphaned_str); | 870 | GNUNET_free (orphaned_str); |
@@ -931,7 +931,7 @@ display_record (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | |||
931 | 931 | ||
932 | static void | 932 | static void |
933 | purge_zone_iterator (void *cls, | 933 | purge_zone_iterator (void *cls, |
934 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 934 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
935 | const char *rname, | 935 | const char *rname, |
936 | unsigned int rd_len, | 936 | unsigned int rd_len, |
937 | const struct GNUNET_GNSRECORD_Data *rd, | 937 | const struct GNUNET_GNSRECORD_Data *rd, |
@@ -947,7 +947,7 @@ purge_zone_iterator (void *cls, | |||
947 | 947 | ||
948 | static void | 948 | static void |
949 | purge_orphans_iterator (void *cls, | 949 | purge_orphans_iterator (void *cls, |
950 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 950 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
951 | const char *rname, | 951 | const char *rname, |
952 | unsigned int rd_len, | 952 | unsigned int rd_len, |
953 | const struct GNUNET_GNSRECORD_Data *rd, | 953 | const struct GNUNET_GNSRECORD_Data *rd, |
@@ -972,7 +972,7 @@ purge_orphans_iterator (void *cls, | |||
972 | */ | 972 | */ |
973 | static void | 973 | static void |
974 | display_record_iterator (void *cls, | 974 | display_record_iterator (void *cls, |
975 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 975 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
976 | const char *rname, | 976 | const char *rname, |
977 | unsigned int rd_len, | 977 | unsigned int rd_len, |
978 | const struct GNUNET_GNSRECORD_Data *rd, | 978 | const struct GNUNET_GNSRECORD_Data *rd, |
@@ -997,7 +997,7 @@ display_record_iterator (void *cls, | |||
997 | */ | 997 | */ |
998 | static void | 998 | static void |
999 | display_record_monitor (void *cls, | 999 | display_record_monitor (void *cls, |
1000 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 1000 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
1001 | const char *rname, | 1001 | const char *rname, |
1002 | unsigned int rd_len, | 1002 | unsigned int rd_len, |
1003 | const struct GNUNET_GNSRECORD_Data *rd, | 1003 | const struct GNUNET_GNSRECORD_Data *rd, |
@@ -1022,7 +1022,7 @@ display_record_monitor (void *cls, | |||
1022 | */ | 1022 | */ |
1023 | static void | 1023 | static void |
1024 | display_record_lookup (void *cls, | 1024 | display_record_lookup (void *cls, |
1025 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 1025 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
1026 | const char *rname, | 1026 | const char *rname, |
1027 | unsigned int rd_len, | 1027 | unsigned int rd_len, |
1028 | const struct GNUNET_GNSRECORD_Data *rd) | 1028 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1102,7 +1102,7 @@ add_error_cb (void *cls) | |||
1102 | */ | 1102 | */ |
1103 | static void | 1103 | static void |
1104 | get_existing_record (void *cls, | 1104 | get_existing_record (void *cls, |
1105 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 1105 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
1106 | const char *rec_name, | 1106 | const char *rec_name, |
1107 | unsigned int rd_count, | 1107 | unsigned int rd_count, |
1108 | const struct GNUNET_GNSRECORD_Data *rd) | 1108 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1194,7 +1194,7 @@ reverse_error_cb (void *cls) | |||
1194 | */ | 1194 | */ |
1195 | static void | 1195 | static void |
1196 | handle_reverse_lookup (void *cls, | 1196 | handle_reverse_lookup (void *cls, |
1197 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1197 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1198 | const char *label, | 1198 | const char *label, |
1199 | unsigned int rd_count, | 1199 | unsigned int rd_count, |
1200 | const struct GNUNET_GNSRECORD_Data *rd) | 1200 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1239,7 +1239,7 @@ del_lookup_error_cb (void *cls) | |||
1239 | */ | 1239 | */ |
1240 | static void | 1240 | static void |
1241 | del_monitor (void *cls, | 1241 | del_monitor (void *cls, |
1242 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1242 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1243 | const char *label, | 1243 | const char *label, |
1244 | unsigned int rd_count, | 1244 | unsigned int rd_count, |
1245 | const struct GNUNET_GNSRECORD_Data *rd) | 1245 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1622,7 +1622,7 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1622 | } | 1622 | } |
1623 | if (NULL != reverse_pkey) | 1623 | if (NULL != reverse_pkey) |
1624 | { | 1624 | { |
1625 | struct GNUNET_IDENTITY_PublicKey pubkey; | 1625 | struct GNUNET_CRYPTO_PublicKey pubkey; |
1626 | 1626 | ||
1627 | if (NULL == ego_name) | 1627 | if (NULL == ego_name) |
1628 | { | 1628 | { |
@@ -1635,7 +1635,7 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1635 | return; | 1635 | return; |
1636 | } | 1636 | } |
1637 | if (GNUNET_OK != | 1637 | if (GNUNET_OK != |
1638 | GNUNET_IDENTITY_public_key_from_string (reverse_pkey, | 1638 | GNUNET_CRYPTO_public_key_from_string (reverse_pkey, |
1639 | &pubkey)) | 1639 | &pubkey)) |
1640 | { | 1640 | { |
1641 | fprintf (stderr, | 1641 | fprintf (stderr, |
@@ -1657,7 +1657,7 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1657 | { | 1657 | { |
1658 | char sh[105]; | 1658 | char sh[105]; |
1659 | char sname[64]; | 1659 | char sname[64]; |
1660 | struct GNUNET_IDENTITY_PublicKey pkey; | 1660 | struct GNUNET_CRYPTO_PublicKey pkey; |
1661 | if (NULL == ego_name) | 1661 | if (NULL == ego_name) |
1662 | { | 1662 | { |
1663 | fprintf (stderr, | 1663 | fprintf (stderr, |
@@ -1674,7 +1674,7 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1674 | 1674 | ||
1675 | if ((2 != (sscanf (uri, "gnunet://gns/%58s/%63s", sh, sname))) || | 1675 | if ((2 != (sscanf (uri, "gnunet://gns/%58s/%63s", sh, sname))) || |
1676 | (GNUNET_OK != | 1676 | (GNUNET_OK != |
1677 | GNUNET_IDENTITY_public_key_from_string (sh, &pkey))) | 1677 | GNUNET_CRYPTO_public_key_from_string (sh, &pkey))) |
1678 | { | 1678 | { |
1679 | fprintf (stderr, _ ("Invalid URI `%s'\n"), uri); | 1679 | fprintf (stderr, _ ("Invalid URI `%s'\n"), uri); |
1680 | ret = 1; | 1680 | ret = 1; |
@@ -1700,7 +1700,7 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1700 | } | 1700 | } |
1701 | memset (&rd, 0, sizeof(rd)); | 1701 | memset (&rd, 0, sizeof(rd)); |
1702 | rd.data = &pkey; | 1702 | rd.data = &pkey; |
1703 | rd.data_size = GNUNET_IDENTITY_public_key_get_length (&pkey); | 1703 | rd.data_size = GNUNET_CRYPTO_public_key_get_length (&pkey); |
1704 | rd.record_type = ntohl (pkey.type); | 1704 | rd.record_type = ntohl (pkey.type); |
1705 | rd.expiration_time = etime; | 1705 | rd.expiration_time = etime; |
1706 | if (GNUNET_YES == etime_is_rel) | 1706 | if (GNUNET_YES == etime_is_rel) |
@@ -1737,14 +1737,14 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1737 | 1737 | ||
1738 | static int | 1738 | static int |
1739 | get_identity_for_string (const char *str, | 1739 | get_identity_for_string (const char *str, |
1740 | struct GNUNET_IDENTITY_PrivateKey *zk) | 1740 | struct GNUNET_CRYPTO_PrivateKey *zk) |
1741 | { | 1741 | { |
1742 | const struct GNUNET_IDENTITY_PrivateKey *privkey; | 1742 | const struct GNUNET_CRYPTO_PrivateKey *privkey; |
1743 | struct GNUNET_IDENTITY_PublicKey pubkey; | 1743 | struct GNUNET_CRYPTO_PublicKey pubkey; |
1744 | struct GNUNET_IDENTITY_PublicKey ego_pubkey; | 1744 | struct GNUNET_CRYPTO_PublicKey ego_pubkey; |
1745 | struct EgoEntry *ego_entry; | 1745 | struct EgoEntry *ego_entry; |
1746 | 1746 | ||
1747 | if (GNUNET_OK == GNUNET_IDENTITY_public_key_from_string (str, | 1747 | if (GNUNET_OK == GNUNET_CRYPTO_public_key_from_string (str, |
1748 | &pubkey)) | 1748 | &pubkey)) |
1749 | { | 1749 | { |
1750 | for (ego_entry = ego_head; | 1750 | for (ego_entry = ego_head; |
@@ -1777,7 +1777,7 @@ static void | |||
1777 | process_command_stdin () | 1777 | process_command_stdin () |
1778 | { | 1778 | { |
1779 | char buf[MAX_LINE_LEN]; | 1779 | char buf[MAX_LINE_LEN]; |
1780 | static struct GNUNET_IDENTITY_PrivateKey next_zone_key; | 1780 | static struct GNUNET_CRYPTO_PrivateKey next_zone_key; |
1781 | static char next_name[GNUNET_DNSPARSER_MAX_NAME_LENGTH]; | 1781 | static char next_name[GNUNET_DNSPARSER_MAX_NAME_LENGTH]; |
1782 | static int finished = GNUNET_NO; | 1782 | static int finished = GNUNET_NO; |
1783 | static int have_next_zonekey = GNUNET_NO; | 1783 | static int have_next_zonekey = GNUNET_NO; |
@@ -1900,7 +1900,7 @@ id_connect_cb (void *cls, | |||
1900 | void **ctx, | 1900 | void **ctx, |
1901 | const char *name) | 1901 | const char *name) |
1902 | { | 1902 | { |
1903 | struct GNUNET_IDENTITY_PublicKey pk; | 1903 | struct GNUNET_CRYPTO_PublicKey pk; |
1904 | struct EgoEntry *ego_entry; | 1904 | struct EgoEntry *ego_entry; |
1905 | 1905 | ||
1906 | (void) ctx; | 1906 | (void) ctx; |