aboutsummaryrefslogtreecommitdiff
path: root/src/identity/identity_api_lookup.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-14 19:47:32 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 12:11:18 +0200
commit96c802b46be51e5c45f34e2de823f787d26c2929 (patch)
tree457ccfd8f9a61563af86318739c4a8f964a57025 /src/identity/identity_api_lookup.c
parentc14e3a2769ff0f15fdbb32797e37e43ce2344fa3 (diff)
downloadgnunet-96c802b46be51e5c45f34e2de823f787d26c2929.tar.gz
gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.zip
- towards crypto agility; wip
Diffstat (limited to 'src/identity/identity_api_lookup.c')
-rw-r--r--src/identity/identity_api_lookup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/identity/identity_api_lookup.c b/src/identity/identity_api_lookup.c
index 26b1eacd7..51afb2515 100644
--- a/src/identity/identity_api_lookup.c
+++ b/src/identity/identity_api_lookup.c
@@ -127,14 +127,12 @@ handle_identity_update (void *cls, const struct UpdateMessage *um)
127 struct GNUNET_IDENTITY_EgoLookup *el = cls; 127 struct GNUNET_IDENTITY_EgoLookup *el = cls;
128 uint16_t name_len = ntohs (um->name_len); 128 uint16_t name_len = ntohs (um->name_len);
129 const char *str = (0 == name_len) ? NULL : (const char *) &um[1]; 129 const char *str = (0 == name_len) ? NULL : (const char *) &um[1];
130 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
131 struct GNUNET_HashCode id; 130 struct GNUNET_HashCode id;
132 struct GNUNET_IDENTITY_Ego ego; 131 struct GNUNET_IDENTITY_Ego ego;
133 memset (&ego, 0, sizeof (ego)); 132 memset (&ego, 0, sizeof (ego));
134 133
135 GNUNET_break (GNUNET_YES != ntohs (um->end_of_list)); 134 GNUNET_break (GNUNET_YES != ntohs (um->end_of_list));
136 GNUNET_CRYPTO_ecdsa_key_get_public (&um->private_key, &pub); 135 GNUNET_CRYPTO_hash (&um->private_key, sizeof(um->private_key), &id);
137 GNUNET_CRYPTO_hash (&pub, sizeof(pub), &id);
138 ego.pk = um->private_key; 136 ego.pk = um->private_key;
139 ego.name = (char *) str; 137 ego.name = (char *) str;
140 ego.id = id; 138 ego.id = id;