- remove http
[oweals/gnunet.git] / src / namestore / test_namestore_api_put.c
index 8aa149ad9f7e6b719d22c9fa7ba5b53386c4ee5e..8941b6b6d3aa364e91f678ea1ed7841d83d84628 100644 (file)
@@ -146,7 +146,6 @@ create_record (int count)
   rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
   memset ((char *) rd[c].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN);
   }
-
   return rd;
 }
 
@@ -175,7 +174,13 @@ run (void *cls, char *const *args, const char *cfgfile,
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL);
 
   /* load privat key */
-  privkey = GNUNET_CRYPTO_rsa_key_create_from_file("hostkey");
+  char *hostkey_file;
+  GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
+      "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
+  privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file);
+  GNUNET_free (hostkey_file);
+
   GNUNET_assert (privkey != NULL);
   /* get public key */
   GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey);
@@ -192,7 +197,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   char * s_name = "dummy.dummy.gnunet";
   s_rd = create_record (RECORDS);
 
-  signature = GNUNET_NAMESTORE_create_signature(privkey, s_name, s_rd, RECORDS);
+  signature = GNUNET_NAMESTORE_create_signature(privkey, s_rd[0].expiration, s_name, s_rd, RECORDS);
 
   GNUNET_break (s_rd != NULL);
   GNUNET_break (s_name != NULL);