#include "platform.h"
#include <inttypes.h>
#include "gnunet_util_lib.h"
#include "gnunet_identity_service.h"
#include "gnunet_reclaim_service.h"
Go to the source code of this file.
Functions | |
static void | do_cleanup (void *cls) |
static void | ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *iss_ticket, const struct GNUNET_RECLAIM_PresentationList *presentations) |
static void | store_cont (void *cls, int32_t success, const char *emsg) |
static void | process_attrs (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr, const struct GNUNET_RECLAIM_Presentation *presentation) |
static void | ticket_iter_err (void *cls) |
static void | ticket_iter_fin (void *cls) |
static void | ticket_iter (void *cls, const struct GNUNET_RECLAIM_Ticket *tkt, const char *rp_uri) |
static void | iter_error (void *cls) |
static void | timeout_task (void *cls) |
static void | process_rvk (void *cls, int success, const char *msg) |
static void | process_delete (void *cls, int success, const char *msg) |
static void | iter_finished (void *cls) |
static void | iter_cb (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr) |
static void | cred_iter_finished (void *cls) |
static void | cred_iter_cb (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Credential *cred) |
static void | start_process () |
static void | ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *name) |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
int | main (int argc, char *const argv[]) |
|
static |
Definition at line 202 of file gnunet-reclaim.c.
References attr_iterator, attr_list, attr_to_delete, cleanup_task, cred_iterator, credential_type, GNUNET_free, GNUNET_IDENTITY_disconnect(), GNUNET_RECLAIM_attribute_list_destroy(), GNUNET_RECLAIM_cancel(), GNUNET_RECLAIM_disconnect(), GNUNET_RECLAIM_get_attributes_stop(), GNUNET_RECLAIM_get_credentials_stop(), GNUNET_RECLAIM_ticket_iteration_stop(), GNUNET_SCHEDULER_cancel(), identity_handle, reclaim_handle, reclaim_op, ticket_iterator, and timeout.
Referenced by cred_iter_finished(), iter_error(), iter_finished(), process_attrs(), process_delete(), process_rvk(), start_process(), store_cont(), ticket_issue_cb(), ticket_iter_err(), ticket_iter_fin(), and timeout_task().
|
static |
Definition at line 232 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_RECLAIM_Ticket::gns_name, GNUNET_SCHEDULER_add_now(), and reclaim_op.
Referenced by iter_finished().
|
static |
Definition at line 246 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), GNUNET_SYSERR, and reclaim_op.
Referenced by cred_iter_finished(), and iter_finished().
|
static |
Definition at line 258 of file gnunet-reclaim.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, cleanup_task, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, do_cleanup(), GNUNET_RECLAIM_Attribute::flag, GNUNET_free, GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_RECLAIM_presentation_get_attributes(), GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_data_to_string_alloc(), id, GNUNET_RECLAIM_Attribute::id, identity, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_AttributeListEntry::next, reclaim_op, ret, and GNUNET_RECLAIM_Attribute::type.
Referenced by iter_finished().
|
static |
Definition at line 318 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), and ticket_iterator.
Referenced by start_process().
|
static |
Definition at line 327 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), and ticket_iterator.
Referenced by start_process().
|
static |
Definition at line 335 of file gnunet-reclaim.c.
References GNUNET_RECLAIM_Ticket::gns_name, GNUNET_RECLAIM_ticket_iteration_next(), and ticket_iterator.
Referenced by start_process().
|
static |
Definition at line 344 of file gnunet-reclaim.c.
References attr_iterator, cleanup_task, cred_iterator, do_cleanup(), and GNUNET_SCHEDULER_add_now().
Referenced by cred_iter_finished(), and start_process().
|
static |
Definition at line 355 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), ret, and timeout.
Referenced by iter_finished().
|
static |
Definition at line 366 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_OK, GNUNET_SCHEDULER_add_now(), reclaim_op, and ret.
Referenced by iter_finished().
|
static |
Definition at line 379 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_OK, GNUNET_SCHEDULER_add_now(), reclaim_op, and ret.
Referenced by iter_finished().
|
static |
Definition at line 392 of file gnunet-reclaim.c.
References attr_delete, attr_iterator, attr_list, attr_name, attr_to_delete, attr_value, GNUNET_RECLAIM_AttributeListEntry::attribute, claim, cleanup_task, consume_ticket, credential, GNUNET_RECLAIM_Attribute::credential, credential_id, data, GNUNET_RECLAIM_Attribute::data, data_size, GNUNET_RECLAIM_Attribute::data_size, do_cleanup(), ex_rp_uri, exp_interval, GNUNET_assert, GNUNET_free, GNUNET_RECLAIM_attribute_delete(), GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_attribute_store(), GNUNET_RECLAIM_attribute_string_to_value(), GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, GNUNET_RECLAIM_attribute_typename_to_number(), GNUNET_RECLAIM_ticket_consume(), GNUNET_RECLAIM_ticket_issue(), GNUNET_RECLAIM_ticket_revoke(), GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_strdup, GNUNET_SYSERR, GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_SECONDS, issue_attrs, list, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_AttributeListEntry::next, pkey, process_attrs(), process_delete(), process_rvk(), reclaim_handle, reclaim_op, revoke_ticket, store_cont(), ticket, ticket_issue_cb(), timeout, timeout_task(), type, GNUNET_RECLAIM_Attribute::type, and type_str.
Referenced by cred_iter_finished().
|
static |
Definition at line 535 of file gnunet-reclaim.c.
References attr_delete, attr_iterator, attr_list, attr_name, attr_to_delete, GNUNET_RECLAIM_AttributeListEntry::attribute, claim, GNUNET_RECLAIM_Attribute::credential, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_RECLAIM_Attribute::flag, GNUNET_CONTAINER_DLL_insert, GNUNET_free, GNUNET_new, GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_RECLAIM_get_attributes_next(), GNUNET_RECLAIM_id_is_zero, GNUNET_strdup, GNUNET_STRINGS_data_to_string_alloc(), GNUNET_YES, id, GNUNET_RECLAIM_Attribute::id, issue_attrs, list, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_AttributeList::list_tail, GNUNET_RECLAIM_Attribute::name, and GNUNET_RECLAIM_Attribute::type.
Referenced by cred_iter_finished().
|
static |
Definition at line 636 of file gnunet-reclaim.c.
References attr_iterator, attr_value, cleanup_task, cred, cred_iterator, credential_name, credential_type, do_cleanup(), exp_interval, GNUNET_RECLAIM_credential_new(), GNUNET_RECLAIM_credential_store(), GNUNET_RECLAIM_credential_typename_to_number(), GNUNET_RECLAIM_get_attributes_start(), GNUNET_SCHEDULER_add_now(), iter_cb(), iter_error(), iter_finished(), list_credentials, pkey, reclaim_handle, reclaim_op, and store_cont().
Referenced by start_process().
|
static |
Definition at line 678 of file gnunet-reclaim.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, cred, cred_iterator, credential, credential_exists, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_free, GNUNET_RECLAIM_attribute_list_destroy(), GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_RECLAIM_credential_get_attributes(), GNUNET_RECLAIM_credential_number_to_typename(), GNUNET_RECLAIM_credential_value_to_string(), GNUNET_RECLAIM_get_credentials_next(), GNUNET_RECLAIM_id_is_equal, GNUNET_STRINGS_data_to_string_alloc(), GNUNET_YES, id, list_credentials, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_AttributeListEntry::next, and GNUNET_RECLAIM_Attribute::type.
Referenced by start_process().
|
static |
Definition at line 729 of file gnunet-reclaim.c.
References attr_list, claim, cleanup_task, consume_ticket, cred_iter_cb(), cred_iter_finished(), cred_iterator, credential, credential_exists, credential_id, credential_type, do_cleanup(), ego_name, GNUNET_RECLAIM_Ticket::gns_name, GNUNET_new, GNUNET_NO, GNUNET_RECLAIM_get_credentials_start(), GNUNET_RECLAIM_ID_ZERO, GNUNET_RECLAIM_ticket_iteration_start(), GNUNET_SCHEDULER_add_now(), GNUNET_strdup, GNUNET_STRINGS_string_to_data(), iter_error(), list_tickets, pkey, reclaim_handle, revoke_ticket, ticket, ticket_iter(), ticket_iter_err(), ticket_iter_fin(), and ticket_iterator.
Referenced by ego_cb().
|
static |
Definition at line 783 of file gnunet-reclaim.c.
References ego_name, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_NO, GNUNET_YES, init, name, pkey, and start_process().
Referenced by run().
|
static |
Definition at line 804 of file gnunet-reclaim.c.
References _, attr_name, attr_value, ego_cb(), ego_name, GNUNET_IDENTITY_connect(), GNUNET_RECLAIM_connect(), identity_handle, issue_attrs, reclaim_handle, ret, and rp.
Referenced by main().
int main | ( | int | argc, |
char *const | argv[] | ||
) |
Definition at line 838 of file gnunet-reclaim.c.
References _, attr_delete, attr_name, attr_value, consume_ticket, credential_id, credential_name, credential_type, ego_name, ex_rp_uri, exp_interval, gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_string(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), GNUNET_TIME_UNIT_HOURS, issue_attrs, list, list_credentials, list_tickets, options, ret, revoke_ticket, rp, run(), and type_str.
|
static |
return value
Definition at line 37 of file gnunet-reclaim.c.
Referenced by main(), process_attrs(), process_delete(), process_rvk(), run(), and timeout_task().
|
static |
List attribute flag.
Definition at line 42 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), and main().
|
static |
List credentials flag.
Definition at line 47 of file gnunet-reclaim.c.
Referenced by cred_iter_cb(), cred_iter_finished(), and main().
|
static |
Credential ID string.
Definition at line 52 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), and start_process().
|
static |
The expected RP URI.
Definition at line 57 of file gnunet-reclaim.c.
Referenced by iter_finished(), and main().
|
static |
Credential ID.
Definition at line 62 of file gnunet-reclaim.c.
Referenced by attribute_list_merge(), cred_iter_cb(), GNUNET_RECLAIM_attribute_list_add(), GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_credential_deserialize(), GNUNET_RECLAIM_credential_get_attributes(), GNUNET_RECLAIM_credential_get_expiration(), GNUNET_RECLAIM_credential_get_issuer(), GNUNET_RECLAIM_credential_serialize(), GNUNET_RECLAIM_credential_serialize_get_size(), GNUNET_RECLAIM_credential_store(), iter_finished(), pabc_create_presentation(), rvk_move_attr_cb(), and start_process().
|
static |
Credential name.
Definition at line 67 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), and main().
|
static |
Credential type.
Definition at line 72 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), main(), and start_process().
|
static |
Credential exists.
Definition at line 77 of file gnunet-reclaim.c.
Referenced by cred_iter_cb(), and start_process().
|
static |
Relying party.
Definition at line 82 of file gnunet-reclaim.c.
Referenced by do_shutdown(), for_all_records(), get_latest(), get_rp_key(), GNUNET_CURL_gnunet_rc_create_with_parser(), GNUNET_CURL_perform2(), GNUNET_RECLAIM_ticket_issue(), GSF_plan_add_(), GSF_plan_notify_peer_disconnect_(), GSF_plan_notify_request_done_(), handle_issue_ticket_message(), main(), merge_pr(), plan(), RECLAIM_TICKETS_issue(), resolver_lookup_get_next_label(), run(), schedule_peer_transmission(), and sign_pow_identity().
|
static |
The attribute.
Definition at line 87 of file gnunet-reclaim.c.
Referenced by attr_in_claims_request(), attr_in_idtoken_request(), attr_in_userinfo_request(), GNUNET_RECLAIM_attribute_list_add(), GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_credential_new(), iter_cb(), iter_finished(), main(), and run().
|
static |
Attribute value.
Definition at line 92 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), iter_finished(), main(), and run().
|
static |
Attributes to issue.
Definition at line 97 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), main(), and run().
|
static |
Ticket to consume.
Definition at line 102 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), and start_process().
|
static |
Attribute type.
Definition at line 107 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), parse_attr(), and parse_credential().
|
static |
Ticket to revoke.
Definition at line 112 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), and start_process().
|
static |
Ticket listing.
Definition at line 117 of file gnunet-reclaim.c.
Referenced by main(), and start_process().
|
static |
Ego name.
Definition at line 122 of file gnunet-reclaim.c.
Referenced by ego_cb(), main(), run(), and start_process().
|
static |
Identity handle.
Definition at line 127 of file gnunet-reclaim.c.
Referenced by do_cleanup(), and run().
|
static |
reclaim handle
Definition at line 132 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), iter_finished(), run(), and start_process().
|
static |
reclaim operation
Definition at line 137 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), iter_finished(), process_attrs(), process_delete(), process_rvk(), store_cont(), and ticket_issue_cb().
|
static |
Attribute iterator.
Definition at line 142 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), iter_cb(), iter_error(), and iter_finished().
|
static |
Credential iterator.
Definition at line 147 of file gnunet-reclaim.c.
Referenced by cred_iter_cb(), cred_iter_finished(), do_cleanup(), iter_error(), and start_process().
|
static |
Ticket iterator.
Definition at line 153 of file gnunet-reclaim.c.
Referenced by do_cleanup(), start_process(), ticket_iter(), ticket_iter_err(), and ticket_iter_fin().
|
static |
ego private key
Definition at line 159 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), ego_cb(), iter_finished(), and start_process().
|
static |
Ticket to consume.
Definition at line 164 of file gnunet-reclaim.c.
Referenced by clean_ticket(), collect_tickets_cb(), consume_fail(), consume_ticket_cont(), filter_tickets_cb(), GNUNET_RECLAIM_JSON_spec_ticket(), GNUNET_RECLAIM_ticket_consume(), GNUNET_RECLAIM_ticket_revoke(), handle_consume_ticket_message(), handle_revoke_ticket_message(), handle_ticket_result(), issue_ticket_result_cb(), iter_finished(), OIDC_access_token_new(), OIDC_access_token_parse(), OIDC_build_authz_code(), OIDC_parse_authz_code(), oidc_ticket_issue_cb(), parse_ticket(), RECLAIM_TICKETS_consume(), RECLAIM_TICKETS_revoke(), revoke_ticket_cont(), send_ticket_result(), start_process(), ticket_collect(), ticket_iter_cb(), token_endpoint(), and userinfo_endpoint().
|
static |
Attribute list.
Definition at line 169 of file gnunet-reclaim.c.
Referenced by do_cleanup(), iter_cb(), iter_finished(), and start_process().
|
static |
Attribute expiration interval.
Definition at line 174 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), GNUNET_RECLAIM_attribute_store(), GNUNET_RECLAIM_credential_store(), iter_finished(), and main().
|
static |
Timeout task.
Definition at line 179 of file gnunet-reclaim.c.
Referenced by do_cleanup(), iter_finished(), and timeout_task().
|
static |
Cleanup task.
Definition at line 184 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), iter_error(), iter_finished(), process_attrs(), process_delete(), process_rvk(), start_process(), store_cont(), ticket_issue_cb(), ticket_iter_err(), ticket_iter_fin(), and timeout_task().
struct GNUNET_RECLAIM_Attribute* claim |
Claim to store.
Definition at line 189 of file gnunet-reclaim.c.
Referenced by is_claim_in_address_scope(), iter_cb(), iter_finished(), rvk_move_attr_cb(), and start_process().
|
static |
Claim to delete.
Definition at line 194 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), and main().
|
static |
Claim object to delete.
Definition at line 199 of file gnunet-reclaim.c.
Referenced by do_cleanup(), iter_cb(), and iter_finished().
|
static |
Definition at line 780 of file gnunet-reclaim.c.
Referenced by ego_cb().