gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: fix api for lazy pubkey loading


From: gnunet
Subject: [gnunet] branch master updated: fix api for lazy pubkey loading
Date: Mon, 18 May 2020 08:57:38 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 3be730446 fix api for lazy pubkey loading
3be730446 is described below

commit 3be730446ba439170a67798dca8c634625c82cea
Author: Martin Schanzenbach <address@hidden>
AuthorDate: Mon May 18 08:52:32 2020 +0200

    fix api for lazy pubkey loading
---
 src/identity/identity_api.c        | 5 +++--
 src/identity/identity_api_lookup.c | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index 693d4392e..c2fcc5075 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -392,6 +392,7 @@ handle_identity_update (void *cls,
       return;
     }
     ego = GNUNET_new (struct GNUNET_IDENTITY_Ego);
+    ego->pub_initialized = GNUNET_NO;
     ego->pk = um->private_key;
     ego->name = GNUNET_strdup (str);
     ego->id = id;
@@ -607,11 +608,11 @@ void
 GNUNET_IDENTITY_ego_get_public_key (struct GNUNET_IDENTITY_Ego *ego,
                                     struct GNUNET_CRYPTO_EcdsaPublicKey *pk)
 {
-  if (! ego->pub_initialized)
+  if (GNUNET_NO == ego->pub_initialized)
   {
     GNUNET_CRYPTO_ecdsa_key_get_public (&ego->pk,
                                         &ego->pub);
-    ego->pub_initialized = true;
+    ego->pub_initialized = GNUNET_YES;
   }
   *pk = ego->pub;
 }
diff --git a/src/identity/identity_api_lookup.c 
b/src/identity/identity_api_lookup.c
index 6c61d3977..26b1eacd7 100644
--- a/src/identity/identity_api_lookup.c
+++ b/src/identity/identity_api_lookup.c
@@ -130,6 +130,7 @@ handle_identity_update (void *cls, const struct 
UpdateMessage *um)
   struct GNUNET_CRYPTO_EcdsaPublicKey pub;
   struct GNUNET_HashCode id;
   struct GNUNET_IDENTITY_Ego ego;
+  memset (&ego, 0, sizeof (ego));
 
   GNUNET_break (GNUNET_YES != ntohs (um->end_of_list));
   GNUNET_CRYPTO_ecdsa_key_get_public (&um->private_key, &pub);

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]