From 8bf864c25bda97c1448b709a76a168834753ff86 Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Thu, 1 Oct 2020 21:13:43 +0200 Subject: adding the messenger service and its client-side library Signed-off-by: TheJackiMonster --- src/identity/identity.h | 81 +++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 40 deletions(-) (limited to 'src/identity/identity.h') 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 @@ #include "gnunet_common.h" +/** + * Handle for an ego. + */ +struct GNUNET_IDENTITY_Ego +{ + /** + * Hash of the private key of this ego. + */ + struct GNUNET_HashCode id; + + /** + * The identity key pair + */ + struct GNUNET_IDENTITY_PublicKey pub; + + /** + * The identity key pair + */ + struct GNUNET_IDENTITY_PrivateKey pk; + + /** + * Current name associated with this ego. + */ + char *name; + + /** + * Client context associated with this ego. + */ + void *ctx; + + /** + * Set to true once @e pub was initialized + */ + bool pub_initialized; +}; + + + GNUNET_NETWORK_STRUCT_BEGIN @@ -95,7 +133,7 @@ struct UpdateMessage /** * The private key */ - struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; + struct GNUNET_IDENTITY_PrivateKey private_key; /* followed by 0-terminated ego name */ }; @@ -151,7 +189,7 @@ struct SetDefaultMessage /** * The private key */ - struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; + struct GNUNET_IDENTITY_PrivateKey private_key; /* followed by 0-terminated service name */ }; @@ -181,7 +219,7 @@ struct CreateRequestMessage /** * The private key */ - struct GNUNET_CRYPTO_EcdsaPrivateKey private_key; + struct GNUNET_IDENTITY_PrivateKey private_key; /* followed by 0-terminated identity name */ }; @@ -239,42 +277,5 @@ struct DeleteMessage GNUNET_NETWORK_STRUCT_END -/** - * Handle for an ego. - */ -struct GNUNET_IDENTITY_Ego -{ - /** - * Hash of the private key of this ego. - */ - struct GNUNET_HashCode id; - - /** - * Private key associated with this ego. - */ - struct GNUNET_CRYPTO_EcdsaPrivateKey pk; - - /** - * Public key associated with this ego. Initialized on demand. - * Always use #GNUNET_IDENTITY_ego_get_public_key() to obtain. - */ - struct GNUNET_CRYPTO_EcdsaPublicKey pub; - - /** - * Current name associated with this ego. - */ - char *name; - - /** - * Client context associated with this ego. - */ - void *ctx; - - /** - * Set to true once @e pub was initialized - */ - bool pub_initialized; -}; - #endif -- cgit v1.2.3