-indentation, code cleanup
[oweals/gnunet.git] / src / gns / test_gns_simple_shorten.c
index 1b383a0bd242b20f1ba2f97b03873dc80f09beca..74fe774468194358fdec9e3113e9009195a13a50 100644 (file)
@@ -61,10 +61,10 @@ static struct GNUNET_GNS_Handle *gns_handle;
 
 const struct GNUNET_CONFIGURATION_Handle *cfg;
 
-struct GNUNET_CRYPTO_EccPublicSignKey priv_pkey;
-struct GNUNET_CRYPTO_EccPublicSignKey short_pkey;
-struct GNUNET_CRYPTO_EccPrivateKey *priv_key;
-struct GNUNET_CRYPTO_EccPrivateKey *short_key;
+struct GNUNET_CRYPTO_EcdsaPublicKey priv_pkey;
+struct GNUNET_CRYPTO_EcdsaPublicKey short_pkey;
+struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+struct GNUNET_CRYPTO_EcdsaPrivateKey *short_key;
 
 struct GNUNET_CRYPTO_ShortHashCode priv_zone;
 struct GNUNET_CRYPTO_ShortHashCode short_zone;
@@ -170,15 +170,15 @@ void do_check (void *cls,
               const struct GNUNET_CONFIGURATION_Handle *ccfg,
               struct GNUNET_TESTING_Peer *peer)
 {
-  struct GNUNET_CRYPTO_EccPublicSignKey our_pkey;
-  struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey;
-  struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey;
-  struct GNUNET_CRYPTO_EccPrivateKey *our_key;
-  struct GNUNET_CRYPTO_EccPrivateKey *alice_key;
-  struct GNUNET_CRYPTO_EccPrivateKey *bob_key;
+  struct GNUNET_CRYPTO_EcdsaPublicKey our_pkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey *our_key;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
   struct GNUNET_CRYPTO_ShortHashCode bob_hash;
   struct GNUNET_CRYPTO_ShortHashCode alice_hash;
-  struct GNUNET_CRYPTO_EccSignature *sig;
+  struct GNUNET_CRYPTO_EcdsaSignature *sig;
   char* our_keyfile;
   char* private_keyfile;
   char* shorten_keyfile;
@@ -226,27 +226,27 @@ void do_check (void *cls,
     return;
   }
 
-  our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile);
+  our_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (our_keyfile);
   GNUNET_free(our_keyfile);
 
-  bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB);
-  alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_ALICE);
-  priv_key = GNUNET_CRYPTO_ecc_key_create_from_file (private_keyfile);
-  short_key = GNUNET_CRYPTO_ecc_key_create_from_file (shorten_keyfile);
+  bob_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_BOB);
+  alice_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_ALICE);
+  priv_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (private_keyfile);
+  short_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (shorten_keyfile);
 
   GNUNET_free(shorten_keyfile);
   GNUNET_free(private_keyfile);
 
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (our_key, &our_pkey);
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey);
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey);
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv_key, &priv_pkey);
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (short_key, &short_pkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (our_key, &our_pkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &priv_pkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (short_key, &short_pkey);
 
   GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone);
   GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone);
 
-  struct GNUNET_NAMESTORE_RecordData rd;
+  struct GNUNET_GNSRECORD_Data rd;
   char* ip = TEST_IP;
   struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr));
   rd.expiration_time = UINT64_MAX;
@@ -256,8 +256,8 @@ void do_check (void *cls,
 
   rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
   rd.data = &bob_hash;
-  rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
-  rd.flags = GNUNET_NAMESTORE_RF_NONE;
+  rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
+  rd.flags = GNUNET_GNSRECORD_RF_NONE;
 
   /* put bob into our zone */
   GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
@@ -308,7 +308,7 @@ void do_check (void *cls,
 
   rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
   rd.data = &alice_hash;
-  rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
+  rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
   GNUNET_free(sig);
 
   GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,