aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns.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/gns/gnunet-gns.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/gns/gnunet-gns.c')
-rw-r--r--src/gns/gnunet-gns.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c
index 4472c764e..0a6bcf66b 100644
--- a/src/gns/gnunet-gns.c
+++ b/src/gns/gnunet-gns.c
@@ -180,7 +180,7 @@ process_lookup_result (void *cls, uint32_t rd_count,
180 * @param shorten_key private key used for shortening, can be NULL 180 * @param shorten_key private key used for shortening, can be NULL
181 */ 181 */
182static void 182static void
183lookup_with_keys (const struct GNUNET_CRYPTO_EccPublicKey *pkey, 183lookup_with_keys (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey,
184 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key) 184 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key)
185{ 185{
186 if (NULL != lookup_type) 186 if (NULL != lookup_type)
@@ -227,7 +227,7 @@ identity_shorten_cb (void *cls,
227 void **ctx, 227 void **ctx,
228 const char *name) 228 const char *name)
229{ 229{
230 struct GNUNET_CRYPTO_EccPublicKey *pkeym = cls; 230 struct GNUNET_CRYPTO_EccPublicSignKey *pkeym = cls;
231 231
232 id_op = NULL; 232 id_op = NULL;
233 if (NULL == ego) 233 if (NULL == ego)
@@ -246,12 +246,12 @@ identity_shorten_cb (void *cls,
246 * @param pkey public key to use for the zone 246 * @param pkey public key to use for the zone
247 */ 247 */
248static void 248static void
249lookup_with_public_key (const struct GNUNET_CRYPTO_EccPublicKey *pkey) 249lookup_with_public_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey)
250{ 250{
251 struct GNUNET_CRYPTO_EccPublicKey *pkeym; 251 struct GNUNET_CRYPTO_EccPublicSignKey *pkeym;
252 252
253 GNUNET_assert (NULL != pkey); 253 GNUNET_assert (NULL != pkey);
254 pkeym = GNUNET_new (struct GNUNET_CRYPTO_EccPublicKey); 254 pkeym = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey);
255 *pkeym = *pkey; 255 *pkeym = *pkey;
256 id_op = GNUNET_IDENTITY_get (identity, 256 id_op = GNUNET_IDENTITY_get (identity,
257 "shorten-zone", 257 "shorten-zone",
@@ -276,7 +276,7 @@ static void
276identity_zone_cb (void *cls, 276identity_zone_cb (void *cls,
277 const struct GNUNET_IDENTITY_Ego *ego) 277 const struct GNUNET_IDENTITY_Ego *ego)
278{ 278{
279 struct GNUNET_CRYPTO_EccPublicKey pkey; 279 struct GNUNET_CRYPTO_EccPublicSignKey pkey;
280 280
281 el = NULL; 281 el = NULL;
282 if (NULL == ego) 282 if (NULL == ego)
@@ -314,7 +314,7 @@ identity_master_cb (void *cls,
314 void **ctx, 314 void **ctx,
315 const char *name) 315 const char *name)
316{ 316{
317 struct GNUNET_CRYPTO_EccPublicKey pkey; 317 struct GNUNET_CRYPTO_EccPublicSignKey pkey;
318 318
319 id_op = NULL; 319 id_op = NULL;
320 if (NULL == ego) 320 if (NULL == ego)
@@ -341,7 +341,7 @@ static void
341run (void *cls, char *const *args, const char *cfgfile, 341run (void *cls, char *const *args, const char *cfgfile,
342 const struct GNUNET_CONFIGURATION_Handle *c) 342 const struct GNUNET_CONFIGURATION_Handle *c)
343{ 343{
344 struct GNUNET_CRYPTO_EccPublicKey pkey; 344 struct GNUNET_CRYPTO_EccPublicSignKey pkey;
345 345
346 cfg = c; 346 cfg = c;
347 gns = GNUNET_GNS_connect (cfg); 347 gns = GNUNET_GNS_connect (cfg);
@@ -357,7 +357,7 @@ run (void *cls, char *const *args, const char *cfgfile,
357 if (NULL != public_key) 357 if (NULL != public_key)
358 { 358 {
359 if (GNUNET_OK != 359 if (GNUNET_OK !=
360 GNUNET_CRYPTO_ecc_public_key_from_string (public_key, 360 GNUNET_CRYPTO_ecc_public_sign_key_from_string (public_key,
361 strlen (public_key), 361 strlen (public_key),
362 &pkey)) 362 &pkey))
363 { 363 {
@@ -384,7 +384,7 @@ run (void *cls, char *const *args, const char *cfgfile,
384 &lookup_name[strlen (lookup_name) - 4])) ) 384 &lookup_name[strlen (lookup_name) - 4])) )
385 { 385 {
386 /* no zone required, use 'anonymous' zone */ 386 /* no zone required, use 'anonymous' zone */
387 GNUNET_CRYPTO_ecc_key_get_public (GNUNET_CRYPTO_ecc_key_get_anonymous (), 387 GNUNET_CRYPTO_ecc_key_get_public_for_signature (GNUNET_CRYPTO_ecc_key_get_anonymous (),
388 &pkey); 388 &pkey);
389 lookup_with_public_key (&pkey); 389 lookup_with_public_key (&pkey);
390 } 390 }