aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-06 14:18:31 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-06 14:18:31 +0000
commitfe76c075e315c0351e2fe465434ae39087daf014 (patch)
tree436887ccaf331932a3c13a8b9d2a2a710dad4be6 /src/gns/gnunet-gns.c
parent7eb2835d8a494c83aedb720a2ac6f6e5ba23f22f (diff)
downloadgnunet-fe76c075e315c0351e2fe465434ae39087daf014.tar.gz
gnunet-fe76c075e315c0351e2fe465434ae39087daf014.zip
moving to new, fixed-size encoding of public and private ECC keys everywhere, also improving ECC API to better support ECRS/GADS operations
Diffstat (limited to 'src/gns/gnunet-gns.c')
-rw-r--r--src/gns/gnunet-gns.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c
index 542a8106d..fa0a99590 100644
--- a/src/gns/gnunet-gns.c
+++ b/src/gns/gnunet-gns.c
@@ -205,7 +205,7 @@ run (void *cls, char *const *args, const char *cfgfile,
205{ 205{
206 char* keyfile; 206 char* keyfile;
207 struct GNUNET_CRYPTO_EccPrivateKey *key = NULL; 207 struct GNUNET_CRYPTO_EccPrivateKey *key = NULL;
208 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; 208 struct GNUNET_CRYPTO_EccPublicKey pkey;
209 struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; 209 struct GNUNET_CRYPTO_ShortHashCode *zone = NULL;
210 struct GNUNET_CRYPTO_ShortHashCode user_zone; 210 struct GNUNET_CRYPTO_ShortHashCode user_zone;
211 struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; 211 struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename;
@@ -233,7 +233,7 @@ run (void *cls, char *const *args, const char *cfgfile,
233 key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 233 key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
234 GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); 234 GNUNET_CRYPTO_ecc_key_get_public (key, &pkey);
235 GNUNET_CRYPTO_short_hash (&pkey, 235 GNUNET_CRYPTO_short_hash (&pkey,
236 sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 236 sizeof(struct GNUNET_CRYPTO_EccPublicKey),
237 &user_zone); 237 &user_zone);
238 zone = &user_zone; 238 zone = &user_zone;
239 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); 239 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
@@ -257,7 +257,7 @@ run (void *cls, char *const *args, const char *cfgfile,
257 GNUNET_CRYPTO_ecc_key_get_public (shorten_key, &pkey); 257 GNUNET_CRYPTO_ecc_key_get_public (shorten_key, &pkey);
258 shorten_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); 258 shorten_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode));
259 GNUNET_CRYPTO_short_hash(&pkey, 259 GNUNET_CRYPTO_short_hash(&pkey,
260 sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 260 sizeof(struct GNUNET_CRYPTO_EccPublicKey),
261 shorten_zone); 261 shorten_zone);
262 GNUNET_CRYPTO_short_hash_to_enc (shorten_zone, &zonename); 262 GNUNET_CRYPTO_short_hash_to_enc (shorten_zone, &zonename);
263 if (! raw) 263 if (! raw)
@@ -277,10 +277,10 @@ run (void *cls, char *const *args, const char *cfgfile,
277 { 277 {
278 private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 278 private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
279 GNUNET_CRYPTO_ecc_key_get_public (private_key, &pkey); 279 GNUNET_CRYPTO_ecc_key_get_public (private_key, &pkey);
280 private_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); 280 private_zone = GNUNET_new (struct GNUNET_CRYPTO_ShortHashCode);
281 GNUNET_CRYPTO_short_hash(&pkey, 281 GNUNET_CRYPTO_short_hash (&pkey,
282 sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 282 sizeof(struct GNUNET_CRYPTO_EccPublicKey),
283 private_zone); 283 private_zone);
284 GNUNET_CRYPTO_short_hash_to_enc (private_zone, &zonename); 284 GNUNET_CRYPTO_short_hash_to_enc (private_zone, &zonename);
285 if (! raw) 285 if (! raw)
286 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 286 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,