aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_pseu_shorten.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_pseu_shorten.c')
-rw-r--r--src/gns/test_gns_pseu_shorten.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c
index a4c337067..f4c628cb0 100644
--- a/src/gns/test_gns_pseu_shorten.c
+++ b/src/gns/test_gns_pseu_shorten.c
@@ -69,16 +69,16 @@ static struct GNUNET_DHT_Handle *dht_handle;
69 69
70static const struct GNUNET_CONFIGURATION_Handle *cfg; 70static const struct GNUNET_CONFIGURATION_Handle *cfg;
71 71
72static struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey; 72static struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
73static struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey; 73static struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
74static struct GNUNET_CRYPTO_EccPublicSignKey our_pkey; 74static struct GNUNET_CRYPTO_EcdsaPublicKey our_pkey;
75static struct GNUNET_CRYPTO_EccPublicSignKey priv_pkey; 75static struct GNUNET_CRYPTO_EcdsaPublicKey priv_pkey;
76static struct GNUNET_CRYPTO_EccPublicSignKey short_pkey; 76static struct GNUNET_CRYPTO_EcdsaPublicKey short_pkey;
77static struct GNUNET_CRYPTO_EccPrivateKey *alice_key; 77static struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
78static struct GNUNET_CRYPTO_EccPrivateKey *bob_key; 78static struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
79static struct GNUNET_CRYPTO_EccPrivateKey *our_key; 79static struct GNUNET_CRYPTO_EcdsaPrivateKey *our_key;
80static struct GNUNET_CRYPTO_EccPrivateKey *priv_key; 80static struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
81static struct GNUNET_CRYPTO_EccPrivateKey *short_key; 81static struct GNUNET_CRYPTO_EcdsaPrivateKey *short_key;
82static struct GNUNET_CRYPTO_ShortHashCode alice_hash; 82static struct GNUNET_CRYPTO_ShortHashCode alice_hash;
83static struct GNUNET_CRYPTO_ShortHashCode bob_hash; 83static struct GNUNET_CRYPTO_ShortHashCode bob_hash;
84static struct GNUNET_CRYPTO_ShortHashCode our_zone; 84static struct GNUNET_CRYPTO_ShortHashCode our_zone;
@@ -265,7 +265,7 @@ put_pseu_dht (void *cls, int success)
265 struct GNUNET_HashCode zone_hash_double; 265 struct GNUNET_HashCode zone_hash_double;
266 uint32_t rd_payload_length; 266 uint32_t rd_payload_length;
267 char* nrb_data = NULL; 267 char* nrb_data = NULL;
268 struct GNUNET_CRYPTO_EccSignature *sig; 268 struct GNUNET_CRYPTO_EcdsaSignature *sig;
269 struct GNUNET_NAMESTORE_RecordData rd; 269 struct GNUNET_NAMESTORE_RecordData rd;
270 270
271 memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); 271 memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData));
@@ -316,7 +316,7 @@ put_pseu_dht (void *cls, int success)
316 } 316 }
317 GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash); 317 GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash);
318 GNUNET_CRYPTO_short_hash(&alice_pkey, 318 GNUNET_CRYPTO_short_hash(&alice_pkey,
319 sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 319 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
320 &zone_hash); 320 &zone_hash);
321 321
322 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 322 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -353,7 +353,7 @@ put_www_dht (void *cls, int success)
353 struct GNUNET_HashCode zone_hash_double; 353 struct GNUNET_HashCode zone_hash_double;
354 uint32_t rd_payload_length; 354 uint32_t rd_payload_length;
355 char* nrb_data = NULL; 355 char* nrb_data = NULL;
356 struct GNUNET_CRYPTO_EccSignature *sig; 356 struct GNUNET_CRYPTO_EcdsaSignature *sig;
357 struct GNUNET_NAMESTORE_RecordData rd; 357 struct GNUNET_NAMESTORE_RecordData rd;
358 char* ip = TEST_IP; 358 char* ip = TEST_IP;
359 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); 359 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr));
@@ -405,7 +405,7 @@ put_www_dht (void *cls, int success)
405 } 405 }
406 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); 406 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash);
407 GNUNET_CRYPTO_short_hash(&alice_pkey, 407 GNUNET_CRYPTO_short_hash(&alice_pkey,
408 sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 408 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
409 &zone_hash); 409 &zone_hash);
410 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); 410 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
411 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 411 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -441,7 +441,7 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg)
441 struct GNUNET_HashCode zone_hash_double; 441 struct GNUNET_HashCode zone_hash_double;
442 uint32_t rd_payload_length; 442 uint32_t rd_payload_length;
443 char* nrb_data = NULL; 443 char* nrb_data = NULL;
444 struct GNUNET_CRYPTO_EccSignature *sig; 444 struct GNUNET_CRYPTO_EcdsaSignature *sig;
445 struct GNUNET_NAMESTORE_RecordData rd; 445 struct GNUNET_NAMESTORE_RecordData rd;
446 446
447 rd.expiration_time = UINT64_MAX; 447 rd.expiration_time = UINT64_MAX;
@@ -488,7 +488,7 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg)
488 GNUNET_CRYPTO_short_hash (TEST_AUTHORITY_ALICE, 488 GNUNET_CRYPTO_short_hash (TEST_AUTHORITY_ALICE,
489 strlen (TEST_AUTHORITY_ALICE), &name_hash); 489 strlen (TEST_AUTHORITY_ALICE), &name_hash);
490 GNUNET_CRYPTO_short_hash (&bob_pkey, 490 GNUNET_CRYPTO_short_hash (&bob_pkey,
491 sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 491 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
492 &zone_hash); 492 &zone_hash);
493 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); 493 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
494 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 494 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -616,21 +616,21 @@ do_check (void *cls,
616 GNUNET_free (private_keyfile); 616 GNUNET_free (private_keyfile);
617 return; 617 return;
618 } 618 }
619 our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile); 619 our_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (our_keyfile);
620 priv_key = GNUNET_CRYPTO_ecc_key_create_from_file (private_keyfile); 620 priv_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (private_keyfile);
621 short_key = GNUNET_CRYPTO_ecc_key_create_from_file (shorten_keyfile); 621 short_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (shorten_keyfile);
622 bob_key = GNUNET_CRYPTO_ecc_key_create (); 622 bob_key = GNUNET_CRYPTO_ecdsa_key_create ();
623 alice_key = GNUNET_CRYPTO_ecc_key_create (); 623 alice_key = GNUNET_CRYPTO_ecdsa_key_create ();
624 624
625 GNUNET_free (our_keyfile); 625 GNUNET_free (our_keyfile);
626 GNUNET_free (shorten_keyfile); 626 GNUNET_free (shorten_keyfile);
627 GNUNET_free (private_keyfile); 627 GNUNET_free (private_keyfile);
628 628
629 GNUNET_CRYPTO_ecc_key_get_public_for_signature (our_key, &our_pkey); 629 GNUNET_CRYPTO_ecdsa_key_get_public (our_key, &our_pkey);
630 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv_key, &priv_pkey); 630 GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &priv_pkey);
631 GNUNET_CRYPTO_ecc_key_get_public_for_signature (short_key, &short_pkey); 631 GNUNET_CRYPTO_ecdsa_key_get_public (short_key, &short_pkey);
632 GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); 632 GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
633 GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); 633 GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
634 GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash); 634 GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash);
635 GNUNET_CRYPTO_short_hash (&alice_pkey, sizeof(alice_pkey), &alice_hash); 635 GNUNET_CRYPTO_short_hash (&alice_pkey, sizeof(alice_pkey), &alice_hash);
636 GNUNET_CRYPTO_short_hash (&our_pkey, sizeof(our_pkey), &our_zone); 636 GNUNET_CRYPTO_short_hash (&our_pkey, sizeof(our_pkey), &our_zone);