GNUnet  0.11.x
Functions | Variables
gnunet-reclaim.c File Reference

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"
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)
 
static void store_attr_cont (void *cls, int32_t success, const char *emsg)
 
static void process_attrs (void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 
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_EcdsaPublicKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 
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 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_TicketIteratorticket_iterator
 Ticket iterator. More...
 
static struct GNUNET_CRYPTO_AbeMasterKeyabe_key
 Master ABE key. More...
 
static const struct GNUNET_CRYPTO_EcdsaPrivateKeypkey
 ego private key More...
 
static struct GNUNET_CRYPTO_EcdsaPublicKey rp_key
 rp public key More...
 
static struct GNUNET_RECLAIM_Ticket ticket
 Ticket to consume. More...
 
static struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListattr_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_ATTRIBUTE_Claimclaim
 Claim to store. More...
 
static char * attr_delete
 Claim to delete. More...
 
static struct GNUNET_RECLAIM_ATTRIBUTE_Claimattr_to_delete
 Claim object to delete. More...
 
static int init = GNUNET_YES
 

Detailed Description

Identity Provider utility.

Author
Martin Schanzenbach

Definition in file gnunet-reclaim.c.

Function Documentation

◆ do_cleanup()

static void do_cleanup ( void *  cls)
static

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

References GNUNET_free, GNUNET_IDENTITY_disconnect(), GNUNET_RECLAIM_cancel(), GNUNET_RECLAIM_disconnect(), GNUNET_RECLAIM_get_attributes_stop(), GNUNET_RECLAIM_ticket_iteration_stop(), and GNUNET_SCHEDULER_cancel().

Referenced by iter_error(), iter_finished(), process_attrs(), process_delete(), process_rvk(), start_process(), store_attr_cont(), ticket_issue_cb(), ticket_iter_err(), ticket_iter_fin(), and timeout_task().

172 {
173  cleanup_task = NULL;
174  if (NULL != timeout)
176  if (NULL != reclaim_op)
178  if (NULL != attr_iterator)
180  if (NULL != ticket_iterator)
182  if (NULL != reclaim_handle)
184  if (NULL != identity_handle)
186  if (NULL != abe_key)
188  if (NULL != attr_list)
190  if (NULL != attr_to_delete)
192 }
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * attr_list
Attribute list.
void GNUNET_RECLAIM_disconnect(struct GNUNET_RECLAIM_Handle *h)
Disconnect from identity provider service.
Definition: reclaim_api.c:1044
void GNUNET_RECLAIM_cancel(struct GNUNET_RECLAIM_Operation *op)
Cancel an identity provider operation.
Definition: reclaim_api.c:1029
void GNUNET_RECLAIM_ticket_iteration_stop(struct GNUNET_RECLAIM_TicketIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1613
static struct GNUNET_RECLAIM_Handle * reclaim_handle
reclaim handle
static struct GNUNET_RECLAIM_AttributeIterator * attr_iterator
Attribute iterator.
static struct GNUNET_RECLAIM_TicketIterator * ticket_iterator
Ticket iterator.
static struct GNUNET_SCHEDULER_Task * timeout
Timeout task.
static struct GNUNET_IDENTITY_Handle * identity_handle
Identity handle.
void GNUNET_IDENTITY_disconnect(struct GNUNET_IDENTITY_Handle *h)
Disconnect from identity service.
Definition: identity_api.c:837
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
void GNUNET_RECLAIM_get_attributes_stop(struct GNUNET_RECLAIM_AttributeIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1425
static struct GNUNET_CRYPTO_AbeMasterKey * abe_key
Master ABE key.
static struct GNUNET_RECLAIM_ATTRIBUTE_Claim * attr_to_delete
Claim object to delete.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:966
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 
)
static

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

References do_cleanup(), GNUNET_free, GNUNET_SCHEDULER_add_now(), and GNUNET_STRINGS_data_to_string_alloc().

Referenced by iter_finished().

197 {
198  char *ticket_str;
199 
200  reclaim_op = NULL;
201  if (NULL != ticket)
202  {
203  ticket_str =
205  sizeof(
206  struct GNUNET_RECLAIM_Ticket));
207  printf ("%s\n", ticket_str);
208  GNUNET_free (ticket_str);
209  }
211 }
The authorization ticket.
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
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:1280
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:920
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ store_attr_cont()

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

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

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

Referenced by iter_finished().

216 {
217  reclaim_op = NULL;
218  if (GNUNET_SYSERR == success)
219  {
220  fprintf (stderr, "%s\n", emsg);
221  }
223 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
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:1280
#define GNUNET_SYSERR
Definition: gnunet_common.h:84
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
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_EcdsaPublicKey identity,
const struct GNUNET_RECLAIM_ATTRIBUTE_Claim attr,
const struct GNUNET_RECLAIM_ATTESTATION_Claim attest,
const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE reference 
)
static

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

References GNUNET_RECLAIM_ATTRIBUTE_Claim::data, GNUNET_RECLAIM_ATTRIBUTE_Claim::data_size, do_cleanup(), GNUNET_RECLAIM_ATTRIBUTE_Claim::flag, GNUNET_free, GNUNET_RECLAIM_ATTRIBUTE_number_to_typename(), GNUNET_RECLAIM_ATTRIBUTE_value_to_string(), GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_data_to_string_alloc(), GNUNET_RECLAIM_ATTRIBUTE_Claim::id, id, GNUNET_RECLAIM_ATTRIBUTE_Claim::name, ret, and GNUNET_RECLAIM_ATTRIBUTE_Claim::type.

Referenced by iter_finished().

232 {
233  char *value_str;
234  char *id;
235  const char *attr_type;
236 
237  if (NULL == identity)
238  {
239  reclaim_op = NULL;
241  return;
242  }
243  if (NULL == attr)
244  {
245  ret = 1;
246  return;
247  }
249  attr->data,
250  attr->data_size);
252  id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(uint64_t));
253  fprintf (stdout,
254  "Name: %s; Value: %s (%s); Version %u; ID: %s\n",
255  attr->name,
256  value_str,
257  attr_type,
258  attr->flag,
259  id);
260  GNUNET_free (id);
261 }
const char * name
The name of the attribute.
char * GNUNET_RECLAIM_ATTRIBUTE_value_to_string(uint32_t type, const void *data, size_t data_size)
Convert the &#39;claim&#39; of an attribute to a string.
static void do_cleanup(void *cls)
size_t data_size
Number of bytes in data.
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
const void * data
Binary value stored as attribute value.
const char * GNUNET_RECLAIM_ATTRIBUTE_number_to_typename(uint32_t type)
Convert a type number to the corresponding type string.
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:1280
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:920
static int ret
return value
#define GNUNET_free(ptr)
Wrapper around free.
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 265 of file gnunet-reclaim.c.

References do_cleanup(), and GNUNET_SCHEDULER_add_now().

Referenced by start_process().

266 {
267  ticket_iterator = NULL;
268  fprintf (stderr, "Failed to iterate over tickets\n");
270 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_RECLAIM_TicketIterator * ticket_iterator
Ticket iterator.
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:1280
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 274 of file gnunet-reclaim.c.

References do_cleanup(), and GNUNET_SCHEDULER_add_now().

Referenced by start_process().

275 {
276  ticket_iterator = NULL;
278 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_RECLAIM_TicketIterator * ticket_iterator
Ticket iterator.
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:1280
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 282 of file gnunet-reclaim.c.

References GNUNET_RECLAIM_Ticket::audience, GNUNET_free, GNUNET_RECLAIM_ticket_iteration_next(), GNUNET_STRINGS_data_to_string_alloc(), and GNUNET_RECLAIM_Ticket::rnd.

Referenced by start_process().

283 {
284  char *aud;
285  char *ref;
286  char *tkt;
287 
288  aud =
290  sizeof(struct
292  ref = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, sizeof(uint64_t));
293  tkt =
295  sizeof(struct GNUNET_RECLAIM_Ticket));
296  fprintf (stdout, "Ticket: %s | ID: %s | Audience: %s\n", tkt, ref, aud);
297  GNUNET_free (aud);
298  GNUNET_free (ref);
299  GNUNET_free (tkt);
301 }
The authorization ticket.
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:1593
static struct GNUNET_RECLAIM_TicketIterator * ticket_iterator
Ticket iterator.
uint64_t rnd
The ticket random (NBO)
struct GNUNET_CRYPTO_EcdsaPublicKey audience
The ticket audience (= relying party)
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:920
#define GNUNET_free(ptr)
Wrapper around free.
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 305 of file gnunet-reclaim.c.

References do_cleanup(), and GNUNET_SCHEDULER_add_now().

Referenced by start_process().

306 {
307  attr_iterator = NULL;
308  fprintf (stderr, "Failed to iterate over attributes\n");
310 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_RECLAIM_AttributeIterator * attr_iterator
Attribute iterator.
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:1280
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 314 of file gnunet-reclaim.c.

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

Referenced by iter_finished().

315 {
316  timeout = NULL;
317  ret = 1;
318  fprintf (stderr, "Timeout\n");
319  if (NULL == cleanup_task)
321 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
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:1280
static struct GNUNET_SCHEDULER_Task * timeout
Timeout task.
static int ret
return value
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 325 of file gnunet-reclaim.c.

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

Referenced by iter_finished().

326 {
327  reclaim_op = NULL;
328  if (GNUNET_OK != success)
329  {
330  fprintf (stderr, "Revocation failed.\n");
331  ret = 1;
332  }
334 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:83
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:1280
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
static int ret
return value
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 338 of file gnunet-reclaim.c.

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

Referenced by iter_finished().

339 {
340  reclaim_op = NULL;
341  if (GNUNET_OK != success)
342  {
343  fprintf (stderr, "Deletion failed.\n");
344  ret = 1;
345  }
347 }
static void do_cleanup(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:83
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:1280
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
static int ret
return value
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 351 of file gnunet-reclaim.c.

References attr_delete, attr_name, attr_value, consume_ticket, data, GNUNET_RECLAIM_ATTRIBUTE_Claim::data, GNUNET_RECLAIM_ATTRIBUTE_Claim::data_size, data_size, do_cleanup(), exp_interval, GNUNET_assert, GNUNET_free, GNUNET_RECLAIM_ATTRIBUTE_claim_new(), GNUNET_RECLAIM_attribute_delete(), 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, process_attrs(), process_delete(), process_rvk(), revoke_ticket, rp_key, store_attr_cont(), ticket, ticket_issue_cb(), timeout_task(), GNUNET_RECLAIM_ATTRIBUTE_Claim::type, type, and type_str.

Referenced by start_process().

352 {
353  char *data;
354  size_t data_size;
355  int type;
356 
357  attr_iterator = NULL;
358  if (list)
359  {
361  return;
362  }
363 
364  if (issue_attrs)
365  {
367  pkey,
368  &rp_key,
369  attr_list,
371  NULL);
372  return;
373  }
374  if (consume_ticket)
375  {
377  pkey,
378  &ticket,
379  &process_attrs,
380  NULL);
383  &timeout_task,
384  NULL);
385  return;
386  }
387  if (revoke_ticket)
388  {
390  pkey,
391  &ticket,
392  &process_rvk,
393  NULL);
394  return;
395  }
396  if (attr_delete)
397  {
398  if (NULL == attr_to_delete)
399  {
400  fprintf (stdout, "No such attribute ``%s''\n", attr_delete);
401  return;
402  }
404  pkey,
407  NULL);
408  return;
409  }
410  if (attr_name)
411  {
412  if (NULL == type_str)
414  else
416 
419  attr_value,
420  (void **) &data,
421  &data_size));
422  if (NULL != claim)
423  {
424  claim->type = type;
425  claim->data = data;
427  }
428  else
429  {
430  claim =
431  GNUNET_RECLAIM_ATTRIBUTE_claim_new (attr_name, type, data, data_size);
432  }
434  pkey,
435  claim,
436  &exp_interval,
438  NULL);
439  GNUNET_free (data);
440  GNUNET_free (claim);
441  return;
442  }
444 }
static char * consume_ticket
Ticket to consume.
static void do_cleanup(void *cls)
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_attribute_store(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, const struct GNUNET_TIME_Relative *exp_interval, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Store an attribute.
Definition: reclaim_api.c:1075
size_t data_size
Number of bytes in data.
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static char * attr_delete
Claim to delete.
static size_t data_size
Number of bytes in data.
Definition: gnunet-abd.c:187
static struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * attr_list
Attribute list.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_TIME_UNIT_SECONDS
One second.
uint32_t GNUNET_RECLAIM_ATTRIBUTE_typename_to_number(const char *typename)
Convert a type name to the corresponding number.
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 &#39;claim&#39; of an attribute to the binary representation.
static struct GNUNET_TIME_Relative exp_interval
Attribute expiration interval.
static struct GNUNET_RECLAIM_Handle * reclaim_handle
reclaim handle
static struct GNUNET_RECLAIM_AttributeIterator * attr_iterator
Attribute iterator.
const void * data
Binary value stored as attribute value.
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
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:1253
static void ticket_issue_cb(void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_revoke(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, const struct GNUNET_RECLAIM_Ticket *ticket, GNUNET_RECLAIM_ContinuationWithStatus cb, void *cb_cls)
Revoked an issued ticket.
Definition: reclaim_api.c:1644
static char * attr_value
Attribute value.
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_attribute_delete(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Delete an attribute.
Definition: reclaim_api.c:1122
static char * attr_name
The attribute.
#define GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING
String attribute.
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:1280
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_issue(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, GNUNET_RECLAIM_TicketCallback cb, void *cb_cls)
Issues a ticket to a relying party.
Definition: reclaim_api.c:1456
static struct GNUNET_SCHEDULER_Task * timeout
Timeout task.
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:442
static char * issue_attrs
Attributes to issue.
static struct GNUNET_CRYPTO_EcdsaPublicKey rp_key
rp public key
#define GNUNET_SYSERR
Definition: gnunet_common.h:84
static char * type_str
Attribute type.
static void process_delete(void *cls, int success, const char *msg)
static const struct GNUNET_CRYPTO_EcdsaPrivateKey * pkey
ego private key
static struct GNUNET_RECLAIM_Operation * reclaim_op
reclaim operation
struct GNUNET_RECLAIM_ATTRIBUTE_Claim * GNUNET_RECLAIM_ATTRIBUTE_claim_new(const char *attr_name, uint32_t type, const void *data, size_t data_size)
Create a new attribute claim.
static void process_rvk(void *cls, int success, const char *msg)
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_consume(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, const struct GNUNET_RECLAIM_Ticket *ticket, GNUNET_RECLAIM_AttributeResult cb, void *cb_cls)
Consumes an issued ticket.
Definition: reclaim_api.c:1505
struct GNUNET_RECLAIM_ATTRIBUTE_Claim * claim
Claim to store.
static int list
List attribute flag.
static char * revoke_ticket
Ticket to revoke.
uint32_t data
The data value.
static struct GNUNET_RECLAIM_ATTRIBUTE_Claim * attr_to_delete
Claim object to delete.
static void timeout_task(void *cls)
static void store_attr_cont(void *cls, int32_t success, const char *emsg)
#define GNUNET_free(ptr)
Wrapper around free.
static void process_attrs(void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
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_EcdsaPublicKey identity,
const struct GNUNET_RECLAIM_ATTRIBUTE_Claim attr,
const struct GNUNET_RECLAIM_ATTESTATION_Claim attest,
const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE reference 
)
static

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

References attr_delete, attr_name, GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry::claim, GNUNET_RECLAIM_ATTRIBUTE_Claim::data, GNUNET_RECLAIM_ATTRIBUTE_Claim::data_size, GNUNET_RECLAIM_ATTRIBUTE_Claim::flag, GNUNET_CONTAINER_DLL_insert, GNUNET_free, GNUNET_new, GNUNET_RECLAIM_ATTRIBUTE_claim_new(), GNUNET_RECLAIM_ATTRIBUTE_number_to_typename(), GNUNET_RECLAIM_ATTRIBUTE_value_to_string(), GNUNET_RECLAIM_get_attributes_next(), GNUNET_strdup, GNUNET_STRINGS_data_to_string_alloc(), GNUNET_RECLAIM_ATTRIBUTE_Claim::id, id, issue_attrs, list, GNUNET_RECLAIM_ATTRIBUTE_ClaimList::list_head, GNUNET_RECLAIM_ATTRIBUTE_ClaimList::list_tail, GNUNET_RECLAIM_ATTRIBUTE_Claim::name, and GNUNET_RECLAIM_ATTRIBUTE_Claim::type.

Referenced by start_process().

453 {
455  char *attrs_tmp;
456  char *attr_str;
457  char *label;
458  char *id;
459  const char *attr_type;
460 
461  if ((NULL != attr_name) && (NULL != claim))
462  {
463  if (0 == strcasecmp (attr_name, attr->name))
464  {
466  attr->type,
467  attr->data,
468  attr->data_size);
469  }
470  }
471  else if (issue_attrs)
472  {
473  attrs_tmp = GNUNET_strdup (issue_attrs);
474  attr_str = strtok (attrs_tmp, ",");
475  while (NULL != attr_str)
476  {
477  if (0 != strcasecmp (attr_str, attr->name))
478  {
479  attr_str = strtok (NULL, ",");
480  continue;
481  }
484  attr->type,
485  attr->data,
486  attr->data_size);
487  le->claim->flag = attr->flag;
488  le->claim->id = attr->id;
491  le);
492  break;
493  }
494  GNUNET_free (attrs_tmp);
495  }
496  else if (attr_delete && (NULL == attr_to_delete))
497  {
498  label = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(uint64_t));
499  if (0 == strcasecmp (attr_delete, label))
500  {
502  attr->type,
503  attr->data,
504  attr->data_size);
505  attr_to_delete->id = attr->id;
506  }
507  GNUNET_free (label);
508  }
509  else if (list)
510  {
512  attr->data,
513  attr->data_size);
515  id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(uint64_t));
516  fprintf (stdout,
517  "Name: %s; Value: %s (%s); Version %u; ID: %s\n",
518  attr->name,
519  attr_str,
520  attr_type,
521  attr->flag,
522  id);
523  GNUNET_free (id);
524  }
526 }
const char * name
The name of the attribute.
struct GNUNET_RECLAIM_ATTRIBUTE_Claim * claim
The attribute claim.
char * GNUNET_RECLAIM_ATTRIBUTE_value_to_string(uint32_t type, const void *data, size_t data_size)
Convert the &#39;claim&#39; of an attribute to a string.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
size_t data_size
Number of bytes in data.
struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry * list_tail
List tail.
static char * attr_delete
Claim to delete.
static struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * attr_list
Attribute list.
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
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:1404
static struct GNUNET_RECLAIM_AttributeIterator * attr_iterator
Attribute iterator.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
const void * data
Binary value stored as attribute value.
const char * GNUNET_RECLAIM_ATTRIBUTE_number_to_typename(uint32_t type)
Convert a type number to the corresponding type string.
static char * attr_name
The attribute.
static char * issue_attrs
Attributes to issue.
struct GNUNET_RECLAIM_ATTRIBUTE_Claim * GNUNET_RECLAIM_ATTRIBUTE_claim_new(const char *attr_name, uint32_t type, const void *data, size_t data_size)
Create a new attribute claim.
struct GNUNET_RECLAIM_ATTRIBUTE_Claim * claim
Claim to store.
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:920
static int list
List attribute flag.
static struct GNUNET_RECLAIM_ATTRIBUTE_Claim * attr_to_delete
Claim object to delete.
struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry * list_head
List head.
#define GNUNET_free(ptr)
Wrapper around free.
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 530 of file gnunet-reclaim.c.

References consume_ticket, do_cleanup(), ego_name, GNUNET_CRYPTO_ecdsa_public_key_from_string(), GNUNET_new, GNUNET_OK, GNUNET_RECLAIM_get_attributes_start(), GNUNET_RECLAIM_ticket_iteration_start(), GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_string_to_data(), iter_cb(), iter_error(), iter_finished(), list_tickets, revoke_ticket, rp, rp_key, ticket, ticket_iter(), ticket_iter_err(), and ticket_iter_fin().

Referenced by ego_cb().

531 {
532  if (NULL == pkey)
533  {
534  fprintf (stderr, "Ego %s not found\n", ego_name);
536  return;
537  }
538 
539  if (list_tickets)
540  {
542  pkey,
544  NULL,
545  &ticket_iter,
546  NULL,
548  NULL);
549  return;
550  }
551 
552  if ((NULL != rp) &&
553  (GNUNET_OK !=
555  {
556  fprintf (stderr, "%s is not a public key!\n", rp);
558  return;
559  }
560  if (NULL != consume_ticket)
562  strlen (consume_ticket),
563  &ticket,
564  sizeof(struct GNUNET_RECLAIM_Ticket));
565  if (NULL != revoke_ticket)
567  strlen (revoke_ticket),
568  &ticket,
569  sizeof(struct GNUNET_RECLAIM_Ticket));
570 
572  claim = NULL;
574  pkey,
575  &iter_error,
576  NULL,
577  &iter_cb,
578  NULL,
579  &iter_finished,
580  NULL);
581 }
static char * consume_ticket
Ticket to consume.
The authorization ticket.
struct GNUNET_RECLAIM_AttributeIterator * GNUNET_RECLAIM_get_attributes_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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:1358
static void do_cleanup(void *cls)
static void ticket_iter_fin(void *cls)
struct GNUNET_RECLAIM_TicketIterator * GNUNET_RECLAIM_ticket_iteration_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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:1549
static int list_tickets
Ticket listing.
static void iter_finished(void *cls)
static struct GNUNET_SCHEDULER_Task * cleanup_task
Cleanup task.
static struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * attr_list
Attribute list.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:83
#define GNUNET_new(type)
Allocate a struct or union of the given type.
static struct GNUNET_RECLAIM_Handle * reclaim_handle
reclaim handle
static struct GNUNET_RECLAIM_AttributeIterator * attr_iterator
Attribute iterator.
static struct GNUNET_RECLAIM_TicketIterator * ticket_iterator
Ticket iterator.
static char * ego_name
Ego name.
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:1280
static void iter_cb(void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
static struct GNUNET_CRYPTO_EcdsaPublicKey rp_key
rp public key
static void iter_error(void *cls)
static void ticket_iter(void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
static void ticket_iter_err(void *cls)
static const struct GNUNET_CRYPTO_EcdsaPrivateKey * pkey
ego private key
int GNUNET_CRYPTO_ecdsa_public_key_from_string(const char *enc, size_t enclen, struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Convert a string representing a public key to a public key.
Definition: crypto_ecc.c:357
A list of GNUNET_RECLAIM_ATTRIBUTE_Claim structures.
static char * rp
Relying party.
struct GNUNET_RECLAIM_ATTRIBUTE_Claim * claim
Claim to store.
static char * revoke_ticket
Ticket to revoke.
int 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:952
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 587 of file gnunet-reclaim.c.

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

Referenced by run().

591 {
592  if (NULL == name)
593  {
594  if (GNUNET_YES == init)
595  {
596  init = GNUNET_NO;
597  start_process ();
598  }
599  return;
600  }
601  if (0 != strcmp (name, ego_name))
602  return;
604 }
static int init
const struct GNUNET_CRYPTO_EcdsaPrivateKey * GNUNET_IDENTITY_ego_get_private_key(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the ECC key associated with a ego.
Definition: identity_api.c:555
#define GNUNET_NO
Definition: gnunet_common.h:86
static void start_process()
static char * ego_name
Ego name.
static const struct GNUNET_CRYPTO_EcdsaPrivateKey * pkey
ego private key
const char * name
#define GNUNET_YES
Definition: gnunet_common.h:85
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 608 of file gnunet-reclaim.c.

References _, attr_name, attr_value, ego_cb(), ego_name, GNUNET_IDENTITY_connect(), GNUNET_RECLAIM_connect(), issue_attrs, ret, and rp.

Referenced by main().

612 {
613  ret = 0;
614  if (NULL == ego_name)
615  {
616  ret = 1;
617  fprintf (stderr, _ ("Ego is required\n"));
618  return;
619  }
620 
621  if ((NULL == attr_value) && (NULL != attr_name))
622  {
623  ret = 1;
624  fprintf (stderr, _ ("Attribute value missing!\n"));
625  return;
626  }
627 
628  if ((NULL == rp) && (NULL != issue_attrs))
629  {
630  ret = 1;
631  fprintf (stderr, _ ("Requesting party key is required!\n"));
632  return;
633  }
634 
636  // Get Ego
638 }
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:527
static struct GNUNET_RECLAIM_Handle * reclaim_handle
reclaim handle
#define _(String)
GNU gettext support macro.
Definition: platform.h:180
static char * ego_name
Ego name.
static char * attr_value
Attribute value.
static char * attr_name
The attribute.
static struct GNUNET_IDENTITY_Handle * identity_handle
Identity handle.
static char * issue_attrs
Attributes to issue.
static void ego_cb(void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *name)
static char * rp
Relying party.
static int ret
return value
struct GNUNET_RECLAIM_Handle * GNUNET_RECLAIM_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the re:claimID service.
Definition: reclaim_api.c:1004
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 642 of file gnunet-reclaim.c.

References _, attr_delete, attr_name, attr_value, consume_ticket, 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_tickets, ret, revoke_ticket, rp, run(), and type_str.

643 {
647  "add",
648  "NAME",
649  gettext_noop ("Add an attribute NAME"),
650  &attr_name),
652  "delete",
653  "ID",
654  gettext_noop ("Delete the attribute with ID"),
655  &attr_delete),
657  "value",
658  "VALUE",
659  gettext_noop ("The attribute VALUE"),
660  &attr_value),
662  "ego",
663  "EGO",
664  gettext_noop ("The EGO to use"),
665  &ego_name),
667  "rp",
668  "RP",
669  gettext_noop (
670  "Specify the relying party for issue"),
671  &rp),
673  "dump",
674  gettext_noop ("List attributes for EGO"),
675  &list),
677  'i',
678  "issue",
679  "A1,A2,...",
680  gettext_noop (
681  "Issue a ticket for a set of attributes separated by comma"),
682  &issue_attrs),
684  "consume",
685  "TICKET",
686  gettext_noop ("Consume a ticket"),
687  &consume_ticket),
689  "revoke",
690  "TICKET",
691  gettext_noop ("Revoke a ticket"),
692  &revoke_ticket),
694  "type",
695  "TYPE",
696  gettext_noop ("Type of attribute"),
697  &type_str),
699  "tickets",
700  gettext_noop ("List tickets of ego"),
701  &list_tickets),
703  "expiration",
704  "INTERVAL",
705  gettext_noop (
706  "Expiration interval of the attribute"),
707  &exp_interval),
708 
710  };
711  if (GNUNET_OK != GNUNET_PROGRAM_run (argc,
712  argv,
713  "gnunet-reclaim",
714  _ ("re:claimID command line tool"),
715  options,
716  &run,
717  NULL))
718  return 1;
719  else
720  return ret;
721 }
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)...
static char * consume_ticket
Ticket to consume.
#define GNUNET_TIME_UNIT_HOURS
One hour.
static int list_tickets
Ticket listing.
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static char * attr_delete
Claim to delete.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:83
Definition of a command line option.
static struct GNUNET_TIME_Relative exp_interval
Attribute expiration interval.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
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.
#define _(String)
GNU gettext support macro.
Definition: platform.h:180
static char * ego_name
Ego name.
static char * attr_value
Attribute value.
static char * attr_name
The attribute.
static char * issue_attrs
Attributes to issue.
static char * type_str
Attribute type.
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.
static char * rp
Relying party.
int 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, parse options).
Definition: program.c:367
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
static int list
List attribute flag.
static char * revoke_ticket
Ticket to revoke.
static int ret
return value
#define gettext_noop(String)
Definition: gettext.h:69
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().

◆ rp

char* rp
static

◆ attr_name

char* attr_name
static

The attribute.

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

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

◆ attr_value

char* attr_value
static

Attribute value.

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

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

◆ issue_attrs

char* issue_attrs
static

Attributes to issue.

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

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

◆ type_str

char* type_str
static

◆ revoke_ticket

char* revoke_ticket
static

Ticket to revoke.

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

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

◆ list_tickets

int list_tickets
static

Ticket listing.

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

Referenced by main(), and start_process().

◆ ego_name

char* ego_name
static

Ego name.

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

◆ reclaim_handle

struct GNUNET_RECLAIM_Handle* reclaim_handle
static

reclaim handle

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

◆ reclaim_op

struct GNUNET_RECLAIM_Operation* reclaim_op
static

reclaim operation

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

◆ attr_iterator

struct GNUNET_RECLAIM_AttributeIterator* attr_iterator
static

Attribute iterator.

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

◆ ticket_iterator

struct GNUNET_RECLAIM_TicketIterator* ticket_iterator
static

Ticket iterator.

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

◆ abe_key

struct GNUNET_CRYPTO_AbeMasterKey* abe_key
static

Master ABE key.

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

◆ pkey

const struct GNUNET_CRYPTO_EcdsaPrivateKey* pkey
static

ego private key

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

◆ rp_key

struct GNUNET_CRYPTO_EcdsaPublicKey rp_key
static

rp public key

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

Referenced by iter_finished(), and start_process().

◆ ticket

struct GNUNET_RECLAIM_Ticket ticket
static

◆ attr_list

struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList* attr_list
static

Attribute list.

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

◆ exp_interval

struct GNUNET_TIME_Relative exp_interval
static

Attribute expiration interval.

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

Referenced by iter_finished(), and main().

◆ timeout

struct GNUNET_SCHEDULER_Task* timeout
static

Timeout task.

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

◆ cleanup_task

struct GNUNET_SCHEDULER_Task* cleanup_task
static

Cleanup task.

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

Referenced by GST_neighbour_get_connection_cancel().

◆ claim

Claim to store.

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

Referenced by rvk_move_attr_cb().

◆ attr_delete

char* attr_delete
static

Claim to delete.

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

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

◆ attr_to_delete

struct GNUNET_RECLAIM_ATTRIBUTE_Claim* attr_to_delete
static

Claim object to delete.

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

◆ init

int init = GNUNET_YES
static

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

Referenced by ego_cb().