GNUnet 0.25.2-11-g84e94e98c
 
Loading...
Searching...
No Matches
gnunet_identity_service.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2013--2023 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
45#ifndef GNUNET_IDENTITY_SERVICE_H
46#define GNUNET_IDENTITY_SERVICE_H
47
48#include "gnunet_common.h"
49#ifdef __cplusplus
50extern "C" {
51#if 0 /* keep Emacsens' auto-indent happy */
52}
53#endif
54#endif
55
56
57#include "gnunet_util_lib.h"
58
59
63#define GNUNET_IDENTITY_VERSION 0x00000100
64
65
70
75
80
81
90
91
99
100
107void
110;
111
112
119const char*
121
122
156typedef void
157(*GNUNET_IDENTITY_Callback) (void *cls,
158 struct GNUNET_IDENTITY_Ego *ego,
159 void **ctx,
160 const char *name);
161
162
174 void *cb_cls);
175
176
184typedef void
185(*GNUNET_IDENTITY_Continuation) (void *cls,
186 enum GNUNET_ErrorCode ec);
187
188
194void
196
197
206typedef void
208 void *cls,
210 enum GNUNET_ErrorCode ec);
211
212
226 const char *name,
227 const struct GNUNET_CRYPTO_BlindablePrivateKey *privkey,
228 enum GNUNET_CRYPTO_KeyType ktype,
230 void *cont_cls);
231
232
245 const char *old_name,
246 const char *new_name,
248 void *cb_cls);
249
250
262 const char *name,
264 void *cb_cls);
265
266
275void
277
278
279/* ************* convenience API to lookup an ego ***************** */
280
287typedef void
289 struct GNUNET_IDENTITY_Ego *ego);
290
295
296
308 const char *name,
310 void *cb_cls);
311
312
318void
320
328typedef void
330 void *cls,
331 const struct GNUNET_CRYPTO_BlindablePrivateKey *priv,
332 const char *ego_name);
333
334
339
340
355 const struct GNUNET_CONFIGURATION_Handle *cfg,
356 const char *suffix,
358 void *cb_cls);
359
360
366void
369
370
371#if 0 /* keep Emacsens' auto-indent happy */
372{
373#endif
374#ifdef __cplusplus
375}
376#endif
377
378/* ifndef GNUNET_IDENTITY_SERVICE_H */
379#endif
380
/* end of group identity */
382
/* end of group addition */
384
385/* end of gnunet_identity_service.h */
static struct GNUNET_ARM_Operation * op
Current operation.
Definition gnunet-arm.c:143
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition gnunet-arm.c:98
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition gnunet-arm.c:108
static struct GNUNET_FS_Handle * ctx
struct GNUNET_CRYPTO_BlindablePrivateKey pk
Private key from command line option, or NULL.
char * ego_name
static char * name
Name (label) of the records to list.
static struct GNUNET_IDENTITY_EgoLookup * el
Handle for our ego lookup.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
GNUNET_ErrorCode
Taler error codes.
struct GNUNET_IDENTITY_Operation * GNUNET_IDENTITY_rename(struct GNUNET_IDENTITY_Handle *id, const char *old_name, const char *new_name, GNUNET_IDENTITY_Continuation cb, void *cb_cls)
Renames an existing ego.
struct GNUNET_IDENTITY_Operation * GNUNET_IDENTITY_create(struct GNUNET_IDENTITY_Handle *id, const char *name, const struct GNUNET_CRYPTO_BlindablePrivateKey *privkey, enum GNUNET_CRYPTO_KeyType ktype, GNUNET_IDENTITY_CreateContinuation cont, void *cont_cls)
Create a new ego with the given name.
const char * GNUNET_IDENTITY_ego_get_name(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the name associated with an ego.
struct GNUNET_IDENTITY_EgoSuffixLookup * GNUNET_IDENTITY_ego_lookup_by_suffix(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *suffix, GNUNET_IDENTITY_EgoSuffixCallback cb, void *cb_cls)
Obtain the ego with the maximum suffix match between the ego's name and the given domain name suffix.
void(* GNUNET_IDENTITY_EgoSuffixCallback)(void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *priv, const char *ego_name)
Function called with the result.
void GNUNET_IDENTITY_ego_get_public_key(struct GNUNET_IDENTITY_Ego *ego, struct GNUNET_CRYPTO_BlindablePublicKey *pk)
Get the identifier (public key) of an ego.
struct GNUNET_IDENTITY_Operation * GNUNET_IDENTITY_delete(struct GNUNET_IDENTITY_Handle *id, const char *name, GNUNET_IDENTITY_Continuation cb, void *cb_cls)
Delete an existing ego.
struct GNUNET_IDENTITY_EgoLookup * GNUNET_IDENTITY_ego_lookup(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *name, GNUNET_IDENTITY_EgoCallback cb, void *cb_cls)
Lookup an ego by name.
void(* GNUNET_IDENTITY_Callback)(void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *name)
Method called to inform about the egos of this peer.
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.
void GNUNET_IDENTITY_cancel(struct GNUNET_IDENTITY_Operation *op)
Cancel an identity operation.
void GNUNET_IDENTITY_ego_lookup_cancel(struct GNUNET_IDENTITY_EgoLookup *el)
Abort ego lookup attempt.
void(* GNUNET_IDENTITY_EgoCallback)(void *cls, struct GNUNET_IDENTITY_Ego *ego)
Function called with the result.
void GNUNET_IDENTITY_disconnect(struct GNUNET_IDENTITY_Handle *h)
Disconnect from identity service.
const struct GNUNET_CRYPTO_BlindablePrivateKey * GNUNET_IDENTITY_ego_get_private_key(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the ECC key associated with a ego.
struct GNUNET_IDENTITY_Ego * GNUNET_IDENTITY_ego_get_anonymous(void)
Obtain the ego representing 'anonymous' users.
void GNUNET_IDENTITY_ego_lookup_by_suffix_cancel(struct GNUNET_IDENTITY_EgoSuffixLookup *el)
Abort ego suffix lookup attempt.
void(* GNUNET_IDENTITY_Continuation)(void *cls, enum GNUNET_ErrorCode ec)
Function called once the requested operation has been completed.
void(* GNUNET_IDENTITY_CreateContinuation)(void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *pk, enum GNUNET_ErrorCode ec)
Function called once the requested operation has been completed.
GNUNET_CRYPTO_KeyType
Key type for the generic public key union.
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
Handle for ego lookup.
void * cb_cls
Closure for cb.
GNUNET_IDENTITY_EgoCallback cb
Function to call with the result.
GNUNET_IDENTITY_EgoSuffixCallback cb
Function to call with the result.
char * suffix
Suffix we are looking up.
Handle for an ego.
Definition identity.h:37
Handle for the service.
GNUNET_IDENTITY_Callback cb
Function to call when we receive updates.
void * cb_cls
Closure for cb.
Handle for an operation with the identity service.
GNUNET_IDENTITY_Continuation cont
Continuation to invoke with the result of the transmission; cb and create_cont will be NULL in this c...
void * cls
Closure for cont or cb.
GNUNET_IDENTITY_Callback cb
Continuation to invoke with the result of the transmission for 'get' operations (cont and create_cont...