GNUnet 0.21.1
gnunet-reclaim.c File Reference
#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"
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 *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 *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_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 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_CRYPTO_PublicKey rp_key
 rp public 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 203 of file gnunet-reclaim.c.

204{
205 cleanup_task = NULL;
206 if (NULL != timeout)
208 if (NULL != reclaim_op)
210 if (NULL != attr_iterator)
212 if (NULL != cred_iterator)
214 if (NULL != ticket_iterator)
216 if (NULL != reclaim_handle)
218 if (NULL != identity_handle)
220 if (NULL != attr_list)
221 {
223 attr_list = NULL;
224 }
225 if (NULL != attr_to_delete)
227 if (NULL == credential_type)
229}
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:1145
void GNUNET_RECLAIM_cancel(struct GNUNET_RECLAIM_Operation *op)
Cancel an identity provider operation.
Definition: reclaim_api.c:1130
void GNUNET_RECLAIM_get_attributes_stop(struct GNUNET_RECLAIM_AttributeIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1393
void GNUNET_RECLAIM_get_credentials_stop(struct GNUNET_RECLAIM_CredentialIterator *ait)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1471
void GNUNET_RECLAIM_ticket_iteration_stop(struct GNUNET_RECLAIM_TicketIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1663
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:975

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 ticket,
const struct GNUNET_RECLAIM_PresentationList presentations 
)
static

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

236{
237 char *ticket_str;
238
239 reclaim_op = NULL;
240 if (NULL != ticket)
241 {
242 ticket_str =
244 sizeof(
245 struct GNUNET_RECLAIM_Ticket));
246 printf ("%s\n", ticket_str);
247 GNUNET_free (ticket_str);
248 }
250}
static void do_cleanup(void *cls)
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
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:1299
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:764
The authorization ticket.

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

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 254 of file gnunet-reclaim.c.

255{
256 reclaim_op = NULL;
257 if (GNUNET_SYSERR == success)
258 {
259 fprintf (stderr, "%s\n", emsg);
260 }
262}
@ 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 266 of file gnunet-reclaim.c.

270{
271 char *value_str;
272 char *id;
273 const char *attr_type;
274
275 if (NULL == identity)
276 {
277 reclaim_op = NULL;
279 return;
280 }
281 if (NULL == attr)
282 {
283 ret = 1;
284 return;
285 }
287 id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(attr->id));
288 value_str = NULL;
289 if (NULL == presentation)
290 {
292 attr->data,
293 attr->data_size);
294 }
295 else
296 {
300
301 for (ale = al->list_head; NULL != ale; ale = ale->next)
302 {
303 if (0 != strncmp (attr->data, ale->attribute->name, attr->data_size))
304 continue;
305 value_str
307 ale->attribute->data,
308 ale->attribute->data_size);
309 break;
310 }
311 }
312 fprintf (stdout,
313 "Name: %s; Value: %s (%s); Flag %u; ID: %s %s\n",
314 attr->name,
315 (NULL != value_str) ? value_str : "???",
316 attr_type,
317 attr->flag,
318 id,
319 (NULL == presentation) ? "" : "(ATTESTED)");
320 GNUNET_free (value_str);
321 GNUNET_free (id);
322}
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.
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 326 of file gnunet-reclaim.c.

327{
328 ticket_iterator = NULL;
329 fprintf (stderr, "Failed to iterate over tickets\n");
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_fin()

static void ticket_iter_fin ( void *  cls)
static

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

336{
337 ticket_iterator = NULL;
339}

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 ticket 
)
static

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

344{
345 char *aud;
346 char *ref;
347 char *tkt;
348
349 aud =
351 sizeof(struct
354 tkt =
356 sizeof(struct GNUNET_RECLAIM_Ticket));
357 fprintf (stdout, "Ticket: %s | ID: %s | Audience: %s\n", tkt, ref, aud);
358 GNUNET_free (aud);
359 GNUNET_free (ref);
360 GNUNET_free (tkt);
362}
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:1643
An identity key as per LSD0001.
struct GNUNET_CRYPTO_PublicKey audience
The ticket audience (= relying party)
struct GNUNET_RECLAIM_Identifier rnd
The ticket random identifier.

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

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 366 of file gnunet-reclaim.c.

367{
368 attr_iterator = NULL;
369 cred_iterator = NULL;
370 fprintf (stderr, "Failed\n");
371
373}

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 377 of file gnunet-reclaim.c.

378{
379 timeout = NULL;
380 ret = 1;
381 fprintf (stderr, "Timeout\n");
382 if (NULL == cleanup_task)
384}

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 388 of file gnunet-reclaim.c.

389{
390 reclaim_op = NULL;
391 if (GNUNET_OK != success)
392 {
393 fprintf (stderr, "Revocation failed.\n");
394 ret = 1;
395 }
397}
@ 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 401 of file gnunet-reclaim.c.

402{
403 reclaim_op = NULL;
404 if (GNUNET_OK != success)
405 {
406 fprintf (stderr, "Deletion failed.\n");
407 ret = 1;
408 }
410}

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 414 of file gnunet-reclaim.c.

415{
416 char *data;
417 size_t data_size;
418 int type;
419
420 attr_iterator = NULL;
421 if (list)
422 {
424 return;
425 }
426
427 if (issue_attrs)
428 {
430 pkey,
431 &rp_key,
432 attr_list,
434 NULL);
435 return;
436 }
437 if (consume_ticket)
438 {
440 pkey,
441 &ticket,
443 NULL);
447 NULL);
448 return;
449 }
450 if (revoke_ticket)
451 {
453 pkey,
454 &ticket,
456 NULL);
457 return;
458 }
459 if (attr_delete)
460 {
461 if (NULL == attr_to_delete)
462 {
463 fprintf (stdout, "No such attribute ``%s''\n", attr_delete);
465 return;
466 }
468 pkey,
471 NULL);
472 return;
473 }
474 if (attr_name)
475 {
476 if (NULL == type_str)
478 else
480
484 (void **) &data,
485 &data_size));
486 if (NULL != claim)
487 {
488 claim->type = type;
489 claim->data = data;
491 }
492 else
493 {
494 claim =
496 }
497 if (NULL != credential_id)
498 {
500 }
502 pkey,
503 claim,
505 &store_cont,
506 NULL);
509 return;
510 }
512}
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 void ticket_issue_cb(void *cls, const struct GNUNET_RECLAIM_Ticket *ticket, const struct GNUNET_RECLAIM_PresentationList *presentations)
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 const struct GNUNET_CRYPTO_PrivateKey * pkey
ego private key
static void timeout_task(void *cls)
static int list
List attribute flag.
static struct GNUNET_CRYPTO_PublicKey rp_key
rp public key
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)
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
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_issue(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *iss, const struct GNUNET_CRYPTO_PublicKey *rp, const struct GNUNET_RECLAIM_AttributeList *attrs, GNUNET_RECLAIM_IssueTicketCallback cb, void *cb_cls)
Issues a ticket to a relying party.
Definition: reclaim_api.c:1491
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:1694
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_consume(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, const struct GNUNET_RECLAIM_Ticket *ticket, GNUNET_RECLAIM_AttributeTicketResult cb, void *cb_cls)
Consumes an issued ticket.
Definition: reclaim_api.c:1551
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:1164
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:1208
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:1272
#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:484
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, 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(), 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(), 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 516 of file gnunet-reclaim.c.

519{
521 char *attrs_tmp;
522 char *attr_str;
523 char *label;
524 char *id;
525 const char *attr_type;
526
527 if ((NULL != attr_name) && (NULL == claim))
528 {
529 if (0 == strcasecmp (attr_name, attr->name))
530 {
532 &attr->credential,
533 attr->type,
534 attr->data,
535 attr->data_size);
536 claim->id = attr->id;
537 }
538 }
539 else if (issue_attrs)
540 {
541 attrs_tmp = GNUNET_strdup (issue_attrs);
542 attr_str = strtok (attrs_tmp, ",");
543 while (NULL != attr_str)
544 {
545 if (0 != strcasecmp (attr_str, attr->name))
546 {
547 attr_str = strtok (NULL, ",");
548 continue;
549 }
552 &attr->credential,
553 attr->type,
554 attr->data,
555 attr->data_size);
556 le->attribute->flag = attr->flag;
557 le->attribute->id = attr->id;
560 le);
561 break;
562 }
563 GNUNET_free (attrs_tmp);
564 }
565 else if (attr_delete && (NULL == attr_to_delete))
566 {
567 label = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(attr->id));
568 if (0 == strcasecmp (attr_delete, label))
569 {
571 &attr->credential,
572 attr->type,
573 attr->data,
574 attr->data_size);
575 attr_to_delete->id = attr->id;
576 }
577 GNUNET_free (label);
578 }
579 else if (list)
580 {
582 attr->data,
583 attr->data_size);
585 id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(attr->id));
587 {
588 fprintf (stdout,
589 "%s: ``%s'' (%s); ID: %s\n",
590 attr->name,
591 attr_str,
592 attr_type,
593 id);
594 }
595 else
596 {
597 char *cred_id =
599 sizeof(attr->credential));
600 fprintf (stdout,
601 "%s: ``%s'' in credential presentation `%s' (%s); ID: %s\n",
602 attr->name,
603 attr_str,
604 cred_id,
605 attr_type,
606 id);
607 GNUNET_free (cred_id);
608
609 }
610 GNUNET_free (id);
611 }
613}
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
@ GNUNET_YES
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#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:1379
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 617 of file gnunet-reclaim.c.

618{
619 cred_iterator = NULL;
620
621 // Add new credential
622 if ((NULL != credential_name) &&
623 (NULL != attr_value))
624 {
629 ctype,
631 strlen (attr_value));
633 pkey,
637 NULL);
638 return;
639
640 }
642 {
644 return;
645 }
647 pkey,
648 &iter_error,
649 NULL,
650 &iter_cb,
651 NULL,
653 NULL);
654
655}
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:1249
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:1334

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

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 659 of file gnunet-reclaim.c.

662{
663 char *cred_str;
664 char *attr_str;
665 char *id;
666 const char *cred_type;
668
670 &cred->id))
673 {
675 cred->data,
676 cred->data_size);
678 id = GNUNET_STRINGS_data_to_string_alloc (&cred->id, sizeof(cred->id));
679 fprintf (stdout,
680 "%s: ``%s'' (%s); ID: %s\n",
681 cred->name,
682 cred_str,
683 cred_type,
684 id);
685 struct GNUNET_RECLAIM_AttributeList *attrs =
687 if (NULL != attrs)
688 {
689 fprintf (stdout,
690 "\t Attributes:\n");
691 for (ale = attrs->list_head; NULL != ale; ale = ale->next)
692 {
694 ale->attribute->type,
695 ale->attribute->data,
696 ale->attribute->data_size);
697 fprintf (stdout,
698 "\t %s: %s\n", ale->attribute->name, attr_str);
699 GNUNET_free (attr_str);
700 }
702 }
703 GNUNET_free (id);
704 }
706}
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:1456
uint32_t type
Type/Format of Claim.
const char * name
The name of the credential.
const void * data
Binary value stored as credential value.
size_t data_size
Number of bytes in data.
struct GNUNET_RECLAIM_Identifier id
ID.

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

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 710 of file gnunet-reclaim.c.

711{
712 if (NULL == pkey)
713 {
714 fprintf (stderr, "Ego %s not found\n", ego_name);
716 return;
717 }
718 if (NULL == credential_type)
721 if (NULL != credential_id)
723 strlen (credential_id),
724 &credential, sizeof(credential));
726 if (list_tickets)
727 {
729 pkey,
731 NULL,
733 NULL,
735 NULL);
736 return;
737 }
738
739 if ((NULL != rp) &&
740 (GNUNET_OK !=
742 {
743 fprintf (stderr, "%s is not a public key!\n", rp);
745 return;
746 }
747 if (NULL != consume_ticket)
749 strlen (consume_ticket),
750 &ticket,
751 sizeof(struct GNUNET_RECLAIM_Ticket));
752 if (NULL != revoke_ticket)
754 strlen (revoke_ticket),
755 &ticket,
756 sizeof(struct GNUNET_RECLAIM_Ticket));
757
759 claim = NULL;
761 pkey,
762 &iter_error,
763 NULL,
765 NULL,
767 NULL);
768
769}
static char * rp
Relying party.
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 *ticket)
static void cred_iter_finished(void *cls)
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_public_key_from_string(const char *str, struct GNUNET_CRYPTO_PublicKey *key)
Parses a (Base32) string representation of the public key.
Definition: crypto_pkey.c:571
@ 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 identites (relying parties)
Definition: reclaim_api.c:1591
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:1411
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:789

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

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 775 of file gnunet-reclaim.c.

779{
780 if (NULL == name)
781 {
782 if (GNUNET_YES == init)
783 {
784 init = GNUNET_NO;
785 start_process ();
786 }
787 return;
788 }
789 if (0 != strcmp (name, ego_name))
790 return;
792}
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 796 of file gnunet-reclaim.c.

800{
801 ret = 0;
802 if (NULL == ego_name)
803 {
804 ret = 1;
805 fprintf (stderr, _ ("Ego is required\n"));
806 return;
807 }
808
809 if ((NULL == attr_value) && (NULL != attr_name))
810 {
811 ret = 1;
812 fprintf (stderr, _ ("Attribute value missing!\n"));
813 return;
814 }
815
816 if ((NULL == rp) && (NULL != issue_attrs))
817 {
818 ret = 1;
819 fprintf (stderr, _ ("Requesting party key is required!\n"));
820 return;
821 }
822
824 // Get Ego
826}
static void ego_cb(void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *name)
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:1113
#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 830 of file gnunet-reclaim.c.

831{
835 "add",
836 "NAME",
837 gettext_noop ("Add or update an attribute NAME"),
838 &attr_name),
840 "delete",
841 "ID",
842 gettext_noop ("Delete the attribute with ID"),
843 &attr_delete),
845 "value",
846 "VALUE",
847 gettext_noop ("The attribute VALUE"),
848 &attr_value),
850 "ego",
851 "EGO",
852 gettext_noop ("The EGO to use"),
853 &ego_name),
855 "rp",
856 "RP",
858 "Specify the relying party for issue"),
859 &rp),
861 "dump",
862 gettext_noop ("List attributes for EGO"),
863 &list),
865 "credentials",
866 gettext_noop ("List credentials for EGO"),
869 "credential-id",
870 "CREDENTIAL_ID",
872 "Credential to use for attribute"),
875 "credential-name",
876 "NAME",
877 gettext_noop ("Credential name"),
880 "issue",
881 "A1,A2,...",
883 "Issue a ticket for a set of attributes separated by comma"),
884 &issue_attrs),
886 "consume",
887 "TICKET",
888 gettext_noop ("Consume a ticket"),
891 "revoke",
892 "TICKET",
893 gettext_noop ("Revoke a ticket"),
896 "type",
897 "TYPE",
898 gettext_noop ("Type of attribute"),
899 &type_str),
901 "credential-type",
902 "TYPE",
903 gettext_noop ("Type of credential"),
906 "tickets",
907 gettext_noop ("List tickets of ego"),
908 &list_tickets),
910 "expiration",
911 "INTERVAL",
913 "Expiration interval of the attribute"),
914 &exp_interval),
915
917 };
918 if (GNUNET_OK != GNUNET_PROGRAM_run (argc,
919 argv,
920 "gnunet-reclaim",
921 _ ("re:claimID command line tool"),
922 options,
923 &run,
924 NULL))
925 return 1;
926 else
927 return ret;
928}
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:70
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.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(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:400
#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, 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.

Here is the call graph for this function:

Variable Documentation

◆ ret

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

◆ list

int list
static

List attribute flag.

Definition at line 43 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 48 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 53 of file gnunet-reclaim.c.

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

◆ credential

◆ credential_name

char* credential_name
static

Credential name.

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

Referenced by cred_iter_finished(), and main().

◆ credential_type

char* credential_type
static

Credential type.

Definition at line 68 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 73 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 88 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 93 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 98 of file gnunet-reclaim.c.

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

◆ type_str

char* type_str
static

Attribute type.

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

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

◆ revoke_ticket

char* revoke_ticket
static

Ticket to revoke.

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

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

◆ list_tickets

int list_tickets
static

Ticket listing.

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

Referenced by main(), and start_process().

◆ ego_name

char* ego_name
static

Ego name.

Definition at line 118 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 123 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 128 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 138 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 143 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 149 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 155 of file gnunet-reclaim.c.

Referenced by cred_iter_finished(), ego_cb(), iter_finished(), and start_process().

◆ rp_key

struct GNUNET_CRYPTO_PublicKey rp_key
static

rp public key

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

Referenced by iter_finished(), and start_process().

◆ ticket

◆ attr_list

struct GNUNET_RECLAIM_AttributeList* attr_list
static

Attribute list.

Definition at line 170 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 180 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 190 of file gnunet-reclaim.c.

Referenced by is_claim_in_address_scope(), iter_cb(), iter_finished(), parse_jwt(), rvk_move_attr_cb(), and start_process().

◆ attr_delete

char* attr_delete
static

Claim to delete.

Definition at line 195 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 200 of file gnunet-reclaim.c.

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

◆ init

int init = GNUNET_YES
static

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

Referenced by ego_cb().