Identity Provider utility. More...
#include "platform.h"
#include <inttypes.h>
#include "gnunet_util_lib.h"
#include "gnunet_identity_service.h"
#include "gnunet_namestore_service.h"
#include "gnunet_reclaim_service.h"
#include "gnunet_signatures.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 *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_IDENTITY_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 *ticket) |
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_IDENTITY_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_IDENTITY_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[]) |
Identity Provider utility.
Definition in file gnunet-reclaim.c.
|
static |
Definition at line 203 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 233 of file gnunet-reclaim.c.
References cleanup_task, do_cleanup(), GNUNET_free, GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_data_to_string_alloc(), reclaim_op, and ticket.
Referenced by iter_finished().
|
static |
Definition at line 254 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 266 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 326 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 cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), and ticket_iterator.
Referenced by start_process().
|
static |
Definition at line 343 of file gnunet-reclaim.c.
References GNUNET_RECLAIM_Ticket::audience, GNUNET_free, GNUNET_RECLAIM_ticket_iteration_next(), GNUNET_STRINGS_data_to_string_alloc(), GNUNET_RECLAIM_Ticket::rnd, ticket, and ticket_iterator.
Referenced by start_process().
|
static |
Definition at line 366 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 377 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 388 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 401 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 414 of file gnunet-reclaim.c.
References attr_delete, attr_iterator, attr_list, attr_name, attr_to_delete, attr_value, claim, cleanup_task, consume_ticket, GNUNET_RECLAIM_Attribute::credential, credential, credential_id, GNUNET_RECLAIM_Attribute::data, data, data_size, GNUNET_RECLAIM_Attribute::data_size, do_cleanup(), 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_SYSERR, GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_SECONDS, issue_attrs, list, pkey, process_attrs(), process_delete(), process_rvk(), reclaim_handle, reclaim_op, revoke_ticket, rp_key, store_cont(), ticket, ticket_issue_cb(), timeout, timeout_task(), GNUNET_RECLAIM_Attribute::type, type, and type_str.
Referenced by cred_iter_finished().
|
static |
Definition at line 516 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 617 of file gnunet-reclaim.c.
References attr_iterator, attr_value, cleanup_task, cred_iterator, credential, 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 659 of file gnunet-reclaim.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, cred_iterator, credential, credential_exists, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Credential::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_RECLAIM_Credential::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, GNUNET_RECLAIM_Credential::id, list_credentials, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_Credential::name, GNUNET_RECLAIM_AttributeListEntry::next, GNUNET_RECLAIM_Attribute::type, and GNUNET_RECLAIM_Credential::type.
Referenced by start_process().
|
static |
Definition at line 710 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_IDENTITY_public_key_from_string(), GNUNET_new, GNUNET_NO, GNUNET_OK, 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, rp, rp_key, ticket, ticket_iter(), ticket_iter_err(), ticket_iter_fin(), and ticket_iterator.
Referenced by ego_cb().
|
static |
Definition at line 775 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 796 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 830 of file gnunet-reclaim.c.
References _, attr_delete, attr_name, attr_value, consume_ticket, credential_id, credential_name, credential_type, ego_name, exp_interval, gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_string(), GNUNET_OK, 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 38 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 43 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), and main().
|
static |
List credentials flag.
Definition at line 48 of file gnunet-reclaim.c.
Referenced by cred_iter_cb(), cred_iter_finished(), and main().
|
static |
Credential ID string.
Definition at line 53 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), and start_process().
|
static |
Credential ID.
Definition at line 53 of file gnunet-reclaim.c.
Referenced by attribute_list_merge(), cred_iter_cb(), cred_iter_finished(), 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 63 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), and main().
|
static |
Credential type.
Definition at line 68 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), main(), and start_process().
|
static |
Credential exists.
Definition at line 73 of file gnunet-reclaim.c.
Referenced by cred_iter_cb(), and start_process().
|
static |
Relying party.
Definition at line 78 of file gnunet-reclaim.c.
Referenced by do_shutdown(), for_all_records(), free_peer(), GAS_preference_get_by_peer(), 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(), resolver_lookup_get_next_label(), run(), schedule_peer_transmission(), start_process(), and update_relative_values_for_peer().
|
static |
The attribute.
Definition at line 83 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 88 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), iter_finished(), main(), and run().
|
static |
Attributes to issue.
Definition at line 93 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), main(), and run().
|
static |
Ticket to consume.
Definition at line 98 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), and start_process().
|
static |
Attribute type.
Definition at line 103 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), parse_attr(), parse_credential(), and parse_jwt().
|
static |
Ticket to revoke.
Definition at line 108 of file gnunet-reclaim.c.
Referenced by iter_finished(), main(), and start_process().
|
static |
Ticket listing.
Definition at line 113 of file gnunet-reclaim.c.
Referenced by main(), and start_process().
|
static |
Ego name.
Definition at line 118 of file gnunet-reclaim.c.
Referenced by ego_cb(), main(), run(), and start_process().
|
static |
Identity handle.
Definition at line 123 of file gnunet-reclaim.c.
Referenced by do_cleanup(), and run().
|
static |
reclaim handle
Definition at line 128 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), iter_finished(), run(), and start_process().
|
static |
reclaim operation
Definition at line 133 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 138 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 143 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 149 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 155 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), ego_cb(), iter_finished(), and start_process().
|
static |
rp public key
Definition at line 155 of file gnunet-reclaim.c.
Referenced by iter_finished(), and start_process().
|
static |
Ticket to consume.
Definition at line 155 of file gnunet-reclaim.c.
Referenced by check_code_challenge(), check_ticket_iteration_start(), clean_ticket(), collect_tickets_cb(), consume_fail(), consume_ticket_cont(), filter_tickets_cb(), 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_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_issue_cb(), ticket_iter(), token_endpoint(), and userinfo_endpoint().
|
static |
Attribute list.
Definition at line 170 of file gnunet-reclaim.c.
Referenced by do_cleanup(), iter_cb(), iter_finished(), and start_process().
|
static |
Attribute expiration interval.
Definition at line 170 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 180 of file gnunet-reclaim.c.
Referenced by do_cleanup(), iter_finished(), and timeout_task().
|
static |
Cleanup task.
Definition at line 185 of file gnunet-reclaim.c.
Referenced by cred_iter_finished(), do_cleanup(), GST_neighbour_get_connection_cancel(), 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 190 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), parse_jwt(), rvk_move_attr_cb(), and start_process().
|
static |
Claim to delete.
Definition at line 195 of file gnunet-reclaim.c.
Referenced by iter_cb(), iter_finished(), and main().
|
static |
Claim object to delete.
Definition at line 200 of file gnunet-reclaim.c.
Referenced by do_cleanup(), iter_cb(), and iter_finished().
|
static |
Definition at line 772 of file gnunet-reclaim.c.
Referenced by ego_cb().