-make build conditional on MHD
[oweals/gnunet.git] / src / gns / test_gns_proxy.c
index 3ec2bf95cc998fbaed96c23b140e66742100b577..d9c660c86b676a376c94ed2cdb2304343a225a29 100644 (file)
@@ -364,7 +364,7 @@ run (void *cls,
      struct GNUNET_TESTING_Peer *peer)
 {
   enum MHD_FLAG flags;
-  struct GNUNET_CRYPTO_RsaPrivateKey *host_key;
+  struct GNUNET_CRYPTO_EccPrivateKey *host_key;
   struct GNUNET_NAMESTORE_RecordData rd;
   char *zone_keyfile;
   
@@ -421,13 +421,13 @@ run (void *cls,
     return;
   }
 
-  host_key = GNUNET_CRYPTO_rsa_key_create_from_file (zone_keyfile);
-  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
-  GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_GNS_RECORD_A,
+  host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile);
+  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
+  GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_DNSPARSER_TYPE_A,
                                                                "127.0.0.1",
                                                                (void**)&rd.data,
                                                                &rd.data_size));
-  rd.record_type = GNUNET_GNS_RECORD_A;
+  rd.record_type = GNUNET_DNSPARSER_TYPE_A;
 
   GNUNET_NAMESTORE_record_create (namestore,
                                   host_key,
@@ -438,7 +438,7 @@ run (void *cls,
 
   GNUNET_free ((void**)rd.data);
   GNUNET_free (zone_keyfile);
-  GNUNET_CRYPTO_rsa_key_free (host_key);
+  GNUNET_CRYPTO_ecc_key_free (host_key);
 }
 
 int
@@ -452,7 +452,7 @@ main (int argc, char *const *argv)
     return 0;
   }
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
-  if (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))
+  if (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // TODO: once we have a windows-testcase, add test parameters here
   {
     fprintf (stderr, "DNS helper binary has wrong permissions... skipping!\n");
     GNUNET_free (binary);
@@ -460,8 +460,6 @@ main (int argc, char *const *argv)
   }
     GNUNET_free (binary);
 
-  GNUNET_CRYPTO_rsa_setup_hostkey ("test_gns_proxy.conf");
-  
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
   {
     fprintf (stderr, "failed to initialize curl\n");