gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r23646 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r23646 - gnunet/src/gns
Date: Wed, 5 Sep 2012 09:46:51 +0200

Author: wachs
Date: 2012-09-05 09:46:51 +0200 (Wed, 05 Sep 2012)
New Revision: 23646

Modified:
   gnunet/src/gns/Makefile.am
   gnunet/src/gns/test_gns_dht_three_peers.c
Log:
use precomputed zonekeys

Modified: gnunet/src/gns/Makefile.am
===================================================================
--- gnunet/src/gns/Makefile.am  2012-09-05 07:16:15 UTC (rev 23645)
+++ gnunet/src/gns/Makefile.am  2012-09-05 07:46:51 UTC (rev 23646)
@@ -54,16 +54,16 @@
   test_gns_simple_lookup \
   test_gns_simple_delegated_lookup \
   test_gns_simple_mx_lookup \
-       test_gns_simple_srv_lookup \
+  test_gns_simple_srv_lookup \
   test_gns_simple_zkey_lookup \
   test_gns_dht_delegated_lookup \
   test_gns_pseu_shorten \
   test_gns_max_queries \
+  test_gns_cname_lookup \
+  test_gns_ns_lookup \
+  test_gns_revocation \
   test_gns_dht_three_peers \
-       test_gns_cname_lookup \
-       test_gns_ns_lookup \
-       test_gns_revocation \
-       test_gns_proxy
+  test_gns_proxy
 
 
 #  test_gns_simple_lookup

Modified: gnunet/src/gns/test_gns_dht_three_peers.c
===================================================================
--- gnunet/src/gns/test_gns_dht_three_peers.c   2012-09-05 07:16:15 UTC (rev 
23645)
+++ gnunet/src/gns/test_gns_dht_three_peers.c   2012-09-05 07:46:51 UTC (rev 
23646)
@@ -250,6 +250,7 @@
 {
   struct GNUNET_NAMESTORE_Handle *ns;
   char* keyfile;
+  char* source;
   struct GNUNET_CRYPTO_RsaPrivateKey *key;
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
   struct in_addr *web;
@@ -265,6 +266,10 @@
     return GNUNET_SYSERR;
   }
 
+  GNUNET_asprintf (&source, "zonefiles%s%s", DIR_SEPARATOR_STR, 
"test_zonekey");
+  GNUNET_break (GNUNET_OK == GNUNET_DISK_file_copy (source, keyfile));
+  GNUNET_free (source);
+
   key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
   if (NULL == key)
   {
@@ -313,6 +318,7 @@
 {
   struct GNUNET_NAMESTORE_Handle *ns;
   char* keyfile;
+  char* source;
   struct GNUNET_CRYPTO_RsaPrivateKey *key;
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
   struct GNUNET_NAMESTORE_RecordData rd;
@@ -327,6 +333,10 @@
     return GNUNET_SYSERR;
   }
 
+  GNUNET_asprintf (&source, "zonefiles%s%s", DIR_SEPARATOR_STR, 
"OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey");
+  GNUNET_break (GNUNET_OK == GNUNET_DISK_file_copy (source, keyfile));
+  GNUNET_free (source);
+
   key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
   if (NULL == key)
   {
@@ -366,6 +376,7 @@
 {
   struct GNUNET_NAMESTORE_Handle *ns;
   char* keyfile;
+  char* source;
   struct GNUNET_CRYPTO_RsaPrivateKey *key;
   struct GNUNET_NAMESTORE_RecordData rd;
 
@@ -380,6 +391,10 @@
     return GNUNET_SYSERR;
   }
 
+  GNUNET_asprintf (&source, "zonefiles%s%s", DIR_SEPARATOR_STR, 
"188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey");
+  GNUNET_break (GNUNET_OK == GNUNET_DISK_file_copy (source, keyfile));
+  GNUNET_free (source);
+
   key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
   if (NULL == key)
   {
@@ -405,8 +420,8 @@
 
   GNUNET_NAMESTORE_record_create (ns, key, "bob", &rd, &cont_ns, ns);
 
-  GNUNET_CRYPTO_rsa_key_free(key);
-  GNUNET_free(keyfile);
+  GNUNET_CRYPTO_rsa_key_free (key);
+  GNUNET_free (keyfile);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice  done\n");
   return GNUNET_OK;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]