GNUnet 0.21.1
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
34#ifndef GNUNET_RECLAIM_SERVICE_H
35#define GNUNET_RECLAIM_SERVICE_H
36
37#ifdef __cplusplus
38extern "C" {
39#if 0 /* keep Emacsens' auto-indent happy */
40}
41#endif
42#endif
43
44
46#include "gnunet_reclaim_lib.h"
47#include "gnunet_util_lib.h"
48
52#define GNUNET_RECLAIM_VERSION 0x00000002
53
58
59
64
65#define GNUNET_RECLAIM_TICKET_RP_URI_MAX_LEN 256
66
67#define GNUNET_RECLAIM_TICKET_RP_URI_URN_PREFIX "urn:gns:"
68
76{
84
88 //struct GNUNET_CRYPTO_PublicKey identity;
89
93 //struct GNUNET_RECLAIM_Identifier rnd;
94
95
101 //char rp_uri[GNUNET_RECLAIM_TICKET_RP_URI_MAX_LEN];
102};
103
104
115 void *cls,
116 const struct GNUNET_RECLAIM_Ticket *ticket,
117 const char* rp_uri);
118
128 void *cls,
129 const struct GNUNET_RECLAIM_Ticket *ticket,
130 const struct GNUNET_RECLAIM_PresentationList *presentations);
131
132
141typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls,
142 int32_t success,
143 const char *emsg);
144
153 void *cls, const struct GNUNET_CRYPTO_PublicKey *identity,
154 const struct GNUNET_RECLAIM_Attribute *attr);
155
165 void *cls, const struct GNUNET_CRYPTO_PublicKey *identity,
166 const struct GNUNET_RECLAIM_Attribute *attr,
167 const struct GNUNET_RECLAIM_Presentation *presentation);
168
169
179 void *cls, const struct GNUNET_CRYPTO_PublicKey *identity,
181
182
191
192
207 struct GNUNET_RECLAIM_Handle *h,
208 const struct GNUNET_CRYPTO_PrivateKey *pkey,
209 const struct GNUNET_RECLAIM_Attribute *attr,
211 GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
212
213
228 struct GNUNET_RECLAIM_Handle *h,
229 const struct GNUNET_CRYPTO_PrivateKey *pkey,
233 void *cont_cls);
234
235
249 struct GNUNET_RECLAIM_Handle *h,
250 const struct GNUNET_CRYPTO_PrivateKey *pkey,
251 const struct GNUNET_RECLAIM_Attribute *attr,
252 GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
253
267 struct GNUNET_RECLAIM_Handle *h,
268 const struct GNUNET_CRYPTO_PrivateKey *pkey,
269 const struct GNUNET_RECLAIM_Credential *cred,
271 void *cont_cls);
272
299 struct GNUNET_RECLAIM_Handle *h,
304
305
312void
315
316
324void
327
328
355 struct GNUNET_RECLAIM_Handle *h,
358 void *error_cb_cls,
360 void *proc_cls,
362 void *finish_cb_cls);
363
364
371void
374
375
383void
386
387
403 struct GNUNET_RECLAIM_Handle *h,
404 const struct GNUNET_CRYPTO_PrivateKey *iss,
405 const char *rp_uri,
406 const struct GNUNET_RECLAIM_AttributeList *attrs,
407 GNUNET_RECLAIM_IssueTicketCallback cb, void *cb_cls);
408
409
425 struct GNUNET_RECLAIM_Handle *h,
427 const struct GNUNET_RECLAIM_Ticket *ticket,
429
430
444 struct GNUNET_RECLAIM_Handle *h,
445 const struct GNUNET_RECLAIM_Ticket *ticket,
446 const char *rp_uri,
447 GNUNET_RECLAIM_AttributeTicketResult cb, void *cb_cls);
448
449
469 struct GNUNET_RECLAIM_Handle *h,
472 GNUNET_RECLAIM_TicketCallback proc, void *proc_cls,
474
475
482void
484
485
493void
495
496
502void
504
505
514void
516
517#if 0 /* keep Emacsens' auto-indent happy */
518{
519#endif
520#ifdef __cplusplus
521}
522#endif
523
524
525/* ifndef GNUNET_RECLAIM_SERVICE_H */
526#endif
527 /* end of group reclaim */
529 /* end of group addition */
531
532/* end of gnunet_reclaim_service.h */
static void error_cb(void *cls)
Function called if lookup fails.
Definition: gnunet-abd.c:479
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:144
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:99
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:109
static char * pkey
Public key of the zone to look in, in ASCII.
static struct GNUNET_IDENTITY_Handle * identity
Which namespace do we publish to? NULL if we do not publish to a namespace.
static struct GNUNET_TIME_Relative exp_interval
Attribute expiration interval.
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
static struct GNUNET_RECLAIM_Identifier credential
Credential ID.
Identity service; implements identity management for GNUnet.
Identity attribute definitions.
#define GNUNET_DNSPARSER_MAX_LABEL_LENGTH
Maximum length of a label in DNS.
void GNUNET_RECLAIM_disconnect(struct GNUNET_RECLAIM_Handle *h)
Disconnect from identity provider service.
Definition: reclaim_api.c:1150
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_credential_store(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Credential *credential, const struct GNUNET_TIME_Relative *exp_interval, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Store a credential.
Definition: reclaim_api.c:1254
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_ticket_iteration_next(struct GNUNET_RECLAIM_TicketIterator *it)
Calls the ticket processor specified in GNUNET_RECLAIM_ticket_iteration_start for the next record.
Definition: reclaim_api.c:1639
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_consume(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri, GNUNET_RECLAIM_AttributeTicketResult cb, void *cb_cls)
Consumes an issued ticket.
Definition: reclaim_api.c:1546
void GNUNET_RECLAIM_cancel(struct GNUNET_RECLAIM_Operation *op)
Cancel an identity provider operation.
Definition: reclaim_api.c:1135
void GNUNET_RECLAIM_get_attributes_stop(struct GNUNET_RECLAIM_AttributeIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1398
void GNUNET_RECLAIM_get_credentials_next(struct GNUNET_RECLAIM_CredentialIterator *ait)
Calls the record processor specified in GNUNET_RECLAIM_get_credentials_start for the next record.
Definition: reclaim_api.c:1462
struct GNUNET_RECLAIM_AttributeIterator * GNUNET_RECLAIM_get_attributes_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_RECLAIM_AttributeResult proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
List all attributes for a local identity.
Definition: reclaim_api.c:1339
void(* GNUNET_RECLAIM_TicketCallback)(void *cls, const struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri)
Method called when a token has been issued.
void(* GNUNET_RECLAIM_AttributeResult)(void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr)
Callback used to notify the client of attribute results.
void(* GNUNET_RECLAIM_CredentialResult)(void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Credential *credential)
Callback used to notify the client of credential results.
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_revoke(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, const struct GNUNET_RECLAIM_Ticket *ticket, GNUNET_RECLAIM_ContinuationWithStatus cb, void *cb_cls)
Revoked an issued ticket.
Definition: reclaim_api.c:1690
void GNUNET_RECLAIM_get_attributes_next(struct GNUNET_RECLAIM_AttributeIterator *it)
Calls the record processor specified in GNUNET_RECLAIM_get_attributes_start for the next record.
Definition: reclaim_api.c:1384
void(* GNUNET_RECLAIM_IssueTicketCallback)(void *cls, const struct GNUNET_RECLAIM_Ticket *ticket, const struct GNUNET_RECLAIM_PresentationList *presentations)
Method called when a token has been issued.
struct GNUNET_RECLAIM_Handle * GNUNET_RECLAIM_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the re:claimID service.
Definition: reclaim_api.c:1118
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_attribute_store(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Attribute *attr, const struct GNUNET_TIME_Relative *exp_interval, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Store an attribute.
Definition: reclaim_api.c:1169
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_attribute_delete(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Attribute *attr, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Delete an attribute.
Definition: reclaim_api.c:1213
void(* GNUNET_RECLAIM_AttributeTicketResult)(void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr, const struct GNUNET_RECLAIM_Presentation *presentation)
Callback used to notify the client of attribute results.
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_ticket_issue(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *iss, const char *rp_uri, const struct GNUNET_RECLAIM_AttributeList *attrs, GNUNET_RECLAIM_IssueTicketCallback cb, void *cb_cls)
Issues a ticket to a relying party.
Definition: reclaim_api.c:1497
struct GNUNET_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:1586
void GNUNET_RECLAIM_get_credentials_stop(struct GNUNET_RECLAIM_CredentialIterator *ait)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1477
struct GNUNET_RECLAIM_Operation * GNUNET_RECLAIM_credential_delete(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const struct GNUNET_RECLAIM_Credential *cred, GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls)
Delete a credential.
Definition: reclaim_api.c:1298
void GNUNET_RECLAIM_ticket_iteration_stop(struct GNUNET_RECLAIM_TicketIterator *it)
Stops iteration and releases the handle for further calls.
Definition: reclaim_api.c:1659
struct GNUNET_RECLAIM_CredentialIterator * GNUNET_RECLAIM_get_credentials_start(struct GNUNET_RECLAIM_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *identity, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_RECLAIM_CredentialResult proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
List all credentials for a local identity.
Definition: reclaim_api.c:1416
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
Handle for a attribute iterator operation.
Definition: reclaim_api.c:181
void * error_cb_cls
Closure for error_cb.
Definition: reclaim_api.c:225
GNUNET_RECLAIM_AttributeResult proc
The continuation to call with the results.
Definition: reclaim_api.c:210
void * proc_cls
Closure for proc.
Definition: reclaim_api.c:215
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:200
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:205
A list of GNUNET_RECLAIM_Attribute structures.
Handle for a credential iterator operation.
Definition: reclaim_api.c:248
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:267
void * proc_cls
Closure for proc.
Definition: reclaim_api.c:282
GNUNET_RECLAIM_CredentialResult proc
The continuation to call with the results.
Definition: reclaim_api.c:277
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:272
void * error_cb_cls
Closure for error_cb.
Definition: reclaim_api.c:292
Handle to the service.
Definition: reclaim_api.c:316
Handle for an operation with the service.
Definition: reclaim_api.c:40
A list of GNUNET_RECLAIM_Presentation structures.
A credential presentation.
Handle for a ticket iterator operation.
Definition: reclaim_api.c:118
void * error_cb_cls
Closure for error_cb.
Definition: reclaim_api.c:162
GNUNET_SCHEDULER_TaskCallback finish_cb
Function to call on completion.
Definition: reclaim_api.c:137
void * finish_cb_cls
Closure for finish_cb.
Definition: reclaim_api.c:142
The authorization ticket.
char gns_name[63 *2+2]
The ticket.
Time for relative time used by GNUnet, in microseconds.