GNUnet 0.22.2
gnunet-reclaim.c File Reference
#include "platform.h"
#include <inttypes.h>
#include "gnunet_util_lib.h"
#include "gnunet_identity_service.h"
#include "gnunet_reclaim_service.h"
Include dependency graph for gnunet-reclaim.c:

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[])
 

Variables

static int ret
 return value More...
 
static int list
 List attribute flag. More...
 
static int list_credentials
 List credentials flag. More...
 
static char * credential_id
 Credential ID string. More...
 
static char * ex_rp_uri
 The expected RP URI. More...
 
static struct GNUNET_RECLAIM_Identifier credential
 Credential ID. More...
 
static char * credential_name
 Credential name. More...
 
static char * credential_type
 Credential type. More...
 
static int credential_exists
 Credential exists. More...
 
static char * rp
 Relying party. More...
 
static char * attr_name
 The attribute. More...
 
static char * attr_value
 Attribute value. More...
 
static char * issue_attrs
 Attributes to issue. More...
 
static char * consume_ticket
 Ticket to consume. More...
 
static char * type_str
 Attribute type. More...
 
static char * revoke_ticket
 Ticket to revoke. More...
 
static int list_tickets
 Ticket listing. More...
 
static char * ego_name
 Ego name. More...
 
static struct GNUNET_IDENTITY_Handleidentity_handle
 Identity handle. More...
 
static struct GNUNET_RECLAIM_Handlereclaim_handle
 reclaim handle More...
 
static struct GNUNET_RECLAIM_Operationreclaim_op
 reclaim operation More...
 
static struct GNUNET_RECLAIM_AttributeIteratorattr_iterator
 Attribute iterator. More...
 
static struct GNUNET_RECLAIM_CredentialIteratorcred_iterator
 Credential iterator. More...
 
static struct GNUNET_RECLAIM_TicketIteratorticket_iterator
 Ticket iterator. More...
 
static const struct GNUNET_CRYPTO_PrivateKeypkey
 ego private key More...
 
static struct GNUNET_RECLAIM_Ticket ticket
 Ticket to consume. More...
 
static struct GNUNET_RECLAIM_AttributeListattr_list
 Attribute list. More...
 
static struct GNUNET_TIME_Relative exp_interval
 Attribute expiration interval. More...
 
static struct GNUNET_SCHEDULER_Tasktimeout
 Timeout task. More...
 
static struct GNUNET_SCHEDULER_Taskcleanup_task
 Cleanup task. More...
 
struct GNUNET_RECLAIM_Attributeclaim
 Claim to store. More...
 
static char * attr_delete
 Claim to delete. More...
 
static struct GNUNET_RECLAIM_Attributeattr_to_delete
 Claim object to delete. More...
 
static int init = GNUNET_YES
 

Function Documentation

◆ do_cleanup()

static void do_cleanup ( void *  cls)
static

Definition at line 202 of file gnunet-reclaim.c.

203{
204 cleanup_task = NULL;
205 if (NULL != timeout)
207 if (NULL != reclaim_op)
209 if (NULL != attr_iterator)
211 if (NULL != cred_iterator)
213 if (NULL != ticket_iterator)
215 if (NULL != reclaim_handle)
217 if (NULL != identity_handle)
219 if (NULL != attr_list)
220 {
222 attr_list = NULL;
223 }
224 if (NULL != attr_to_delete)
226 if (NULL == credential_type)
228}
static struct GNUNET_RECLAIM_Handle * reclaim_handle
reclaim handle
static struct GNUNET_SCHEDULER_Task * timeout
Timeout task.
static char * credential_type
Credential type.
static struct GNUNET_RECLAIM_Attribute * attr_to_delete
Claim object to delete.
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
static struct GNUNET_RECLAIM_AttributeIterator * attr_iterator
Attribute iterator.
static struct GNUNET_RECLAIM_TicketIterator * ticket_iterator
Ticket iterator.
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_IDENTITY_Handle * identity_handle
Identity handle.
static struct GNUNET_RECLAIM_AttributeList * attr_list
Attribute list.
static struct GNUNET_RECLAIM_CredentialIterator * cred_iterator
Credential iterator.
void GNUNET_IDENTITY_disconnect(struct GNUNET_IDENTITY_Handle *h)
Disconnect from identity service.
Definition: identity_api.c:732
#define GNUNET_free(ptr)
Wrapper around free.
void GNUNET_RECLAIM_attribute_list_destroy(struct GNUNET_RECLAIM_AttributeList *attrs)
Destroy claim list.
void GNUNET_RECLAIM_disconnect(struct GNUNET_RECLAIM_Handle *h)
Disconnect from identity provider service.
Definition: reclaim_api.c:1150
void GNUNET_RECLAIM_cancel(struct GNUNET_RECLAIM_Operation *op)
Cancel an identity provider operation.
Definition: reclaim_api.c:1135
void GNUNET_RECLAIM_get_attributes_stop(struct GNUNET_RECLAIM_AttributeIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1398
void GNUNET_RECLAIM_get_credentials_stop(struct GNUNET_RECLAIM_CredentialIterator *ait)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1477
void GNUNET_RECLAIM_ticket_iteration_stop(struct GNUNET_RECLAIM_TicketIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1659
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:980

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ticket_issue_cb()

static void ticket_issue_cb ( void *  cls,
const struct GNUNET_RECLAIM_Ticket iss_ticket,
const struct GNUNET_RECLAIM_PresentationList presentations 
)
static

Definition at line 232 of file gnunet-reclaim.c.

235{
236 reclaim_op = NULL;
237 if (NULL != iss_ticket)
238 {
239 printf ("%s\n", iss_ticket->gns_name);
240 }
242}
static void do_cleanup(void *cls)
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1304
char gns_name[63 *2+2]
The ticket.

References cleanup_task, do_cleanup(), GNUNET_RECLAIM_Ticket::gns_name, GNUNET_SCHEDULER_add_now(), and reclaim_op.

Referenced by iter_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ store_cont()

static void store_cont ( void *  cls,
int32_t  success,
const char *  emsg 
)
static

Definition at line 246 of file gnunet-reclaim.c.

247{
248 reclaim_op = NULL;
249 if (GNUNET_SYSERR == success)
250 {
251 fprintf (stderr, "%s\n", emsg);
252 }
254}
@ GNUNET_SYSERR

References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), GNUNET_SYSERR, and reclaim_op.

Referenced by cred_iter_finished(), and iter_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_attrs()

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

Definition at line 258 of file gnunet-reclaim.c.

262{
263 char *value_str;
264 char *id;
265 const char *attr_type;
266
267 if (NULL == identity)
268 {
269 reclaim_op = NULL;
271 return;
272 }
273 if (NULL == attr)
274 {
275 ret = 1;
276 return;
277 }
279 id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(attr->id));
280 value_str = NULL;
281 if (NULL == presentation)
282 {
284 attr->data,
285 attr->data_size);
286 }
287 else
288 {
292
293 for (ale = al->list_head; NULL != ale; ale = ale->next)
294 {
295 if (0 != strncmp (attr->data, ale->attribute->name, attr->data_size))
296 continue;
297 value_str
299 ale->attribute->data,
300 ale->attribute->data_size);
301 break;
302 }
303 }
304 fprintf (stdout,
305 "Name: %s; Value: %s (%s); Flag %u; ID: %s %s\n",
306 attr->name,
307 (NULL != value_str) ? value_str : "???",
308 attr_type,
309 attr->flag,
310 id,
311 (NULL == presentation) ? "" : "(ATTESTED)");
312 GNUNET_free (value_str);
313 GNUNET_free (id);
314}
static struct GNUNET_IDENTITY_Handle * id
Handle to IDENTITY.
static struct GNUNET_IDENTITY_Handle * identity
Which namespace do we publish to? NULL if we do not publish to a namespace.
static int ret
return value
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_presentation_get_attributes(const struct GNUNET_RECLAIM_Presentation *cred)
char * GNUNET_RECLAIM_attribute_value_to_string(uint32_t type, const void *data, size_t data_size)
Convert the 'claim' of an attribute to a string.
const char * GNUNET_RECLAIM_attribute_number_to_typename(uint32_t type)
Convert a type number to the corresponding type string.
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:787
struct GNUNET_RECLAIM_Attribute * attribute
The attribute claim.
struct GNUNET_RECLAIM_AttributeListEntry * next
DLL.
A list of GNUNET_RECLAIM_Attribute structures.
struct GNUNET_RECLAIM_AttributeListEntry * list_head
List head.
const char * name
The name of the attribute.
struct GNUNET_RECLAIM_Identifier id
ID.
uint32_t type
Type of Claim.
const void * data
Binary value stored as attribute value.
size_t data_size
Number of bytes in data.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ticket_iter_err()

static void ticket_iter_err ( void *  cls)
static

Definition at line 318 of file gnunet-reclaim.c.

319{
320 ticket_iterator = NULL;
321 fprintf (stderr, "Failed to iterate over tickets\n");
323}

References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), and ticket_iterator.

Referenced by start_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ticket_iter_fin()

static void ticket_iter_fin ( void *  cls)
static

Definition at line 327 of file gnunet-reclaim.c.

328{
329 ticket_iterator = NULL;
331}

References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), and ticket_iterator.

Referenced by start_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ticket_iter()

static void ticket_iter ( void *  cls,
const struct GNUNET_RECLAIM_Ticket tkt,
const char *  rp_uri 
)
static

Definition at line 335 of file gnunet-reclaim.c.

337{
338 fprintf (stdout, "Ticket: %s | RP URI: %s\n", tkt->gns_name, rp_uri);
340}
void GNUNET_RECLAIM_ticket_iteration_next(struct GNUNET_RECLAIM_TicketIterator *it)
Calls the ticket processor specified in GNUNET_RECLAIM_ticket_iteration_start for the next record.
Definition: reclaim_api.c:1639

References GNUNET_RECLAIM_Ticket::gns_name, GNUNET_RECLAIM_ticket_iteration_next(), and ticket_iterator.

Referenced by start_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iter_error()

static void iter_error ( void *  cls)
static

Definition at line 344 of file gnunet-reclaim.c.

345{
346 attr_iterator = NULL;
347 cred_iterator = NULL;
348 fprintf (stderr, "Failed\n");
349
351}

References attr_iterator, cleanup_task, cred_iterator, do_cleanup(), and GNUNET_SCHEDULER_add_now().

Referenced by cred_iter_finished(), and start_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeout_task()

static void timeout_task ( void *  cls)
static

Definition at line 355 of file gnunet-reclaim.c.

356{
357 timeout = NULL;
358 ret = 1;
359 fprintf (stderr, "Timeout\n");
360 if (NULL == cleanup_task)
362}

References cleanup_task, do_cleanup(), GNUNET_SCHEDULER_add_now(), ret, and timeout.

Referenced by iter_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_rvk()

static void process_rvk ( void *  cls,
int  success,
const char *  msg 
)
static

Definition at line 366 of file gnunet-reclaim.c.

367{
368 reclaim_op = NULL;
369 if (GNUNET_OK != success)
370 {
371 fprintf (stderr, "Revocation failed.\n");
372 ret = 1;
373 }
375}
@ GNUNET_OK

References cleanup_task, do_cleanup(), GNUNET_OK, GNUNET_SCHEDULER_add_now(), reclaim_op, and ret.

Referenced by iter_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_delete()

static void process_delete ( void *  cls,
int  success,
const char *  msg 
)
static

Definition at line 379 of file gnunet-reclaim.c.

380{
381 reclaim_op = NULL;
382 if (GNUNET_OK != success)
383 {
384 fprintf (stderr, "Deletion failed.\n");
385 ret = 1;
386 }
388}

References cleanup_task, do_cleanup(), GNUNET_OK, GNUNET_SCHEDULER_add_now(), reclaim_op, and ret.

Referenced by iter_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iter_finished()

static void iter_finished ( void *  cls)
static

Definition at line 392 of file gnunet-reclaim.c.

393{
395 char *attrs_tmp;
396 char *attr_str;
397 char *data;
398 size_t data_size;
399 int type;
400
401 attr_iterator = NULL;
402 if (list)
403 {
405 return;
406 }
407
408 if (issue_attrs)
409 {
410 attrs_tmp = GNUNET_strdup (issue_attrs);
411 attr_str = strtok (attrs_tmp, ",");
412 while (NULL != attr_str)
413 {
414 le = attr_list->list_head;
415 while (le)
416 {
417 if (0 == strcasecmp (attr_str, le->attribute->name))
418 break;
419
420 le = le->next;
421 }
422
423 if (! le)
424 {
425 fprintf (stdout, "No such attribute ``%s''\n", attr_str);
426 break;
427 }
428 attr_str = strtok (NULL, ",");
429 }
430 GNUNET_free (attrs_tmp);
431 if (NULL != attr_str)
432 {
434 return;
435 }
436 if (NULL == ex_rp_uri)
437 {
438 fprintf (stdout, "No RP URI provided\n");
440 return;
441 }
443 pkey,
444 ex_rp_uri,
445 attr_list,
447 NULL);
448 return;
449 }
450 if (consume_ticket)
451 {
452 if (NULL == ex_rp_uri)
453 {
454 fprintf (stderr, "Expected an RP URI to consume ticket\n");
456 return;
457 }
459 &ticket,
460 ex_rp_uri,
462 NULL);
466 NULL);
467 return;
468 }
469 if (revoke_ticket)
470 {
472 pkey,
473 &ticket,
475 NULL);
476 return;
477 }
478 if (attr_delete)
479 {
480 if (NULL == attr_to_delete)
481 {
482 fprintf (stdout, "No such attribute ``%s''\n", attr_delete);
484 return;
485 }
487 pkey,
490 NULL);
491 return;
492 }
493 if (attr_name)
494 {
495 if (NULL == type_str)
497 else
499
503 (void **) &data,
504 &data_size));
505 if (NULL != claim)
506 {
507 claim->type = type;
508 claim->data = data;
510 }
511 else
512 {
513 claim =
515 }
516 if (NULL != credential_id)
517 {
519 }
521 pkey,
522 claim,
524 &store_cont,
525 NULL);
528 return;
529 }
531}
static char * data
The data to insert into the dht.
static uint32_t type
Type string converted to DNS type value.
static size_t data_size
Number of bytes in data.
static struct GNUNET_TIME_Relative exp_interval
Attribute expiration interval.
struct GNUNET_RECLAIM_Attribute * claim
Claim to store.
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 process_delete(void *cls, int success, const char *msg)
static char * attr_name
The attribute.
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
static const struct GNUNET_CRYPTO_PrivateKey * pkey
ego private key
static void timeout_task(void *cls)
static int list
List attribute flag.
static char * attr_value
Attribute value.
static char * issue_attrs
Attributes to issue.
static char * attr_delete
Claim to delete.
static void process_rvk(void *cls, int success, const char *msg)
static char * consume_ticket
Ticket to consume.
static struct GNUNET_RECLAIM_Identifier credential
Credential ID.
static char * revoke_ticket
Ticket to revoke.
static char * type_str
Attribute type.
static char * credential_id
Credential ID string.
static void store_cont(void *cls, int32_t success, const char *emsg)
static void ticket_issue_cb(void *cls, const struct GNUNET_RECLAIM_Ticket *iss_ticket, const struct GNUNET_RECLAIM_PresentationList *presentations)
static char * ex_rp_uri
The expected RP URI.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
int GNUNET_RECLAIM_attribute_string_to_value(uint32_t type, const char *s, void **data, size_t *data_size)
Convert human-readable version of a 'claim' of an attribute to the binary representation.
struct GNUNET_RECLAIM_Attribute * GNUNET_RECLAIM_attribute_new(const char *attr_name, const struct GNUNET_RECLAIM_Identifier *credential, uint32_t type, const void *data, size_t data_size)
Create a new attribute claim.
uint32_t GNUNET_RECLAIM_attribute_typename_to_number(const char *typename)
Convert a type name to the corresponding number.
@ GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING
String attribute.
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_consume(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri, GNUNET_RECLAIM_AttributeTicketResult cb, void *cb_cls)
Consumes an issued ticket.
Definition: reclaim_api.c:1546
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_revoke(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, const struct GNUNET_RECLAIM_Ticket *ticket, GNUNET_RECLAIM_ContinuationWithStatus cb, void *cb_cls)
Revoked an issued ticket.
Definition: reclaim_api.c:1690
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_attribute_store(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Attribute *attr, const struct GNUNET_TIME_Relative *exp_interval, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Store an attribute.
Definition: reclaim_api.c:1169
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_attribute_delete(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Attribute *attr, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Delete an attribute.
Definition: reclaim_api.c:1213
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_issue(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *iss, const char *rp_uri, const struct GNUNET_RECLAIM_AttributeList *attrs, GNUNET_RECLAIM_IssueTicketCallback cb, void *cb_cls)
Issues a ticket to a relying party.
Definition: reclaim_api.c:1497
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1277
#define GNUNET_TIME_UNIT_SECONDS
One second.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
Definition: time.c:486
struct GNUNET_RECLAIM_Identifier credential
Referenced ID of credential (may be GNUNET_RECLAIM_ID_ZERO if self-creded)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iter_cb()

static void iter_cb ( void *  cls,
const struct GNUNET_CRYPTO_PublicKey identity,
const struct GNUNET_RECLAIM_Attribute attr 
)
static

Definition at line 535 of file gnunet-reclaim.c.

538{
540 char *attrs_tmp;
541 char *attr_str;
542 char *label;
543 char *id;
544 const char *attr_type;
545
546 if ((NULL != attr_name) && (NULL == claim))
547 {
548 if (0 == strcasecmp (attr_name, attr->name))
549 {
551 &attr->credential,
552 attr->type,
553 attr->data,
554 attr->data_size);
555 claim->id = attr->id;
556 }
557 }
558 else if (issue_attrs)
559 {
560 attrs_tmp = GNUNET_strdup (issue_attrs);
561 attr_str = strtok (attrs_tmp, ",");
562 while (NULL != attr_str)
563 {
564 if (0 != strcasecmp (attr_str, attr->name))
565 {
566 attr_str = strtok (NULL, ",");
567 continue;
568 }
571 &attr->credential,
572 attr->type,
573 attr->data,
574 attr->data_size);
575 le->attribute->flag = attr->flag;
576 le->attribute->id = attr->id;
579 le);
580 break;
581 }
582 GNUNET_free (attrs_tmp);
583 }
584 else if (attr_delete && (NULL == attr_to_delete))
585 {
586 label = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(attr->id));
587 if (0 == strcasecmp (attr_delete, label))
588 {
590 &attr->credential,
591 attr->type,
592 attr->data,
593 attr->data_size);
594 attr_to_delete->id = attr->id;
595 }
596 GNUNET_free (label);
597 }
598 else if (list)
599 {
601 attr->data,
602 attr->data_size);
604 id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(attr->id));
606 {
607 fprintf (stdout,
608 "%s: ``%s'' (%s); ID: %s\n",
609 attr->name,
610 attr_str,
611 attr_type,
612 id);
613 }
614 else
615 {
616 char *cred_id =
618 sizeof(attr->credential));
619 fprintf (stdout,
620 "%s: ``%s'' in credential presentation `%s' (%s); ID: %s\n",
621 attr->name,
622 attr_str,
623 cred_id,
624 attr_type,
625 id);
626 GNUNET_free (cred_id);
627
628 }
629 GNUNET_free (id);
630 }
632}
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
@ GNUNET_YES
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_RECLAIM_id_is_zero(a)
void GNUNET_RECLAIM_get_attributes_next(struct GNUNET_RECLAIM_AttributeIterator *it)
Calls the record processor specified in GNUNET_RECLAIM_get_attributes_start for the next record.
Definition: reclaim_api.c:1384
struct GNUNET_RECLAIM_AttributeListEntry * list_tail
List tail.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cred_iter_finished()

static void cred_iter_finished ( void *  cls)
static

Definition at line 636 of file gnunet-reclaim.c.

637{
638 cred_iterator = NULL;
639
640 // Add new credential
641 if ((NULL != credential_name) &&
642 (NULL != attr_value))
643 {
648 ctype,
650 strlen (attr_value));
652 pkey,
653 cred,
656 NULL);
657 return;
658
659 }
661 {
663 return;
664 }
666 pkey,
667 &iter_error,
668 NULL,
669 &iter_cb,
670 NULL,
672 NULL);
673
674}
static gnutls_certificate_credentials_t cred
The credential.
static void iter_error(void *cls)
static void iter_cb(void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr)
static char * credential_name
Credential name.
static int list_credentials
List credentials flag.
static void iter_finished(void *cls)
GNUNET_RECLAIM_CredentialType
uint32_t GNUNET_RECLAIM_credential_typename_to_number(const char *typename)
Convert an credential type name to the corresponding number.
struct GNUNET_RECLAIM_Credential * GNUNET_RECLAIM_credential_new(const char *name, uint32_t type, const void *data, size_t data_size)
Create a new credential.
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_credential_store(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Credential *credential, const struct GNUNET_TIME_Relative *exp_interval, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Store a credential.
Definition: reclaim_api.c:1254
struct GNUNET_RECLAIM_AttributeIterator * GNUNET_RECLAIM_get_attributes_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_RECLAIM_AttributeResult proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
List all attributes for a local identity.
Definition: reclaim_api.c:1339

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cred_iter_cb()

static void cred_iter_cb ( void *  cls,
const struct GNUNET_CRYPTO_PublicKey identity,
const struct GNUNET_RECLAIM_Credential cred 
)
static

Definition at line 678 of file gnunet-reclaim.c.

681{
682 char *cred_str;
683 char *attr_str;
684 char *id;
685 const char *cred_type;
687 struct GNUNET_RECLAIM_AttributeList *attrs;
688
690 &cred->id))
693 {
695 cred->data,
696 cred->data_size);
698 id = GNUNET_STRINGS_data_to_string_alloc (&cred->id, sizeof(cred->id));
699 fprintf (stdout,
700 "%s: ``%s'' (%s); ID: %s\n",
701 cred->name,
702 cred_str,
703 cred_type,
704 id);
706 if (NULL != attrs)
707 {
708 fprintf (stdout,
709 "\t Attributes:\n");
710 for (ale = attrs->list_head; NULL != ale; ale = ale->next)
711 {
713 ale->attribute->type,
714 ale->attribute->data,
715 ale->attribute->data_size);
716 fprintf (stdout,
717 "\t %s: %s\n", ale->attribute->name, attr_str);
718 GNUNET_free (attr_str);
719 }
721 }
722 GNUNET_free (id);
723 }
725}
static int credential_exists
Credential exists.
#define GNUNET_RECLAIM_id_is_equal(a, b)
char * GNUNET_RECLAIM_credential_value_to_string(uint32_t type, const void *data, size_t data_size)
Convert the 'claim' of an credential to a string.
const char * GNUNET_RECLAIM_credential_number_to_typename(uint32_t type)
Convert an credential type number to the corresponding credential type string.
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_credential_get_attributes(const struct GNUNET_RECLAIM_Credential *cred)
Convert an credential type name to the corresponding number.
void GNUNET_RECLAIM_get_credentials_next(struct GNUNET_RECLAIM_CredentialIterator *ait)
Calls the record processor specified in GNUNET_RECLAIM_get_credentials_start for the next record.
Definition: reclaim_api.c:1462

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_process()

static void start_process ( )
static

Definition at line 729 of file gnunet-reclaim.c.

730{
731 if (NULL == pkey)
732 {
733 fprintf (stderr, "Ego %s not found\n", ego_name);
735 return;
736 }
737 if (NULL == credential_type)
740 if (NULL != credential_id)
742 strlen (credential_id),
743 &credential, sizeof(credential));
745 if (list_tickets)
746 {
748 pkey,
750 NULL,
752 NULL,
754 NULL);
755 return;
756 }
757
758 if (NULL != consume_ticket)
759 memcpy (ticket.gns_name, consume_ticket, strlen (consume_ticket) + 1);
760 if (NULL != revoke_ticket)
762 strlen (revoke_ticket),
763 &ticket,
764 sizeof(struct GNUNET_RECLAIM_Ticket));
765
767 claim = NULL;
769 pkey,
770 &iter_error,
771 NULL,
773 NULL,
775 NULL);
776
777}
static void ticket_iter_fin(void *cls)
static void ticket_iter_err(void *cls)
static int list_tickets
Ticket listing.
static char * ego_name
Ego name.
static void cred_iter_cb(void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Credential *cred)
static void ticket_iter(void *cls, const struct GNUNET_RECLAIM_Ticket *tkt, const char *rp_uri)
static void cred_iter_finished(void *cls)
@ GNUNET_NO
static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO
struct GNUNET_RECLAIM_TicketIterator * GNUNET_RECLAIM_ticket_iteration_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_RECLAIM_TicketCallback proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
Lists all tickets that have been issued to remote identities (relying parties)
Definition: reclaim_api.c:1586
struct GNUNET_RECLAIM_CredentialIterator * GNUNET_RECLAIM_get_credentials_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_RECLAIM_CredentialResult proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
List all credentials for a local identity.
Definition: reclaim_api.c:1416
enum GNUNET_GenericReturnValue GNUNET_STRINGS_string_to_data(const char *enc, size_t enclen, void *out, size_t out_size)
Convert CrockfordBase32 encoding back to data.
Definition: strings.c:812
The authorization ticket.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ego_cb()

static void ego_cb ( void *  cls,
struct GNUNET_IDENTITY_Ego ego,
void **  ctx,
const char *  name 
)
static

Definition at line 783 of file gnunet-reclaim.c.

787{
788 if (NULL == name)
789 {
790 if (GNUNET_YES == init)
791 {
792 init = GNUNET_NO;
793 start_process ();
794 }
795 return;
796 }
797 if (0 != strcmp (name, ego_name))
798 return;
800}
static char * name
Name (label) of the records to list.
static int init
static void start_process()
const struct GNUNET_CRYPTO_PrivateKey * GNUNET_IDENTITY_ego_get_private_key(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the ECC key associated with a ego.
Definition: identity_api.c:517

References ego_name, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_NO, GNUNET_YES, init, name, pkey, and start_process().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle c 
)
static

Definition at line 804 of file gnunet-reclaim.c.

808{
809 ret = 0;
810 if (NULL == ego_name)
811 {
812 ret = 1;
813 fprintf (stderr, _ ("Ego is required\n"));
814 return;
815 }
816
817 if ((NULL == attr_value) && (NULL != attr_name))
818 {
819 ret = 1;
820 fprintf (stderr, _ ("Attribute value missing!\n"));
821 return;
822 }
823
824 if ((NULL == rp) && (NULL != issue_attrs))
825 {
826 ret = 1;
827 fprintf (stderr, _ ("Requesting party key is required!\n"));
828 return;
829 }
830
832 // Get Ego
834}
static void ego_cb(void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *name)
static char * rp
Relying party.
struct GNUNET_IDENTITY_Handle * GNUNET_IDENTITY_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_IDENTITY_Callback cb, void *cb_cls)
Connect to the identity service.
Definition: identity_api.c:487
struct GNUNET_RECLAIM_Handle * GNUNET_RECLAIM_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the re:claimID service.
Definition: reclaim_api.c:1118
#define _(String)
GNU gettext support macro.
Definition: platform.h:178

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const  argv[] 
)

Definition at line 838 of file gnunet-reclaim.c.

839{
842 "add",
843 "NAME",
845 "Add or update an attribute NAME"),
846 &attr_name),
848 "delete",
849 "ID",
850 gettext_noop ("Delete the attribute with ID"),
851 &attr_delete),
853 "value",
854 "VALUE",
855 gettext_noop ("The attribute VALUE"),
856 &attr_value),
858 "ego",
859 "EGO",
860 gettext_noop ("The EGO to use"),
861 &ego_name),
863 "rp",
864 "RP",
866 "Specify the relying party for issue"),
867 &rp),
869 "rpuri",
870 "RPURI",
872 "Specify the relying party URI for a ticket to consume"),
873 &ex_rp_uri),
875 "dump",
876 gettext_noop ("List attributes for EGO"),
877 &list),
879 "credentials",
880 gettext_noop ("List credentials for EGO"),
883 "credential-id",
884 "CREDENTIAL_ID",
886 "Credential to use for attribute"),
889 "credential-name",
890 "NAME",
891 gettext_noop ("Credential name"),
894 "issue",
895 "A1,A2,...",
897 "Issue a ticket for a set of attributes separated by comma"),
898 &issue_attrs),
900 "consume",
901 "TICKET",
902 gettext_noop ("Consume a ticket"),
905 "revoke",
906 "TICKET",
907 gettext_noop ("Revoke a ticket"),
910 "type",
911 "TYPE",
912 gettext_noop ("Type of attribute"),
913 &type_str),
915 "credential-type",
916 "TYPE",
917 gettext_noop ("Type of credential"),
920 "tickets",
921 gettext_noop ("List tickets of ego"),
922 &list_tickets),
924 "expiration",
925 "INTERVAL",
927 "Expiration interval of the attribute"),
928 &exp_interval),
929
931 };
933 if (GNUNET_OK !=
935 argc,
936 argv,
937 "gnunet-reclaim",
938 _ ("re:claimID command line tool"),
939 options,
940 &run,
941 NULL))
942 return 1;
943 else
944 return ret;
945}
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
#define gettext_noop(String)
Definition: gettext.h:74
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_relative_time(char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_TIME_Relative *val)
Allow user to specify a struct GNUNET_TIME_Relative (using human-readable "fancy" time).
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_gnunet(void)
Return default project data used by 'libgnunetutil' for GNUnet.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(const struct GNUNET_OS_ProjectData *pd, int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Definition: program.c:407
#define GNUNET_TIME_UNIT_HOURS
One hour.
Definition of a command line option.

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.

Here is the call graph for this function:

Variable Documentation

◆ ret

int ret
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().

◆ list

int list
static

List attribute flag.

Definition at line 42 of file gnunet-reclaim.c.

Referenced by iter_cb(), iter_finished(), and main().

◆ list_credentials

int list_credentials
static

List credentials flag.

Definition at line 47 of file gnunet-reclaim.c.

Referenced by cred_iter_cb(), cred_iter_finished(), and main().

◆ credential_id

char* credential_id
static

Credential ID string.

Definition at line 52 of file gnunet-reclaim.c.

Referenced by iter_finished(), main(), and start_process().

◆ ex_rp_uri

char* ex_rp_uri
static

The expected RP URI.

Definition at line 57 of file gnunet-reclaim.c.

Referenced by iter_finished(), and main().

◆ credential

◆ credential_name

char* credential_name
static

Credential name.

Definition at line 67 of file gnunet-reclaim.c.

Referenced by cred_iter_finished(), and main().

◆ credential_type

char* credential_type
static

Credential type.

Definition at line 72 of file gnunet-reclaim.c.

Referenced by cred_iter_finished(), do_cleanup(), main(), and start_process().

◆ credential_exists

int credential_exists
static

Credential exists.

Definition at line 77 of file gnunet-reclaim.c.

Referenced by cred_iter_cb(), and start_process().

◆ rp

◆ attr_name

◆ attr_value

char* attr_value
static

Attribute value.

Definition at line 92 of file gnunet-reclaim.c.

Referenced by cred_iter_finished(), iter_finished(), main(), and run().

◆ issue_attrs

char* issue_attrs
static

Attributes to issue.

Definition at line 97 of file gnunet-reclaim.c.

Referenced by iter_cb(), iter_finished(), main(), and run().

◆ consume_ticket

char* consume_ticket
static

Ticket to consume.

Definition at line 102 of file gnunet-reclaim.c.

Referenced by iter_finished(), main(), and start_process().

◆ type_str

char* type_str
static

Attribute type.

Definition at line 107 of file gnunet-reclaim.c.

Referenced by iter_finished(), main(), parse_attr(), and parse_credential().

◆ revoke_ticket

char* revoke_ticket
static

Ticket to revoke.

Definition at line 112 of file gnunet-reclaim.c.

Referenced by iter_finished(), main(), and start_process().

◆ list_tickets

int list_tickets
static

Ticket listing.

Definition at line 117 of file gnunet-reclaim.c.

Referenced by main(), and start_process().

◆ ego_name

char* ego_name
static

Ego name.

Definition at line 122 of file gnunet-reclaim.c.

Referenced by ego_cb(), main(), run(), and start_process().

◆ identity_handle

struct GNUNET_IDENTITY_Handle* identity_handle
static

Identity handle.

Definition at line 127 of file gnunet-reclaim.c.

Referenced by do_cleanup(), and run().

◆ reclaim_handle

struct GNUNET_RECLAIM_Handle* reclaim_handle
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().

◆ reclaim_op

struct GNUNET_RECLAIM_Operation* reclaim_op
static

◆ attr_iterator

struct GNUNET_RECLAIM_AttributeIterator* attr_iterator
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().

◆ cred_iterator

struct GNUNET_RECLAIM_CredentialIterator* cred_iterator
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().

◆ ticket_iterator

struct GNUNET_RECLAIM_TicketIterator* ticket_iterator
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().

◆ pkey

const struct GNUNET_CRYPTO_PrivateKey* pkey
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().

◆ ticket

◆ attr_list

struct GNUNET_RECLAIM_AttributeList* attr_list
static

Attribute list.

Definition at line 169 of file gnunet-reclaim.c.

Referenced by do_cleanup(), iter_cb(), iter_finished(), and start_process().

◆ exp_interval

struct GNUNET_TIME_Relative exp_interval
static

◆ timeout

struct GNUNET_SCHEDULER_Task* timeout
static

Timeout task.

Definition at line 179 of file gnunet-reclaim.c.

Referenced by do_cleanup(), iter_finished(), and timeout_task().

◆ cleanup_task

◆ claim

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().

◆ attr_delete

char* attr_delete
static

Claim to delete.

Definition at line 194 of file gnunet-reclaim.c.

Referenced by iter_cb(), iter_finished(), and main().

◆ attr_to_delete

struct GNUNET_RECLAIM_Attribute* attr_to_delete
static

Claim object to delete.

Definition at line 199 of file gnunet-reclaim.c.

Referenced by do_cleanup(), iter_cb(), and iter_finished().

◆ init

int init = GNUNET_YES
static

Definition at line 780 of file gnunet-reclaim.c.

Referenced by ego_cb().