aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-06-20 08:53:37 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-06-20 08:53:37 +0000
commitc78a35aa3fac06477752d6e6f07587a53df2d66a (patch)
tree62e1f7754543ca970f520c865edb453d7ae3e286
parentfe55c2ae5957027fbc7c333889a5f05772e4afea (diff)
downloadgnunet-c78a35aa3fac06477752d6e6f07587a53df2d66a.tar.gz
gnunet-c78a35aa3fac06477752d6e6f07587a53df2d66a.zip
-fixed record flags in tests. proper expiration from NS missing
-rw-r--r--src/gns/gnunet-service-gns_resolver.c4
-rw-r--r--src/gns/plugin_block_gns.c2
-rw-r--r--src/gns/test_gns_cname_lookup.c1
-rw-r--r--src/gns/test_gns_dht_threepeer.c3
-rw-r--r--src/gns/test_gns_max_queries.c1
-rw-r--r--src/gns/test_gns_ns_lookup.c1
-rw-r--r--src/gns/test_gns_pseu_shorten.c12
-rw-r--r--src/gns/test_gns_revocation.c1
-rw-r--r--src/gns/test_gns_simple_delegated_lookup.c1
-rw-r--r--src/gns/test_gns_simple_get_authority.c1
-rw-r--r--src/gns/test_gns_simple_lookup.c1
-rw-r--r--src/gns/test_gns_simple_mx_lookup.c1
-rw-r--r--src/gns/test_gns_simple_shorten.c1
-rw-r--r--src/gns/test_gns_simple_zkey_lookup.c1
14 files changed, 24 insertions, 7 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 8d82fa8ad..16d6126cb 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -3140,9 +3140,9 @@ process_delegation_result_ns (void* cls,
3140 &process_pkey_revocation_result_ns, 3140 &process_pkey_revocation_result_ns,
3141 rh); 3141 rh);
3142 return; 3142 return;
3143 3143
3144 } 3144 }
3145 3145
3146 /** 3146 /**
3147 * no answers found 3147 * no answers found
3148 */ 3148 */
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c
index f033811ee..f1888c71a 100644
--- a/src/gns/plugin_block_gns.c
+++ b/src/gns/plugin_block_gns.c
@@ -145,7 +145,6 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
145 { 145 {
146 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 146 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
147 "Data invalid (%d bytes, %d records)\n", rd_len, rd_count); 147 "Data invalid (%d bytes, %d records)\n", rd_len, rd_count);
148 GNUNET_break_op (0);
149 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 148 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
150 } 149 }
151 150
@@ -180,7 +179,6 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
180 &nrb->signature)) 179 &nrb->signature))
181 { 180 {
182 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Signature invalid for name %s\n"); 181 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Signature invalid for name %s\n");
183 GNUNET_break_op (0);
184 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 182 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
185 } 183 }
186 } 184 }
diff --git a/src/gns/test_gns_cname_lookup.c b/src/gns/test_gns_cname_lookup.c
index 3e79f5d13..ed04fbcd0 100644
--- a/src/gns/test_gns_cname_lookup.c
+++ b/src/gns/test_gns_cname_lookup.c
@@ -269,6 +269,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
269 rd.data_size = sizeof(struct in_addr); 269 rd.data_size = sizeof(struct in_addr);
270 rd.data = web; 270 rd.data = web;
271 rd.record_type = GNUNET_DNSPARSER_TYPE_A; 271 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
272 rd.flags = 0;
272 273
273 GNUNET_NAMESTORE_record_create (namestore_handle, 274 GNUNET_NAMESTORE_record_create (namestore_handle,
274 alice_key, 275 alice_key,
diff --git a/src/gns/test_gns_dht_threepeer.c b/src/gns/test_gns_dht_threepeer.c
index 3cd565e8e..cfb8a3b4c 100644
--- a/src/gns/test_gns_dht_threepeer.c
+++ b/src/gns/test_gns_dht_threepeer.c
@@ -327,6 +327,7 @@ daemon_started (void *cls, const struct GNUNET_PeerIdentity *id,
327 rd.data_size = sizeof(struct in_addr); 327 rd.data_size = sizeof(struct in_addr);
328 rd.data = web; 328 rd.data = web;
329 rd.record_type = GNUNET_GNS_RECORD_TYPE_A; 329 rd.record_type = GNUNET_GNS_RECORD_TYPE_A;
330 rd.flags = 0;
330 331
331 GNUNET_NAMESTORE_record_create (ns, key, "www", &rd, NULL, NULL); 332 GNUNET_NAMESTORE_record_create (ns, key, "www", &rd, NULL, NULL);
332 333
@@ -367,6 +368,7 @@ daemon_started (void *cls, const struct GNUNET_PeerIdentity *id,
367 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 368 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
368 rd.data = &dave_hash; 369 rd.data = &dave_hash;
369 rd.record_type = GNUNET_GNS_RECORD_PKEY; 370 rd.record_type = GNUNET_GNS_RECORD_PKEY;
371 rd.flags = 0;
370 372
371 GNUNET_NAMESTORE_record_create (ns, key, "buddy", &rd, ns_create_cont, ns); 373 GNUNET_NAMESTORE_record_create (ns, key, "buddy", &rd, ns_create_cont, ns);
372 374
@@ -400,6 +402,7 @@ daemon_started (void *cls, const struct GNUNET_PeerIdentity *id,
400 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 402 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
401 rd.data = &bob_hash; 403 rd.data = &bob_hash;
402 rd.record_type = GNUNET_GNS_RECORD_PKEY; 404 rd.record_type = GNUNET_GNS_RECORD_PKEY;
405 rd.flags = 0;
403 406
404 GNUNET_NAMESTORE_record_create (ns, key, "bob", &rd, ns_create_cont, ns); 407 GNUNET_NAMESTORE_record_create (ns, key, "bob", &rd, ns_create_cont, ns);
405 408
diff --git a/src/gns/test_gns_max_queries.c b/src/gns/test_gns_max_queries.c
index 9ac24a3f6..5486dfb2c 100644
--- a/src/gns/test_gns_max_queries.c
+++ b/src/gns/test_gns_max_queries.c
@@ -278,6 +278,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
278 rd.data_size = sizeof(struct in_addr); 278 rd.data_size = sizeof(struct in_addr);
279 rd.data = web; 279 rd.data = web;
280 rd.record_type = GNUNET_DNSPARSER_TYPE_A; 280 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
281 rd.flags = 0;
281 282
282 GNUNET_NAMESTORE_record_create (namestore_handle, 283 GNUNET_NAMESTORE_record_create (namestore_handle,
283 alice_key, 284 alice_key,
diff --git a/src/gns/test_gns_ns_lookup.c b/src/gns/test_gns_ns_lookup.c
index 146c5777f..a46b45fc9 100644
--- a/src/gns/test_gns_ns_lookup.c
+++ b/src/gns/test_gns_ns_lookup.c
@@ -323,6 +323,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
323 rd.data_size = sizeof(struct in_addr); 323 rd.data_size = sizeof(struct in_addr);
324 rd.data = ns; 324 rd.data = ns;
325 rd.record_type = GNUNET_DNSPARSER_TYPE_A; 325 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
326 rd.flags = 0;
326 327
327 328
328 GNUNET_NAMESTORE_record_create (namestore_handle, 329 GNUNET_NAMESTORE_record_create (namestore_handle,
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c
index e12c010f1..cedf3930d 100644
--- a/src/gns/test_gns_pseu_shorten.c
+++ b/src/gns/test_gns_pseu_shorten.c
@@ -293,6 +293,7 @@ put_pseu_dht(void *cls, int success)
293 rd.data_size = strlen(TEST_PSEU_ALICE)+1; 293 rd.data_size = strlen(TEST_PSEU_ALICE)+1;
294 rd.data = TEST_PSEU_ALICE; 294 rd.data = TEST_PSEU_ALICE;
295 rd.record_type = GNUNET_GNS_RECORD_PSEU; 295 rd.record_type = GNUNET_GNS_RECORD_PSEU;
296 rd.flags = 0;
296 297
297 sig = GNUNET_NAMESTORE_create_signature(alice_key, 298 sig = GNUNET_NAMESTORE_create_signature(alice_key,
298 GNUNET_TIME_UNIT_FOREVER_ABS, 299 GNUNET_TIME_UNIT_FOREVER_ABS,
@@ -374,7 +375,8 @@ put_www_dht(void *cls, int success)
374 rd.data_size = sizeof(struct in_addr); 375 rd.data_size = sizeof(struct in_addr);
375 rd.data = web; 376 rd.data = web;
376 rd.record_type = GNUNET_DNSPARSER_TYPE_A; 377 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
377 378 rd.flags = 0;
379
378 sig = GNUNET_NAMESTORE_create_signature(alice_key, 380 sig = GNUNET_NAMESTORE_create_signature(alice_key,
379 GNUNET_TIME_UNIT_FOREVER_ABS, 381 GNUNET_TIME_UNIT_FOREVER_ABS,
380 TEST_RECORD_NAME, 382 TEST_RECORD_NAME,
@@ -451,7 +453,8 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg)
451 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 453 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
452 rd.data = &alice_hash; 454 rd.data = &alice_hash;
453 rd.record_type = GNUNET_GNS_RECORD_PKEY; 455 rd.record_type = GNUNET_GNS_RECORD_PKEY;
454 456 rd.flags = 0;
457
455 sig = GNUNET_NAMESTORE_create_signature(bob_key, 458 sig = GNUNET_NAMESTORE_create_signature(bob_key,
456 GNUNET_TIME_UNIT_FOREVER_ABS, 459 GNUNET_TIME_UNIT_FOREVER_ABS,
457 TEST_AUTHORITY_ALICE, 460 TEST_AUTHORITY_ALICE,
@@ -519,7 +522,8 @@ fin_init_zone (void *cls, int32_t success, const char *emsg)
519 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 522 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
520 rd.data = &bob_hash; 523 rd.data = &bob_hash;
521 rd.record_type = GNUNET_GNS_RECORD_PKEY; 524 rd.record_type = GNUNET_GNS_RECORD_PKEY;
522 525 rd.flags = 0;
526
523 GNUNET_NAMESTORE_record_create (namestore_handle, 527 GNUNET_NAMESTORE_record_create (namestore_handle,
524 our_key, 528 our_key,
525 TEST_AUTHORITY_BOB, 529 TEST_AUTHORITY_BOB,
@@ -538,6 +542,7 @@ cont_init_zone (void *cls, int32_t success, const char *emsg)
538 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 542 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
539 rd.data = &short_zone; 543 rd.data = &short_zone;
540 rd.record_type = GNUNET_GNS_RECORD_PKEY; 544 rd.record_type = GNUNET_GNS_RECORD_PKEY;
545 rd.flags = 0;
541 546
542 GNUNET_NAMESTORE_record_create (namestore_handle, 547 GNUNET_NAMESTORE_record_create (namestore_handle,
543 priv_key, 548 priv_key,
@@ -633,6 +638,7 @@ do_lookup (void *cls, const struct GNUNET_PeerIdentity *id,
633 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 638 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
634 rd.data = &priv_zone; 639 rd.data = &priv_zone;
635 rd.record_type = GNUNET_GNS_RECORD_PKEY; 640 rd.record_type = GNUNET_GNS_RECORD_PKEY;
641 rd.flags = 0;
636 642
637 GNUNET_NAMESTORE_record_create (namestore_handle, 643 GNUNET_NAMESTORE_record_create (namestore_handle,
638 our_key, 644 our_key,
diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c
index b055ef3e3..dd5c294e4 100644
--- a/src/gns/test_gns_revocation.c
+++ b/src/gns/test_gns_revocation.c
@@ -234,6 +234,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
234 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 234 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
235 rd.data = &bob_hash; 235 rd.data = &bob_hash;
236 rd.record_type = GNUNET_GNS_RECORD_PKEY; 236 rd.record_type = GNUNET_GNS_RECORD_PKEY;
237 rd.flags = 0;
237 238
238 GNUNET_NAMESTORE_record_create (namestore_handle, 239 GNUNET_NAMESTORE_record_create (namestore_handle,
239 alice_key, 240 alice_key,
diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c
index c8066fb0c..189cb7de2 100644
--- a/src/gns/test_gns_simple_delegated_lookup.c
+++ b/src/gns/test_gns_simple_delegated_lookup.c
@@ -249,6 +249,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
249 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 249 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
250 rd.data = &bob_hash; 250 rd.data = &bob_hash;
251 rd.record_type = GNUNET_GNS_RECORD_PKEY; 251 rd.record_type = GNUNET_GNS_RECORD_PKEY;
252 rd.flags = 0;
252 253
253 GNUNET_NAMESTORE_record_create (namestore_handle, 254 GNUNET_NAMESTORE_record_create (namestore_handle,
254 alice_key, 255 alice_key,
diff --git a/src/gns/test_gns_simple_get_authority.c b/src/gns/test_gns_simple_get_authority.c
index 76a4c4534..307e2cf78 100644
--- a/src/gns/test_gns_simple_get_authority.c
+++ b/src/gns/test_gns_simple_get_authority.c
@@ -244,6 +244,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id,
244 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 244 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
245 rd.data = &bob_hash; 245 rd.data = &bob_hash;
246 rd.record_type = GNUNET_GNS_RECORD_PKEY; 246 rd.record_type = GNUNET_GNS_RECORD_PKEY;
247 rd.flags = 0;
247 248
248 /* put bob into our zone */ 249 /* put bob into our zone */
249 GNUNET_NAMESTORE_record_create (namestore_handle, 250 GNUNET_NAMESTORE_record_create (namestore_handle,
diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c
index bd6501b24..631130ea6 100644
--- a/src/gns/test_gns_simple_lookup.c
+++ b/src/gns/test_gns_simple_lookup.c
@@ -227,6 +227,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
227 rd.data_size = sizeof(struct in_addr); 227 rd.data_size = sizeof(struct in_addr);
228 rd.data = web; 228 rd.data = web;
229 rd.record_type = GNUNET_DNSPARSER_TYPE_A; 229 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
230 rd.flags = 0;
230 231
231 GNUNET_NAMESTORE_record_create (namestore_handle, 232 GNUNET_NAMESTORE_record_create (namestore_handle,
232 alice_key, 233 alice_key,
diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c
index 38026fdcc..294329e60 100644
--- a/src/gns/test_gns_simple_mx_lookup.c
+++ b/src/gns/test_gns_simple_mx_lookup.c
@@ -268,6 +268,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
268 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 268 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
269 rd.data = &bob_hash; 269 rd.data = &bob_hash;
270 rd.record_type = GNUNET_GNS_RECORD_PKEY; 270 rd.record_type = GNUNET_GNS_RECORD_PKEY;
271 rd.flags = 0;
271 272
272 GNUNET_NAMESTORE_record_create (namestore_handle, 273 GNUNET_NAMESTORE_record_create (namestore_handle,
273 alice_key, 274 alice_key,
diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c
index 8dd813f6d..c4e196b60 100644
--- a/src/gns/test_gns_simple_shorten.c
+++ b/src/gns/test_gns_simple_shorten.c
@@ -244,6 +244,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id,
244 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 244 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
245 rd.data = &bob_hash; 245 rd.data = &bob_hash;
246 rd.record_type = GNUNET_GNS_RECORD_PKEY; 246 rd.record_type = GNUNET_GNS_RECORD_PKEY;
247 rd.flags = 0;
247 248
248 /* put bob into our zone */ 249 /* put bob into our zone */
249 GNUNET_NAMESTORE_record_create (namestore_handle, 250 GNUNET_NAMESTORE_record_create (namestore_handle,
diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c
index 3c54a149d..3a0496404 100644
--- a/src/gns/test_gns_simple_zkey_lookup.c
+++ b/src/gns/test_gns_simple_zkey_lookup.c
@@ -251,6 +251,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
251 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); 251 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
252 rd.data = &bob_hash; 252 rd.data = &bob_hash;
253 rd.record_type = GNUNET_GNS_RECORD_PKEY; 253 rd.record_type = GNUNET_GNS_RECORD_PKEY;
254 rd.flags = 0;
254 255
255 GNUNET_NAMESTORE_record_create (namestore_handle, 256 GNUNET_NAMESTORE_record_create (namestore_handle,
256 alice_key, 257 alice_key,