aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_dht_delegated_lookup.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:55 +0000
commit022002438e4047d235a688cfd9da7b63ab990103 (patch)
tree8d0cb444a3ab376b5a8f614fb87bdeb31e7b3327 /src/gns/test_gns_dht_delegated_lookup.c
parentb62eb443ee3af84f87030fad9fd11a948b1a2503 (diff)
downloadgnunet-022002438e4047d235a688cfd9da7b63ab990103.tar.gz
gnunet-022002438e4047d235a688cfd9da7b63ab990103.zip
-switching GNS from RSA to ECC
Diffstat (limited to 'src/gns/test_gns_dht_delegated_lookup.c')
-rw-r--r--src/gns/test_gns_dht_delegated_lookup.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gns/test_gns_dht_delegated_lookup.c b/src/gns/test_gns_dht_delegated_lookup.c
index 1eb77d821..ded45ecb0 100644
--- a/src/gns/test_gns_dht_delegated_lookup.c
+++ b/src/gns/test_gns_dht_delegated_lookup.c
@@ -65,10 +65,10 @@ static struct GNUNET_DHT_Handle *dht_handle;
65 65
66static const struct GNUNET_CONFIGURATION_Handle *cfg; 66static const struct GNUNET_CONFIGURATION_Handle *cfg;
67 67
68static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; 68static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey;
69static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; 69static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey;
70static struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; 70static struct GNUNET_CRYPTO_EccPrivateKey *alice_key;
71static struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; 71static struct GNUNET_CRYPTO_EccPrivateKey *bob_key;
72 72
73 73
74/** 74/**
@@ -216,7 +216,7 @@ put_dht(void *cls, int32_t success, const char *emsg)
216 struct GNUNET_HashCode zone_hash_double; 216 struct GNUNET_HashCode zone_hash_double;
217 uint32_t rd_payload_length; 217 uint32_t rd_payload_length;
218 char* nrb_data = NULL; 218 char* nrb_data = NULL;
219 struct GNUNET_CRYPTO_RsaSignature *sig; 219 struct GNUNET_CRYPTO_EccSignature *sig;
220 struct GNUNET_NAMESTORE_RecordData rd; 220 struct GNUNET_NAMESTORE_RecordData rd;
221 char* ip = TEST_IP; 221 char* ip = TEST_IP;
222 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); 222 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr));
@@ -262,7 +262,7 @@ put_dht(void *cls, int32_t success, const char *emsg)
262 } 262 }
263 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); 263 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash);
264 GNUNET_CRYPTO_short_hash(&bob_pkey, 264 GNUNET_CRYPTO_short_hash(&bob_pkey,
265 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 265 sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded),
266 &zone_hash); 266 &zone_hash);
267 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); 267 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
268 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 268 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -330,13 +330,13 @@ do_check (void *cls,
330 return; 330 return;
331 } 331 }
332 332
333 alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); 333 alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile);
334 bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); 334 bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB);
335 335
336 GNUNET_free(alice_keyfile); 336 GNUNET_free(alice_keyfile);
337 337
338 GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); 338 GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey);
339 GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); 339 GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey);
340 GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); 340 GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash);
341 341
342 struct GNUNET_NAMESTORE_RecordData rd; 342 struct GNUNET_NAMESTORE_RecordData rd;