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 
68 {
73 
78 
82  uint64_t rnd;
83 };
84 
85 
95  void *cls, const struct GNUNET_RECLAIM_Ticket *ticket);
96 
97 
106 typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls,
107  int32_t success,
108  const char *emsg);
109 
110 
119  void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
120  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr);
121 
122 
129 struct GNUNET_RECLAIM_Handle *
131 
132 
147  struct GNUNET_RECLAIM_Handle *h,
148  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
149  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
150  const struct GNUNET_TIME_Relative *exp_interval,
151  GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
152 
153 
167  struct GNUNET_RECLAIM_Handle *h,
168  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
169  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
170  GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
171 
172 
199  struct GNUNET_RECLAIM_Handle *h,
200  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
204 
205 
212 void
215 
216 
224 void
227 
228 
244  struct GNUNET_RECLAIM_Handle *h,
245  const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
246  const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
247  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
248  GNUNET_RECLAIM_TicketCallback cb, void *cb_cls);
249 
250 
266  struct GNUNET_RECLAIM_Handle *h,
267  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
268  const struct GNUNET_RECLAIM_Ticket *ticket,
269  GNUNET_RECLAIM_ContinuationWithStatus cb, void *cb_cls);
270 
271 
286  struct GNUNET_RECLAIM_Handle *h,
287  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
288  const struct GNUNET_RECLAIM_Ticket *ticket,
289  GNUNET_RECLAIM_AttributeResult cb, void *cb_cls);
290 
291 
311  struct GNUNET_RECLAIM_Handle *h,
312  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
314  GNUNET_RECLAIM_TicketCallback proc, void *proc_cls,
316 
317 
324 void
326 
327 
335 void
337 
338 
344 void
346 
347 
356 void
358 
359 
360 #if 0 /* keep Emacsens' auto-indent happy */
361 {
362 #endif
363 #ifdef __cplusplus
364 }
365 #endif
366 
367 
368 /* ifndef GNUNET_RECLAIM_SERVICE_H */
369 #endif
370  /* end of group reclaim */
372 
373 /* end of gnunet_reclaim_service.h */
Handle to the service.
Definition: reclaim_api.c:238
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:953
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:849
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:1143
void GNUNET_RECLAIM_disconnect(struct GNUNET_RECLAIM_Handle *h)
Disconnect from identity provider service.
Definition: reclaim_api.c:819
void GNUNET_RECLAIM_cancel(struct GNUNET_RECLAIM_Operation *op)
Cancel an identity provider operation.
Definition: reclaim_api.c:804
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:131
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:1187
void GNUNET_RECLAIM_ticket_iteration_stop(struct GNUNET_RECLAIM_TicketIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1207
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:195
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:999
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:311
GNUNET_RECLAIM_AttributeResult proc
The continuation to call with the results.
Definition: reclaim_api.c:200
void * proc_cls
Closure for proc.
Definition: reclaim_api.c:205
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:1238
Handle for a attribute iterator operation.
Definition: reclaim_api.c:169
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:896
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:1051
void * error_cb_cls
Closure for error_cb.
Definition: reclaim_api.c:151
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:85
void GNUNET_RECLAIM_get_attributes_stop(struct GNUNET_RECLAIM_AttributeIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1020
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:215
A list of GNUNET_RECLAIM_ATTRIBUTE_Claim structures.
Handle for a ticket iterator operation.
Definition: reclaim_api.c:105
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:1099
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:779
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:126
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:190
Time for relative time used by GNUnet, in microseconds.