-indentation, code cleanup
[oweals/gnunet.git] / src / gns / test_gns_simple_srv_lookup.c
index 76e564f41872c74dc318abe4bf1911e5aba3a8e3..ce8478d7d36c92c6b0b6c2f09665dea2b3a73f40 100644 (file)
@@ -104,7 +104,7 @@ static void shutdown_task (void *cls,
 
 static void
 on_lookup_result(void *cls, uint32_t rd_count,
-                 const struct GNUNET_NAMESTORE_RecordData *rd)
+                 const struct GNUNET_GNSRECORD_Data *rd)
 {
   int i;
   uint16_t *srv_data;
@@ -182,12 +182,12 @@ do_check (void *cls,
           const struct GNUNET_CONFIGURATION_Handle *ccfg,
           struct GNUNET_TESTING_Peer *peer)
 {
-  struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey;
-  struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey;
-  struct GNUNET_CRYPTO_EccPrivateKey *alice_key;
-  struct GNUNET_CRYPTO_EccPrivateKey *bob_key;
+  struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
   struct GNUNET_CRYPTO_ShortHashCode bob_hash;
-  struct GNUNET_CRYPTO_EccSignature *sig;
+  struct GNUNET_CRYPTO_EcdsaSignature *sig;
   char* alice_keyfile;
   struct GNUNET_TUN_DnsSrvRecord *srv_data;
   struct GNUNET_TIME_Absolute et;
@@ -213,13 +213,13 @@ do_check (void *cls,
     return;
   }
 
-  alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile);
-  bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB);
+  alice_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (alice_keyfile);
+  bob_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_BOB);
 
-  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_ecdsa_key_get_public (alice_key, &alice_pkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
 
-  struct GNUNET_NAMESTORE_RecordData rd;
+  struct GNUNET_GNSRECORD_Data rd;
   char* ip = TEST_IP;
   struct in_addr *sipserver = GNUNET_malloc (sizeof (struct in_addr));
   srv_data = GNUNET_malloc (sizeof (struct GNUNET_TUN_DnsSrvRecord) + strlen (TEST_SRV_NAME) + 1);
@@ -234,8 +234,8 @@ 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;
 
   GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
                                            alice_key,