aboutsummaryrefslogtreecommitdiff
path: root/src/identity/identity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity/identity.h')
-rw-r--r--src/identity/identity.h81
1 files changed, 41 insertions, 40 deletions
diff --git a/src/identity/identity.h b/src/identity/identity.h
index ef638fa36..11c5883bc 100644
--- a/src/identity/identity.h
+++ b/src/identity/identity.h
@@ -30,6 +30,44 @@
30 30
31#include "gnunet_common.h" 31#include "gnunet_common.h"
32 32
33/**
34 * Handle for an ego.
35 */
36struct GNUNET_IDENTITY_Ego
37{
38 /**
39 * Hash of the private key of this ego.
40 */
41 struct GNUNET_HashCode id;
42
43 /**
44 * The identity key pair
45 */
46 struct GNUNET_IDENTITY_PublicKey pub;
47
48 /**
49 * The identity key pair
50 */
51 struct GNUNET_IDENTITY_PrivateKey pk;
52
53 /**
54 * Current name associated with this ego.
55 */
56 char *name;
57
58 /**
59 * Client context associated with this ego.
60 */
61 void *ctx;
62
63 /**
64 * Set to true once @e pub was initialized
65 */
66 bool pub_initialized;
67};
68
69
70
33 71
34GNUNET_NETWORK_STRUCT_BEGIN 72GNUNET_NETWORK_STRUCT_BEGIN
35 73
@@ -95,7 +133,7 @@ struct UpdateMessage
95 /** 133 /**
96 * The private key 134 * The private key
97 */ 135 */
98 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; 136 struct GNUNET_IDENTITY_PrivateKey private_key;
99 137
100 /* followed by 0-terminated ego name */ 138 /* followed by 0-terminated ego name */
101}; 139};
@@ -151,7 +189,7 @@ struct SetDefaultMessage
151 /** 189 /**
152 * The private key 190 * The private key
153 */ 191 */
154 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; 192 struct GNUNET_IDENTITY_PrivateKey private_key;
155 193
156 /* followed by 0-terminated service name */ 194 /* followed by 0-terminated service name */
157}; 195};
@@ -181,7 +219,7 @@ struct CreateRequestMessage
181 /** 219 /**
182 * The private key 220 * The private key
183 */ 221 */
184 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; 222 struct GNUNET_IDENTITY_PrivateKey private_key;
185 223
186 /* followed by 0-terminated identity name */ 224 /* followed by 0-terminated identity name */
187}; 225};
@@ -239,42 +277,5 @@ struct DeleteMessage
239 277
240GNUNET_NETWORK_STRUCT_END 278GNUNET_NETWORK_STRUCT_END
241 279
242/**
243 * Handle for an ego.
244 */
245struct GNUNET_IDENTITY_Ego
246{
247 /**
248 * Hash of the private key of this ego.
249 */
250 struct GNUNET_HashCode id;
251
252 /**
253 * Private key associated with this ego.
254 */
255 struct GNUNET_CRYPTO_EcdsaPrivateKey pk;
256
257 /**
258 * Public key associated with this ego. Initialized on demand.
259 * Always use #GNUNET_IDENTITY_ego_get_public_key() to obtain.
260 */
261 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
262
263 /**
264 * Current name associated with this ego.
265 */
266 char *name;
267
268 /**
269 * Client context associated with this ego.
270 */
271 void *ctx;
272
273 /**
274 * Set to true once @e pub was initialized
275 */
276 bool pub_initialized;
277};
278
279 280
280#endif 281#endif