aboutsummaryrefslogtreecommitdiff
path: root/src/abd/gnunet-service-abd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/abd/gnunet-service-abd.c')
-rw-r--r--src/abd/gnunet-service-abd.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c
index 42b26eb9b..5cbc105f6 100644
--- a/src/abd/gnunet-service-abd.c
+++ b/src/abd/gnunet-service-abd.c
@@ -60,12 +60,12 @@ struct DelegationChainEntry
60 /** 60 /**
61 * The issuer 61 * The issuer
62 */ 62 */
63 struct GNUNET_IDENTITY_PublicKey issuer_key; 63 struct GNUNET_CRYPTO_PublicKey issuer_key;
64 64
65 /** 65 /**
66 * The subject 66 * The subject
67 */ 67 */
68 struct GNUNET_IDENTITY_PublicKey subject_key; 68 struct GNUNET_CRYPTO_PublicKey subject_key;
69 69
70 /** 70 /**
71 * The issued attribute 71 * The issued attribute
@@ -165,7 +165,7 @@ struct DelegationSetQueueEntry
165 /** 165 /**
166 * Issuer key 166 * Issuer key
167 */ 167 */
168 struct GNUNET_IDENTITY_PublicKey *issuer_key; 168 struct GNUNET_CRYPTO_PublicKey *issuer_key;
169 169
170 /** 170 /**
171 * Queue entries of this set 171 * Queue entries of this set
@@ -266,7 +266,7 @@ struct VerifyRequestHandle
266 /** 266 /**
267 * Issuer public key 267 * Issuer public key
268 */ 268 */
269 struct GNUNET_IDENTITY_PublicKey issuer_key; 269 struct GNUNET_CRYPTO_PublicKey issuer_key;
270 270
271 /** 271 /**
272 * Issuer attribute 272 * Issuer attribute
@@ -276,7 +276,7 @@ struct VerifyRequestHandle
276 /** 276 /**
277 * Subject public key 277 * Subject public key
278 */ 278 */
279 struct GNUNET_IDENTITY_PublicKey subject_key; 279 struct GNUNET_CRYPTO_PublicKey subject_key;
280 280
281 /** 281 /**
282 * Delegate DLL 282 * Delegate DLL
@@ -351,10 +351,10 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text)
351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
352 "%s %s.%s <- %s.%s\n", 352 "%s %s.%s <- %s.%s\n",
353 text, 353 text,
354 GNUNET_IDENTITY_public_key_to_string ( 354 GNUNET_CRYPTO_public_key_to_string (
355 &dsentry->delegation_chain_entry->issuer_key), 355 &dsentry->delegation_chain_entry->issuer_key),
356 dsentry->delegation_chain_entry->issuer_attribute, 356 dsentry->delegation_chain_entry->issuer_attribute,
357 GNUNET_IDENTITY_public_key_to_string ( 357 GNUNET_CRYPTO_public_key_to_string (
358 &dsentry->delegation_chain_entry->subject_key), 358 &dsentry->delegation_chain_entry->subject_key),
359 dsentry->delegation_chain_entry->subject_attribute); 359 dsentry->delegation_chain_entry->subject_attribute);
360} 360}
@@ -698,7 +698,7 @@ handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry,
698 { 698 {
699 if (0 != memcmp (&last_entry->delegation_chain_entry->subject_key, 699 if (0 != memcmp (&last_entry->delegation_chain_entry->subject_key,
700 &del_entry->delegate->issuer_key, 700 &del_entry->delegate->issuer_key,
701 sizeof (struct GNUNET_IDENTITY_PublicKey))) 701 sizeof (struct GNUNET_CRYPTO_PublicKey)))
702 continue; 702 continue;
703 if (0 != strcmp (last_entry->delegation_chain_entry->subject_attribute, 703 if (0 != strcmp (last_entry->delegation_chain_entry->subject_attribute,
704 del_entry->delegate->issuer_attribute)) 704 del_entry->delegate->issuer_attribute))
@@ -832,10 +832,10 @@ forward_resolution (void *cls,
832 { 832 {
833 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 833 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
834 "Entry not relevant, discarding: %s.%s <- %s.%s\n", 834 "Entry not relevant, discarding: %s.%s <- %s.%s\n",
835 GNUNET_IDENTITY_public_key_to_string ( 835 GNUNET_CRYPTO_public_key_to_string (
836 &del->issuer_key), 836 &del->issuer_key),
837 del->issuer_attribute, 837 del->issuer_attribute,
838 GNUNET_IDENTITY_public_key_to_string ( 838 GNUNET_CRYPTO_public_key_to_string (
839 &del->subject_key), 839 &del->subject_key),
840 del->subject_attribute); 840 del->subject_attribute);
841 GNUNET_free (del); 841 GNUNET_free (del);
@@ -849,10 +849,10 @@ forward_resolution (void *cls,
849 849
850 // Start: Credential Chain Entry 850 // Start: Credential Chain Entry
851 // issuer key is subject key, who needs to be contacted to resolve this (forward, therefore subject) 851 // issuer key is subject key, who needs to be contacted to resolve this (forward, therefore subject)
852 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); 852 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey);
853 GNUNET_memcpy (ds_entry->issuer_key, 853 GNUNET_memcpy (ds_entry->issuer_key,
854 &del->subject_key, 854 &del->subject_key,
855 sizeof (struct GNUNET_IDENTITY_PublicKey)); 855 sizeof (struct GNUNET_CRYPTO_PublicKey));
856 856
857 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); 857 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
858 ds_entry->delegation_chain_entry->subject_key = del->subject_key; 858 ds_entry->delegation_chain_entry->subject_key = del->subject_key;
@@ -873,7 +873,7 @@ forward_resolution (void *cls,
873 // if: issuer key we looking for 873 // if: issuer key we looking for
874 if (0 == memcmp (&del->issuer_key, 874 if (0 == memcmp (&del->issuer_key,
875 &vrh->issuer_key, 875 &vrh->issuer_key,
876 sizeof (struct GNUNET_IDENTITY_PublicKey))) 876 sizeof (struct GNUNET_CRYPTO_PublicKey)))
877 { 877 {
878 // if: issuer attr we looking for 878 // if: issuer attr we looking for
879 if (0 == strcmp (del->issuer_attribute, vrh->issuer_attribute)) 879 if (0 == strcmp (del->issuer_attribute, vrh->issuer_attribute))
@@ -904,7 +904,7 @@ forward_resolution (void *cls,
904 { 904 {
905 if (0 == memcmp (&del_entry->delegate->issuer_key, 905 if (0 == memcmp (&del_entry->delegate->issuer_key,
906 &vrh->delegation_chain_head->subject_key, 906 &vrh->delegation_chain_head->subject_key,
907 sizeof (struct GNUNET_IDENTITY_PublicKey))) 907 sizeof (struct GNUNET_CRYPTO_PublicKey)))
908 { 908 {
909 if (0 == strcmp (del_entry->delegate->issuer_attribute, 909 if (0 == strcmp (del_entry->delegate->issuer_attribute,
910 vrh->delegation_chain_head->subject_attribute)) 910 vrh->delegation_chain_head->subject_attribute))
@@ -932,7 +932,7 @@ forward_resolution (void *cls,
932 // key of list entry matches actual key 932 // key of list entry matches actual key
933 if (0 == memcmp (&del_entry->delegation_chain_entry->subject_key, 933 if (0 == memcmp (&del_entry->delegation_chain_entry->subject_key,
934 &ds_entry->delegation_chain_entry->issuer_key, 934 &ds_entry->delegation_chain_entry->issuer_key,
935 sizeof (struct GNUNET_IDENTITY_PublicKey))) 935 sizeof (struct GNUNET_CRYPTO_PublicKey)))
936 { 936 {
937 // compare entry subject attributes to this trailer (iss attr + old trailer) 937 // compare entry subject attributes to this trailer (iss attr + old trailer)
938 if (0 == strcmp (del_entry->unresolved_attribute_delegation, 938 if (0 == strcmp (del_entry->unresolved_attribute_delegation,
@@ -962,7 +962,7 @@ forward_resolution (void *cls,
962 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 962 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
963 "Starting to look up trailer %s in zone %s\n", 963 "Starting to look up trailer %s in zone %s\n",
964 ds_entry->attr_trailer, 964 ds_entry->attr_trailer,
965 GNUNET_IDENTITY_public_key_to_string (&del->issuer_key)); 965 GNUNET_CRYPTO_public_key_to_string (&del->issuer_key));
966 966
967 ds_entry->lookup_request = 967 ds_entry->lookup_request =
968 GNUNET_GNS_lookup (gns, 968 GNUNET_GNS_lookup (gns,
@@ -1072,10 +1072,10 @@ backward_resolution (void *cls,
1072 ds_entry->delegation_chain_entry = 1072 ds_entry->delegation_chain_entry =
1073 GNUNET_new (struct DelegationChainEntry); 1073 GNUNET_new (struct DelegationChainEntry);
1074 ds_entry->delegation_chain_entry->subject_key = set[j].subject_key; 1074 ds_entry->delegation_chain_entry->subject_key = set[j].subject_key;
1075 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); 1075 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey);
1076 GNUNET_memcpy (ds_entry->issuer_key, 1076 GNUNET_memcpy (ds_entry->issuer_key,
1077 &set[j].subject_key, 1077 &set[j].subject_key,
1078 sizeof (struct GNUNET_IDENTITY_PublicKey)); 1078 sizeof (struct GNUNET_CRYPTO_PublicKey));
1079 if (0 < set[j].subject_attribute_len) 1079 if (0 < set[j].subject_attribute_len)
1080 ds_entry->delegation_chain_entry->subject_attribute = 1080 ds_entry->delegation_chain_entry->subject_attribute =
1081 GNUNET_strdup (set[j].subject_attribute); 1081 GNUNET_strdup (set[j].subject_attribute);
@@ -1099,7 +1099,7 @@ backward_resolution (void *cls,
1099 // If key and attribute match credential: continue and backtrack 1099 // If key and attribute match credential: continue and backtrack
1100 if (0 != memcmp (&set[j].subject_key, 1100 if (0 != memcmp (&set[j].subject_key,
1101 &del_pointer->delegate->issuer_key, 1101 &del_pointer->delegate->issuer_key,
1102 sizeof (struct GNUNET_IDENTITY_PublicKey))) 1102 sizeof (struct GNUNET_CRYPTO_PublicKey)))
1103 continue; 1103 continue;
1104 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1104 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1105 "Checking if %s matches %s\n", 1105 "Checking if %s matches %s\n",
@@ -1181,7 +1181,7 @@ backward_resolution (void *cls,
1181 // key of list entry matches actual key 1181 // key of list entry matches actual key
1182 if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key, 1182 if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key,
1183 &ds_entry->delegation_chain_entry->subject_key, 1183 &ds_entry->delegation_chain_entry->subject_key,
1184 sizeof (struct GNUNET_IDENTITY_PublicKey))) 1184 sizeof (struct GNUNET_CRYPTO_PublicKey)))
1185 { 1185 {
1186 // compare entry subject attributes to this trailer (iss attr + old trailer) 1186 // compare entry subject attributes to this trailer (iss attr + old trailer)
1187 if (0 == strcmp (del_entry->attr_trailer, 1187 if (0 == strcmp (del_entry->attr_trailer,
@@ -1270,7 +1270,7 @@ delegation_chain_bw_resolution_start (void *cls)
1270 { 1270 {
1271 if (0 != memcmp (&del_entry->delegate->issuer_key, 1271 if (0 != memcmp (&del_entry->delegate->issuer_key,
1272 &vrh->issuer_key, 1272 &vrh->issuer_key,
1273 sizeof (struct GNUNET_IDENTITY_PublicKey))) 1273 sizeof (struct GNUNET_CRYPTO_PublicKey)))
1274 continue; 1274 continue;
1275 if (0 != 1275 if (0 !=
1276 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) 1276 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute))
@@ -1292,10 +1292,10 @@ delegation_chain_bw_resolution_start (void *cls)
1292 ds_entry = GNUNET_new (struct DelegationSetQueueEntry); 1292 ds_entry = GNUNET_new (struct DelegationSetQueueEntry);
1293 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); 1293 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry);
1294 ds_entry->from_bw = true; 1294 ds_entry->from_bw = true;
1295 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); 1295 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey);
1296 GNUNET_memcpy (ds_entry->issuer_key, 1296 GNUNET_memcpy (ds_entry->issuer_key,
1297 &vrh->issuer_key, 1297 &vrh->issuer_key,
1298 sizeof (struct GNUNET_IDENTITY_PublicKey)); 1298 sizeof (struct GNUNET_CRYPTO_PublicKey));
1299 ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); 1299 ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute);
1300 1300
1301 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); 1301 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
@@ -1352,7 +1352,7 @@ delegation_chain_fw_resolution_start (void *cls)
1352 { 1352 {
1353 if (0 != memcmp (&del_entry->delegate->issuer_key, 1353 if (0 != memcmp (&del_entry->delegate->issuer_key,
1354 &vrh->issuer_key, 1354 &vrh->issuer_key,
1355 sizeof (struct GNUNET_IDENTITY_PublicKey))) 1355 sizeof (struct GNUNET_CRYPTO_PublicKey)))
1356 continue; 1356 continue;
1357 if (0 != 1357 if (0 !=
1358 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) 1358 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute))
@@ -1374,17 +1374,17 @@ delegation_chain_fw_resolution_start (void *cls)
1374 1374
1375 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1375 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1376 "Looking for %s.%s\n", 1376 "Looking for %s.%s\n",
1377 GNUNET_IDENTITY_public_key_to_string ( 1377 GNUNET_CRYPTO_public_key_to_string (
1378 &del_entry->delegate->issuer_key), 1378 &del_entry->delegate->issuer_key),
1379 del_entry->delegate->issuer_attribute); 1379 del_entry->delegate->issuer_attribute);
1380 1380
1381 ds_entry = GNUNET_new (struct DelegationSetQueueEntry); 1381 ds_entry = GNUNET_new (struct DelegationSetQueueEntry);
1382 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); 1382 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry);
1383 ds_entry->from_bw = false; 1383 ds_entry->from_bw = false;
1384 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); 1384 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey);
1385 GNUNET_memcpy (ds_entry->issuer_key, 1385 GNUNET_memcpy (ds_entry->issuer_key,
1386 &del_entry->delegate->subject_key, 1386 &del_entry->delegate->subject_key,
1387 sizeof (struct GNUNET_IDENTITY_PublicKey)); 1387 sizeof (struct GNUNET_CRYPTO_PublicKey));
1388 1388
1389 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); 1389 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
1390 ds_entry->delegation_chain_entry->subject_key = 1390 ds_entry->delegation_chain_entry->subject_key =
@@ -1588,7 +1588,7 @@ delegate_collection_finished (void *cls)
1588 1588
1589static void 1589static void
1590handle_delegate_collection_cb (void *cls, 1590handle_delegate_collection_cb (void *cls,
1591 const struct GNUNET_IDENTITY_PrivateKey *key, 1591 const struct GNUNET_CRYPTO_PrivateKey *key,
1592 const char *label, 1592 const char *label,
1593 unsigned int rd_count, 1593 unsigned int rd_count,
1594 const struct GNUNET_GNSRECORD_Data *rd) 1594 const struct GNUNET_GNSRECORD_Data *rd)
@@ -1646,7 +1646,7 @@ handle_collect (void *cls, const struct CollectMessage *c_msg)
1646 vrh->client = client; 1646 vrh->client = client;
1647 vrh->request_id = c_msg->id; 1647 vrh->request_id = c_msg->id;
1648 vrh->issuer_key = c_msg->issuer_key; 1648 vrh->issuer_key = c_msg->issuer_key;
1649 GNUNET_IDENTITY_key_get_public (&c_msg->subject_key, &vrh->subject_key); 1649 GNUNET_CRYPTO_key_get_public (&c_msg->subject_key, &vrh->subject_key);
1650 vrh->issuer_attribute = GNUNET_strdup (issuer_attribute); 1650 vrh->issuer_attribute = GNUNET_strdup (issuer_attribute);
1651 vrh->resolution_algo = ntohs (c_msg->resolution_algo); 1651 vrh->resolution_algo = ntohs (c_msg->resolution_algo);
1652 1652