GNUnet  0.10.x
gnunet_reclaim_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2016 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
31 #ifndef GNUNET_RECLAIM_SERVICE_H
32 #define GNUNET_RECLAIM_SERVICE_H
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #if 0 /* keep Emacsens' auto-indent happy */
37 }
38 #endif
39 #endif
40 
42 #include "gnunet_util_lib.h"
43 
47 #define GNUNET_RECLAIM_VERSION 0x00000001
48 
53 
54 
59 
60 
72 
77 
81  uint64_t rnd;
82 };
83 
84 
94  void *cls, const struct GNUNET_RECLAIM_Ticket *ticket);
95 
96 
105 typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls,
106  int32_t success,
107  const char *emsg);
108 
109 
118  void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
119  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr);
120 
121 
128 struct GNUNET_RECLAIM_Handle *
130 
131 
146  struct GNUNET_RECLAIM_Handle *h,
147  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
148  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
149  const struct GNUNET_TIME_Relative *exp_interval,
150  GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
151 
152 
166  struct GNUNET_RECLAIM_Handle *h,
167  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
168  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
169  GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
170 
171 
198  struct GNUNET_RECLAIM_Handle *h,
199  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
203 
204 
211 void
214 
215 
223 void
226 
227 
243  struct GNUNET_RECLAIM_Handle *h,
244  const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
245  const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
246  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
247  GNUNET_RECLAIM_TicketCallback cb, void *cb_cls);
248 
249 
265  struct GNUNET_RECLAIM_Handle *h,
266  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
267  const struct GNUNET_RECLAIM_Ticket *ticket,
268  GNUNET_RECLAIM_ContinuationWithStatus cb, void *cb_cls);
269 
270 
285  struct GNUNET_RECLAIM_Handle *h,
286  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
287  const struct GNUNET_RECLAIM_Ticket *ticket,
288  GNUNET_RECLAIM_AttributeResult cb, void *cb_cls);
289 
290 
310  struct GNUNET_RECLAIM_Handle *h,
311  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
313  GNUNET_RECLAIM_TicketCallback proc, void *proc_cls,
315 
316 
323 void
325 
326 
334 void
336 
337 
343 void
345 
346 
355 void
357 
358 
359 #if 0 /* keep Emacsens' auto-indent happy */
360 {
361 #endif
362 #ifdef __cplusplus
363 }
364 #endif
365 
366 
367 /* ifndef GNUNET_RECLAIM_SERVICE_H */
368 #endif
369  /* end of group reclaim */
371 
372 /* end of gnunet_reclaim_service.h */
Handle to the service.
Definition: reclaim_api.c:232
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:948
static char * pkey
Public key of the zone to look in, in ASCII.
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:844
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:1139
void GNUNET_RECLAIM_disconnect(struct GNUNET_RECLAIM_Handle *h)
Disconnect from identity provider service.
Definition: reclaim_api.c:814
void GNUNET_RECLAIM_cancel(struct GNUNET_RECLAIM_Operation *op)
Cancel an identity provider operation.
Definition: reclaim_api.c:799
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:127
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:1183
void GNUNET_RECLAIM_ticket_iteration_stop(struct GNUNET_RECLAIM_TicketIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1203
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:189
Private ECC key encoded for transmission.
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:994
static struct GNUNET_TIME_Relative exp_interval
Attribute expiration interval.
Handle for an operation with the service.
Definition: reclaim_api.c:41
static void error_cb(GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
Definition: gnunet_gst.c:327
GNUNET_RECLAIM_AttributeResult proc
The continuation to call with the results.
Definition: reclaim_api.c:194
void * proc_cls
Closure for proc.
Definition: reclaim_api.c:199
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
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:1234
Handle for a attribute iterator operation.
Definition: reclaim_api.c:165
void(* GNUNET_RECLAIM_AttributeResult)(void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr)
Callback used to notify the client of attribute results.
void(* GNUNET_RECLAIM_ContinuationWithStatus)(void *cls, int32_t success, const char *emsg)
Continuation called to notify client about result of the operation.
void(* GNUNET_RECLAIM_TicketCallback)(void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
Method called when a token has been issued.
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:891
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:1046
void * error_cb_cls
Closure for error_cb.
Definition: reclaim_api.c:147
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
struct GNUNET_CRYPTO_EcdsaPublicKey identity
The ticket issuer (= the user)
uint64_t rnd
The ticket random (NBO)
configuration data
Definition: configuration.c:83
void GNUNET_RECLAIM_get_attributes_stop(struct GNUNET_RECLAIM_AttributeIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1015
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...
void * error_cb_cls
Closure for error_cb.
Definition: reclaim_api.c:209
A list of GNUNET_RECLAIM_ATTRIBUTE_Claim structures.
Handle for a ticket iterator operation.
Definition: reclaim_api.c:103
static char * rp
Relying party.
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:1095
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
struct GNUNET_RECLAIM_Handle * GNUNET_RECLAIM_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the re:claimID service.
Definition: reclaim_api.c:774
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:122
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:184
Time for relative time used by GNUnet, in microseconds.