aboutsummaryrefslogtreecommitdiff
path: root/src/identity/identity_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-13 12:00:01 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-13 12:00:01 +0000
commita35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae (patch)
treeb7768c5cb22e8a4f84d51cbd06dc04861fdb8510 /src/identity/identity_api.c
parent95d42fdcb47eedcf2747614a22dacd676bc7faae (diff)
downloadgnunet-a35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae.tar.gz
gnunet-a35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae.zip
splitting 'struct GNUNET_CRYPTO_EccPublicKey' into one struct for signing and another for encryption
Diffstat (limited to 'src/identity/identity_api.c')
-rw-r--r--src/identity/identity_api.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index 17e3cff92..157fa6e4f 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -179,12 +179,12 @@ const struct GNUNET_IDENTITY_Ego *
179GNUNET_IDENTITY_ego_get_anonymous () 179GNUNET_IDENTITY_ego_get_anonymous ()
180{ 180{
181 static struct GNUNET_IDENTITY_Ego anon; 181 static struct GNUNET_IDENTITY_Ego anon;
182 struct GNUNET_CRYPTO_EccPublicKey pub; 182 struct GNUNET_CRYPTO_EccPublicSignKey pub;
183 183
184 if (NULL != anon.pk) 184 if (NULL != anon.pk)
185 return &anon; 185 return &anon;
186 anon.pk = (struct GNUNET_CRYPTO_EccPrivateKey *) GNUNET_CRYPTO_ecc_key_get_anonymous (); 186 anon.pk = (struct GNUNET_CRYPTO_EccPrivateKey *) GNUNET_CRYPTO_ecc_key_get_anonymous ();
187 GNUNET_CRYPTO_ecc_key_get_public (anon.pk, 187 GNUNET_CRYPTO_ecc_key_get_public_for_signature (anon.pk,
188 &pub); 188 &pub);
189 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &anon.id); 189 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &anon.id);
190 return &anon; 190 return &anon;
@@ -249,7 +249,7 @@ message_handler (void *cls,
249 const struct GNUNET_IDENTITY_ResultCodeMessage *rcm; 249 const struct GNUNET_IDENTITY_ResultCodeMessage *rcm;
250 const struct GNUNET_IDENTITY_UpdateMessage *um; 250 const struct GNUNET_IDENTITY_UpdateMessage *um;
251 const struct GNUNET_IDENTITY_SetDefaultMessage *sdm; 251 const struct GNUNET_IDENTITY_SetDefaultMessage *sdm;
252 struct GNUNET_CRYPTO_EccPublicKey pub; 252 struct GNUNET_CRYPTO_EccPublicSignKey pub;
253 struct GNUNET_HashCode id; 253 struct GNUNET_HashCode id;
254 const char *str; 254 const char *str;
255 uint16_t size; 255 uint16_t size;
@@ -326,7 +326,7 @@ message_handler (void *cls,
326 h->cb (h->cb_cls, NULL, NULL, NULL); 326 h->cb (h->cb_cls, NULL, NULL, NULL);
327 break; 327 break;
328 } 328 }
329 GNUNET_CRYPTO_ecc_key_get_public (&um->private_key, 329 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&um->private_key,
330 &pub); 330 &pub);
331 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id); 331 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id);
332 if (0 == name_len) 332 if (0 == name_len)
@@ -406,7 +406,7 @@ message_handler (void *cls,
406 } 406 }
407 /* Note: we know which service this should be for, so we're not 407 /* Note: we know which service this should be for, so we're not
408 really using 'str' henceforth */ 408 really using 'str' henceforth */
409 GNUNET_CRYPTO_ecc_key_get_public (&sdm->private_key, 409 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&sdm->private_key,
410 &pub); 410 &pub);
411 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id); 411 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id);
412 ego = GNUNET_CONTAINER_multihashmap_get (h->egos, 412 ego = GNUNET_CONTAINER_multihashmap_get (h->egos,
@@ -602,9 +602,9 @@ GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego)
602 */ 602 */
603void 603void
604GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, 604GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego,
605 struct GNUNET_CRYPTO_EccPublicKey *pk) 605 struct GNUNET_CRYPTO_EccPublicSignKey *pk)
606{ 606{
607 GNUNET_CRYPTO_ecc_key_get_public (ego->pk, 607 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ego->pk,
608 pk); 608 pk);
609} 609}
610 610