diff options
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim_tickets.c')
-rw-r--r-- | src/reclaim/gnunet-service-reclaim_tickets.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c index 0c2fadd96..689fbc429 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.c +++ b/src/reclaim/gnunet-service-reclaim_tickets.c | |||
@@ -87,12 +87,12 @@ struct RECLAIM_TICKETS_ConsumeHandle | |||
87 | /** | 87 | /** |
88 | * Audience Key | 88 | * Audience Key |
89 | */ | 89 | */ |
90 | struct GNUNET_IDENTITY_PrivateKey identity; | 90 | struct GNUNET_CRYPTO_PrivateKey identity; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * Audience Key | 93 | * Audience Key |
94 | */ | 94 | */ |
95 | struct GNUNET_IDENTITY_PublicKey identity_pub; | 95 | struct GNUNET_CRYPTO_PublicKey identity_pub; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Lookup DLL | 98 | * Lookup DLL |
@@ -181,7 +181,7 @@ struct TicketIssueHandle | |||
181 | /** | 181 | /** |
182 | * Issuer Key | 182 | * Issuer Key |
183 | */ | 183 | */ |
184 | struct GNUNET_IDENTITY_PrivateKey identity; | 184 | struct GNUNET_CRYPTO_PrivateKey identity; |
185 | 185 | ||
186 | /** | 186 | /** |
187 | * Ticket to issue | 187 | * Ticket to issue |
@@ -264,7 +264,7 @@ struct RECLAIM_TICKETS_RevokeHandle | |||
264 | /** | 264 | /** |
265 | * Issuer Key | 265 | * Issuer Key |
266 | */ | 266 | */ |
267 | struct GNUNET_IDENTITY_PrivateKey identity; | 267 | struct GNUNET_CRYPTO_PrivateKey identity; |
268 | 268 | ||
269 | /** | 269 | /** |
270 | * Callback | 270 | * Callback |
@@ -491,7 +491,7 @@ rvk_ticket_update_finished (void *cls) | |||
491 | */ | 491 | */ |
492 | static void | 492 | static void |
493 | rvk_ticket_update (void *cls, | 493 | rvk_ticket_update (void *cls, |
494 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 494 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
495 | const char *label, | 495 | const char *label, |
496 | unsigned int rd_count, | 496 | unsigned int rd_count, |
497 | const struct GNUNET_GNSRECORD_Data *rd) | 497 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -667,7 +667,7 @@ move_attr_finished (void *cls, enum GNUNET_ErrorCode ec) | |||
667 | */ | 667 | */ |
668 | static void | 668 | static void |
669 | rvk_move_attr_cb (void *cls, | 669 | rvk_move_attr_cb (void *cls, |
670 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 670 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
671 | const char *label, | 671 | const char *label, |
672 | unsigned int rd_count, | 672 | unsigned int rd_count, |
673 | const struct GNUNET_GNSRECORD_Data *rd) | 673 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -845,7 +845,7 @@ remove_ticket_cont (void *cls, enum GNUNET_ErrorCode ec) | |||
845 | */ | 845 | */ |
846 | static void | 846 | static void |
847 | revoke_attrs_cb (void *cls, | 847 | revoke_attrs_cb (void *cls, |
848 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 848 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
849 | const char *label, | 849 | const char *label, |
850 | unsigned int rd_count, | 850 | unsigned int rd_count, |
851 | const struct GNUNET_GNSRECORD_Data *rd) | 851 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -908,7 +908,7 @@ rvk_attrs_err_cb (void *cls) | |||
908 | */ | 908 | */ |
909 | struct RECLAIM_TICKETS_RevokeHandle * | 909 | struct RECLAIM_TICKETS_RevokeHandle * |
910 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, | 910 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, |
911 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 911 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
912 | RECLAIM_TICKETS_RevokeCallback cb, | 912 | RECLAIM_TICKETS_RevokeCallback cb, |
913 | void *cb_cls) | 913 | void *cb_cls) |
914 | { | 914 | { |
@@ -920,7 +920,7 @@ RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, | |||
920 | rvk->cb_cls = cb_cls; | 920 | rvk->cb_cls = cb_cls; |
921 | rvk->identity = *identity; | 921 | rvk->identity = *identity; |
922 | rvk->ticket = *ticket; | 922 | rvk->ticket = *ticket; |
923 | GNUNET_IDENTITY_key_get_public (&rvk->identity, &rvk->ticket.identity); | 923 | GNUNET_CRYPTO_key_get_public (&rvk->identity, &rvk->ticket.identity); |
924 | /** Get shared attributes **/ | 924 | /** Get shared attributes **/ |
925 | label = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, | 925 | label = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, |
926 | sizeof(ticket->rnd)); | 926 | sizeof(ticket->rnd)); |
@@ -1179,7 +1179,7 @@ lookup_authz_cb (void *cls, | |||
1179 | * @return handle to the operation | 1179 | * @return handle to the operation |
1180 | */ | 1180 | */ |
1181 | struct RECLAIM_TICKETS_ConsumeHandle * | 1181 | struct RECLAIM_TICKETS_ConsumeHandle * |
1182 | RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | 1182 | RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_PrivateKey *id, |
1183 | const struct GNUNET_RECLAIM_Ticket *ticket, | 1183 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1184 | RECLAIM_TICKETS_ConsumeCallback cb, | 1184 | RECLAIM_TICKETS_ConsumeCallback cb, |
1185 | void *cb_cls) | 1185 | void *cb_cls) |
@@ -1190,7 +1190,7 @@ RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | |||
1190 | cth = GNUNET_new (struct RECLAIM_TICKETS_ConsumeHandle); | 1190 | cth = GNUNET_new (struct RECLAIM_TICKETS_ConsumeHandle); |
1191 | 1191 | ||
1192 | cth->identity = *id; | 1192 | cth->identity = *id; |
1193 | GNUNET_IDENTITY_key_get_public (&cth->identity, &cth->identity_pub); | 1193 | GNUNET_CRYPTO_key_get_public (&cth->identity, &cth->identity_pub); |
1194 | cth->attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); | 1194 | cth->attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); |
1195 | cth->presentations = GNUNET_new (struct GNUNET_RECLAIM_PresentationList); | 1195 | cth->presentations = GNUNET_new (struct GNUNET_RECLAIM_PresentationList); |
1196 | cth->ticket = *ticket; | 1196 | cth->ticket = *ticket; |
@@ -1199,7 +1199,7 @@ RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | |||
1199 | label = | 1199 | label = |
1200 | GNUNET_STRINGS_data_to_string_alloc (&cth->ticket.rnd, | 1200 | GNUNET_STRINGS_data_to_string_alloc (&cth->ticket.rnd, |
1201 | sizeof(cth->ticket.rnd)); | 1201 | sizeof(cth->ticket.rnd)); |
1202 | char *str = GNUNET_IDENTITY_public_key_to_string (&cth->ticket.identity); | 1202 | char *str = GNUNET_CRYPTO_public_key_to_string (&cth->ticket.identity); |
1203 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1203 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1204 | "Looking for AuthZ info under %s in %s\n", | 1204 | "Looking for AuthZ info under %s in %s\n", |
1205 | label, str); | 1205 | label, str); |
@@ -1397,10 +1397,10 @@ issue_ticket (struct TicketIssueHandle *ih) | |||
1397 | label = | 1397 | label = |
1398 | GNUNET_STRINGS_data_to_string_alloc (&ih->ticket.rnd, | 1398 | GNUNET_STRINGS_data_to_string_alloc (&ih->ticket.rnd, |
1399 | sizeof(ih->ticket.rnd)); | 1399 | sizeof(ih->ticket.rnd)); |
1400 | struct GNUNET_IDENTITY_PublicKey pub; | 1400 | struct GNUNET_CRYPTO_PublicKey pub; |
1401 | GNUNET_IDENTITY_key_get_public (&ih->identity, | 1401 | GNUNET_CRYPTO_key_get_public (&ih->identity, |
1402 | &pub); | 1402 | &pub); |
1403 | char *str = GNUNET_IDENTITY_public_key_to_string (&pub); | 1403 | char *str = GNUNET_CRYPTO_public_key_to_string (&pub); |
1404 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1404 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1405 | "Storing AuthZ information under %s in %s\n", label, str); | 1405 | "Storing AuthZ information under %s in %s\n", label, str); |
1406 | GNUNET_free (str); | 1406 | GNUNET_free (str); |
@@ -1466,7 +1466,7 @@ filter_tickets_error_cb (void *cls) | |||
1466 | */ | 1466 | */ |
1467 | static void | 1467 | static void |
1468 | filter_tickets_cb (void *cls, | 1468 | filter_tickets_cb (void *cls, |
1469 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1469 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1470 | const char *label, | 1470 | const char *label, |
1471 | unsigned int rd_count, | 1471 | unsigned int rd_count, |
1472 | const struct GNUNET_GNSRECORD_Data *rd) | 1472 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1512,11 +1512,11 @@ filter_tickets_cb (void *cls, | |||
1512 | continue; | 1512 | continue; |
1513 | } | 1513 | } |
1514 | // cmp audience | 1514 | // cmp audience |
1515 | // FIXME this is ugly, GNUNET_IDENTITY_PublicKey cannot be compared | 1515 | // FIXME this is ugly, GNUNET_CRYPTO_PublicKey cannot be compared |
1516 | // like this | 1516 | // like this |
1517 | if (0 == memcmp (&tih->ticket.audience, | 1517 | if (0 == memcmp (&tih->ticket.audience, |
1518 | &ticket.audience, | 1518 | &ticket.audience, |
1519 | sizeof(struct GNUNET_IDENTITY_PublicKey))) | 1519 | sizeof(struct GNUNET_CRYPTO_PublicKey))) |
1520 | { | 1520 | { |
1521 | tih->ticket = ticket; | 1521 | tih->ticket = ticket; |
1522 | ticket_found = GNUNET_YES; | 1522 | ticket_found = GNUNET_YES; |
@@ -1631,7 +1631,7 @@ filter_tickets_finished_cb (void *cls) | |||
1631 | { | 1631 | { |
1632 | struct TicketIssueHandle *tih = cls; | 1632 | struct TicketIssueHandle *tih = cls; |
1633 | 1633 | ||
1634 | GNUNET_IDENTITY_key_get_public (&tih->identity, &tih->ticket.identity); | 1634 | GNUNET_CRYPTO_key_get_public (&tih->identity, &tih->ticket.identity); |
1635 | GNUNET_RECLAIM_id_generate (&tih->ticket.rnd); | 1635 | GNUNET_RECLAIM_id_generate (&tih->ticket.rnd); |
1636 | issue_ticket (tih); | 1636 | issue_ticket (tih); |
1637 | } | 1637 | } |
@@ -1649,9 +1649,9 @@ filter_tickets_finished_cb (void *cls) | |||
1649 | * FIXME: Return handle?? | 1649 | * FIXME: Return handle?? |
1650 | */ | 1650 | */ |
1651 | void | 1651 | void |
1652 | RECLAIM_TICKETS_issue (const struct GNUNET_IDENTITY_PrivateKey *identity, | 1652 | RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_PrivateKey *identity, |
1653 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 1653 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
1654 | const struct GNUNET_IDENTITY_PublicKey *audience, | 1654 | const struct GNUNET_CRYPTO_PublicKey *audience, |
1655 | RECLAIM_TICKETS_TicketResult cb, | 1655 | RECLAIM_TICKETS_TicketResult cb, |
1656 | void *cb_cls) | 1656 | void *cb_cls) |
1657 | { | 1657 | { |
@@ -1709,7 +1709,7 @@ cleanup_iter (struct RECLAIM_TICKETS_Iterator *iter) | |||
1709 | */ | 1709 | */ |
1710 | static void | 1710 | static void |
1711 | collect_tickets_cb (void *cls, | 1711 | collect_tickets_cb (void *cls, |
1712 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1712 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1713 | const char *label, | 1713 | const char *label, |
1714 | unsigned int rd_count, | 1714 | unsigned int rd_count, |
1715 | const struct GNUNET_GNSRECORD_Data *rd) | 1715 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1807,7 +1807,7 @@ RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter) | |||
1807 | */ | 1807 | */ |
1808 | struct RECLAIM_TICKETS_Iterator * | 1808 | struct RECLAIM_TICKETS_Iterator * |
1809 | RECLAIM_TICKETS_iteration_start ( | 1809 | RECLAIM_TICKETS_iteration_start ( |
1810 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1810 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1811 | RECLAIM_TICKETS_TicketIter cb, | 1811 | RECLAIM_TICKETS_TicketIter cb, |
1812 | void *cb_cls) | 1812 | void *cb_cls) |
1813 | { | 1813 | { |