-typo
[oweals/gnunet.git] / src / gns / test_gns_simple_lookup.c
index 8204b03eb483e65850dc98b5d532d5f87fb09aa6..471e6843a8c1d3b145e0c7d2b488202b700572c9 100644 (file)
@@ -23,7 +23,7 @@
  * @author Martin Schanzenbach
  */
 #include "platform.h"
-#include "gnunet_testing_lib-new.h"
+#include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
 #include "block_dns.h"
 #include "gnunet_signatures.h"
@@ -153,7 +153,7 @@ on_lookup_result(void *cls, uint32_t rd_count,
     for (i=0; i<rd_count; i++)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
-      if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+      if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
       {
         memcpy (&a, rd[i].data, sizeof(a));
         addr = inet_ntoa(a);
@@ -209,7 +209,7 @@ commence_testing (void *cls,
     end_badly_now ();
     return;
   }
-  lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+  lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
                          GNUNET_YES,
                          NULL,
                          &on_lookup_result, TEST_DOMAIN);
@@ -221,8 +221,8 @@ do_check (void *cls,
           const struct GNUNET_CONFIGURATION_Handle *ccfg,
           struct GNUNET_TESTING_Peer *peer)
 {
-  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
-  struct GNUNET_CRYPTO_RsaPrivateKey *alice_key;
+  struct GNUNET_CRYPTO_EccPublicKey alice_pkey;
+  struct GNUNET_CRYPTO_EccPrivateKey *alice_key;
   struct GNUNET_NAMESTORE_RecordData rd;
   char* alice_keyfile;
   char* ip = TEST_IP;
@@ -251,8 +251,8 @@ do_check (void *cls,
     return;
   }
 
-  alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile);
-  GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey);
+  alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile);
+  GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey);
   GNUNET_free (alice_keyfile);
   rd.expiration_time = UINT64_MAX;
   GNUNET_assert (1 == inet_pton (AF_INET, ip, &web));
@@ -260,13 +260,13 @@ do_check (void *cls,
   rd.data = &web;
   rd.record_type = GNUNET_DNSPARSER_TYPE_A;
   rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
-  nsqe = GNUNET_NAMESTORE_record_create (namestore_handle,
-                                        alice_key,
-                                        TEST_RECORD_NAME,
-                                        &rd,
-                                        &commence_testing,
-                                        NULL);
-  GNUNET_CRYPTO_rsa_key_free (alice_key);
+  nsqe = GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
+                                                  alice_key,
+                                                  TEST_RECORD_NAME,
+                                                  1, &rd,
+                                                  &commence_testing,
+                                                  NULL);
+  GNUNET_CRYPTO_ecc_key_free (alice_key);
 }