-doxy
authorMartin Schanzenbach <mschanzenbach@posteo.de>
Thu, 21 Jun 2012 13:35:26 +0000 (13:35 +0000)
committerMartin Schanzenbach <mschanzenbach@posteo.de>
Thu, 21 Jun 2012 13:35:26 +0000 (13:35 +0000)
src/gns/gnunet-service-gns_resolver.c
src/gns/test_gns_dht_delegated_lookup.c
src/gns/test_gns_pseu_shorten.c

index e14497056d969a7ebaa5e4c4974b3b01cce973c1..cfd6be5f3e17e657c87f6ef3fd5e65d9f6f3534a 100644 (file)
@@ -631,6 +631,7 @@ start_shorten (struct AuthorityChain *atail,
  * @param nh the namestore handle
  * @param dh the dht handle
  * @param lz the local zone's hash
+ * @param cfg configuration handle
  * @param max_bg_queries maximum number of parallel background queries in dht
  * @param ignore_pending ignore records that still require user confirmation
  *        on lookup
index e7f2ea06056fc52492a630b65146527c891faab3..144cde6952d8ef89261e1690f9e34b89d6c1e23a 100644 (file)
@@ -221,6 +221,13 @@ put_dht(void *cls, int32_t success, const char *emsg)
 
   sig = GNUNET_NAMESTORE_create_signature(bob_key, GNUNET_TIME_UNIT_FOREVER_ABS, TEST_RECORD_NAME,
                                           &rd, 1);
+
+  GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&bob_pkey,
+                                                                 GNUNET_TIME_UNIT_FOREVER_ABS,
+                                                                 TEST_RECORD_NAME,
+                                                                 1,
+                                                                 &rd,
+                                                                 sig));
   rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
   nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_RECORD_NAME) + 1
                       + sizeof(struct GNSNameRecordBlock));
index 1e662c1b832a988fa8bea5624e7467606b43902e..293a20d379d036bc8991fbfffd44d57b906a0e33 100644 (file)
@@ -297,18 +297,18 @@ put_pseu_dht(void *cls, int success)
   rd.flags = 0;
 
   sig = GNUNET_NAMESTORE_create_signature(alice_key,
-                                          GNUNET_TIME_UNIT_FOREVER_ABS,
-                                          "+",
-                                          &rd, 1);
+                                           GNUNET_TIME_UNIT_FOREVER_ABS,
+                                           "+",
+                                           &rd, 1);
 
   GNUNET_assert (NULL != sig);
 
-  /*GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&alice_pkey,
+  GNUNET_break (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&alice_pkey,
                                                                  GNUNET_TIME_UNIT_FOREVER_ABS,
                                                                  "+",
                                                                  1,
                                                                  &rd,
-                                                                 sig));*/
+                                                                 sig));
   rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
   nrb = GNUNET_malloc(rd_payload_length + strlen("+") + 1
                       + sizeof(struct GNSNameRecordBlock));
@@ -391,6 +391,13 @@ put_www_dht(void *cls, int success)
                                           GNUNET_TIME_UNIT_FOREVER_ABS,
                                           TEST_RECORD_NAME,
                                           &rd, 1);
+  
+  GNUNET_break (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&alice_pkey,
+                                                                 GNUNET_TIME_UNIT_FOREVER_ABS,
+                                                                 TEST_RECORD_NAME,
+                                                                 1,
+                                                                 &rd,
+                                                                 sig));
   rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
   nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_RECORD_NAME) + 1
                       + sizeof(struct GNSNameRecordBlock));
@@ -471,6 +478,12 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg)
                                           &rd,
                                           1);
 
+  GNUNET_break (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&bob_pkey,
+                                                                 GNUNET_TIME_UNIT_FOREVER_ABS,
+                                                                 TEST_AUTHORITY_ALICE,
+                                                                 1,
+                                                                 &rd,
+                                                                 sig));
   rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
   nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_AUTHORITY_ALICE) + 1
                       + sizeof(struct GNSNameRecordBlock));