-export ecc generation function
[oweals/gnunet.git] / src / namestore / test_namestore_api_sign_verify.c
index 95d222c6de2532ef741042e89266fe4d739e32b8..10be25bb40a0cf05a1bf378c152d15b9eefbb6a3 100644 (file)
@@ -56,19 +56,18 @@ static int res;
 static struct GNUNET_NAMESTORE_RecordData *
 create_record (int count)
 {
-  int c;
+  unsigned int c;
   struct GNUNET_NAMESTORE_RecordData * rd;
-  rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
 
-  for (c = 0; c < RECORDS; c++)
+  rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
+  for (c = 0; c < count; c++)
   {
-  rd[c].expiration = GNUNET_TIME_absolute_get();
-  rd[c].record_type = TEST_RECORD_TYPE;
-  rd[c].data_size = TEST_RECORD_DATALEN;
-  rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
-  memset ((char *) rd[c].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN);
+    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value;
+    rd[c].record_type = TEST_RECORD_TYPE;
+    rd[c].data_size = TEST_RECORD_DATALEN;
+    rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
+    memset ((char *) rd[c].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN);
   }
-
   return rd;
 }
 
@@ -95,7 +94,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   int res_w;
 
   /* create record */
-  s_name = "dummy.dummy.gnunet";
+  s_name = "DUMMY.dummy.gnunet";
   s_rd = create_record (RECORDS);
 
   signature = GNUNET_NAMESTORE_create_signature (privkey, expire, s_name, s_rd, RECORDS);