diff options
-rw-r--r-- | src/credential/credential_serialization.c | 5 | ||||
-rw-r--r-- | src/credential/gnunet-service-credential.c | 220 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_and.sh | 16 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_and2.sh | 15 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_bw.sh | 15 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_bw_link.sh | 16 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_bw_link2.sh | 16 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_fw.sh | 17 |
8 files changed, 124 insertions, 196 deletions
diff --git a/src/credential/credential_serialization.c b/src/credential/credential_serialization.c index 564d9957b..240ab4dca 100644 --- a/src/credential/credential_serialization.c +++ b/src/credential/credential_serialization.c | |||
@@ -158,8 +158,9 @@ GNUNET_CREDENTIAL_delegates_get_size ( | |||
158 | 158 | ||
159 | for (i = 0; i < c_count; i++) | 159 | for (i = 0; i < c_count; i++) |
160 | { | 160 | { |
161 | GNUNET_assert ((ret + cd[i].issuer_attribute_len) >= ret); | 161 | GNUNET_assert ((ret + cd[i].issuer_attribute_len + cd[i].subject_attribute_len) >= ret); |
162 | ret += cd[i].issuer_attribute_len; | 162 | // subject_attribute_len should be 0 |
163 | ret += cd[i].issuer_attribute_len + cd[i].subject_attribute_len; | ||
163 | } | 164 | } |
164 | return ret; | 165 | return ret; |
165 | } | 166 | } |
diff --git a/src/credential/gnunet-service-credential.c b/src/credential/gnunet-service-credential.c index ee02042c8..90316f203 100644 --- a/src/credential/gnunet-service-credential.c +++ b/src/credential/gnunet-service-credential.c | |||
@@ -148,16 +148,6 @@ struct DelegationQueueEntry | |||
148 | struct DelegationQueueEntry *prev; | 148 | struct DelegationQueueEntry *prev; |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * Sets under this Queue | ||
152 | */ | ||
153 | struct DelegationSetQueueEntry *set_entries_head; | ||
154 | |||
155 | /** | ||
156 | * Sets under this Queue | ||
157 | */ | ||
158 | struct DelegationSetQueueEntry *set_entries_tail; | ||
159 | |||
160 | /** | ||
161 | * Parent set | 151 | * Parent set |
162 | */ | 152 | */ |
163 | struct DelegationSetQueueEntry *parent_set; | 153 | struct DelegationSetQueueEntry *parent_set; |
@@ -273,11 +263,6 @@ struct VerifyRequestHandle | |||
273 | struct GNUNET_SERVICE_Client *client; | 263 | struct GNUNET_SERVICE_Client *client; |
274 | 264 | ||
275 | /** | 265 | /** |
276 | * GNS handle | ||
277 | */ | ||
278 | struct GNUNET_GNS_LookupRequest *lookup_request; | ||
279 | |||
280 | /** | ||
281 | * Size of delegation tree | 266 | * Size of delegation tree |
282 | */ | 267 | */ |
283 | uint32_t delegation_chain_size; | 268 | uint32_t delegation_chain_size; |
@@ -333,11 +318,6 @@ struct VerifyRequestHandle | |||
333 | uint32_t del_chain_size; | 318 | uint32_t del_chain_size; |
334 | 319 | ||
335 | /** | 320 | /** |
336 | * Root Delegation Set | ||
337 | */ | ||
338 | struct DelegationSetQueueEntry *root_set; | ||
339 | |||
340 | /** | ||
341 | * Current Delegation Pointer | 321 | * Current Delegation Pointer |
342 | */ | 322 | */ |
343 | struct DelegationQueueEntry *current_delegation; | 323 | struct DelegationQueueEntry *current_delegation; |
@@ -390,35 +370,31 @@ static struct GNUNET_GNS_Handle *gns; | |||
390 | static struct GNUNET_NAMESTORE_Handle *namestore; | 370 | static struct GNUNET_NAMESTORE_Handle *namestore; |
391 | 371 | ||
392 | static void | 372 | static void |
393 | cleanup_delegation_set (struct DelegationSetQueueEntry *ds_entry) | 373 | print_deleset (struct DelegationSetQueueEntry *dsentry, char *text) |
394 | { | 374 | { |
395 | struct DelegationQueueEntry *dq_entry; | 375 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
396 | struct DelegationSetQueueEntry *child; | 376 | "%s %s.%s <- %s.%s\n", |
397 | 377 | text, | |
398 | if (NULL == ds_entry) | 378 | GNUNET_CRYPTO_ecdsa_public_key_to_string ( |
399 | return; | 379 | &dsentry->delegation_chain_entry->issuer_key), |
380 | dsentry->delegation_chain_entry->issuer_attribute, | ||
381 | GNUNET_CRYPTO_ecdsa_public_key_to_string ( | ||
382 | &dsentry->delegation_chain_entry->subject_key), | ||
383 | dsentry->delegation_chain_entry->subject_attribute); | ||
384 | } | ||
400 | 385 | ||
401 | for (dq_entry = ds_entry->queue_entries_head; NULL != dq_entry; | 386 | static void |
402 | dq_entry = ds_entry->queue_entries_head) | 387 | cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) |
403 | { | 388 | { |
404 | GNUNET_CONTAINER_DLL_remove (ds_entry->queue_entries_head, | ||
405 | ds_entry->queue_entries_tail, | ||
406 | dq_entry); | ||
407 | for (child = dq_entry->set_entries_head; NULL != child; | ||
408 | child = dq_entry->set_entries_head) | ||
409 | { | ||
410 | GNUNET_CONTAINER_DLL_remove (dq_entry->set_entries_head, | ||
411 | dq_entry->set_entries_tail, | ||
412 | child); | ||
413 | cleanup_delegation_set (child); | ||
414 | } | ||
415 | GNUNET_free (dq_entry); | ||
416 | } | ||
417 | GNUNET_free_non_null (ds_entry->issuer_key); | 389 | GNUNET_free_non_null (ds_entry->issuer_key); |
418 | GNUNET_free_non_null (ds_entry->lookup_attribute); | ||
419 | GNUNET_free_non_null (ds_entry->issuer_attribute); | 390 | GNUNET_free_non_null (ds_entry->issuer_attribute); |
420 | GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); | ||
421 | GNUNET_free_non_null (ds_entry->attr_trailer); | 391 | GNUNET_free_non_null (ds_entry->attr_trailer); |
392 | // those fields are only set/used in bw search | ||
393 | if (ds_entry->from_bw) | ||
394 | { | ||
395 | GNUNET_free_non_null (ds_entry->lookup_attribute); | ||
396 | GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); | ||
397 | } | ||
422 | if (NULL != ds_entry->lookup_request) | 398 | if (NULL != ds_entry->lookup_request) |
423 | { | 399 | { |
424 | GNUNET_GNS_lookup_cancel (ds_entry->lookup_request); | 400 | GNUNET_GNS_lookup_cancel (ds_entry->lookup_request); |
@@ -426,64 +402,40 @@ cleanup_delegation_set (struct DelegationSetQueueEntry *ds_entry) | |||
426 | } | 402 | } |
427 | if (NULL != ds_entry->delegation_chain_entry) | 403 | if (NULL != ds_entry->delegation_chain_entry) |
428 | { | 404 | { |
429 | GNUNET_free_non_null (ds_entry->delegation_chain_entry->subject_attribute); | 405 | GNUNET_free_non_null ( |
406 | ds_entry->delegation_chain_entry->subject_attribute); | ||
430 | GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); | 407 | GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); |
431 | GNUNET_free (ds_entry->delegation_chain_entry); | 408 | GNUNET_free (ds_entry->delegation_chain_entry); |
432 | } | 409 | } |
410 | // Free DQ entries | ||
411 | for(struct DelegationQueueEntry *dq_entry = ds_entry->queue_entries_head; | ||
412 | NULL != ds_entry->queue_entries_head; | ||
413 | dq_entry = ds_entry->queue_entries_head) | ||
414 | { | ||
415 | GNUNET_CONTAINER_DLL_remove (ds_entry->queue_entries_head, | ||
416 | ds_entry->queue_entries_tail, | ||
417 | dq_entry); | ||
418 | GNUNET_free (dq_entry); | ||
419 | } | ||
433 | GNUNET_free (ds_entry); | 420 | GNUNET_free (ds_entry); |
434 | } | 421 | } |
435 | 422 | ||
436 | static void | 423 | static void |
437 | cleanup_dsq_list (struct VerifyRequestHandle *vrh) | 424 | cleanup_handle (struct VerifyRequestHandle *vrh) |
438 | { | 425 | { |
439 | struct DelegationSetQueueEntry *ds_entry; | 426 | struct DelegateRecordEntry *del_entry; |
427 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up...\n"); | ||
440 | 428 | ||
441 | if (NULL == vrh->dsq_head) | 429 | if (NULL == vrh->dsq_head) |
442 | return; | 430 | return; |
443 | 431 | ||
444 | for (ds_entry = vrh->dsq_head; NULL != vrh->dsq_head; | 432 | for (struct DelegationSetQueueEntry *ds_entry = vrh->dsq_head; NULL != vrh->dsq_head; |
445 | ds_entry = vrh->dsq_head) | 433 | ds_entry = vrh->dsq_head) |
446 | { | 434 | { |
447 | GNUNET_CONTAINER_DLL_remove (vrh->dsq_head, vrh->dsq_tail, ds_entry); | 435 | GNUNET_CONTAINER_DLL_remove (vrh->dsq_head, vrh->dsq_tail, ds_entry); |
448 | GNUNET_free_non_null (ds_entry->issuer_key); | 436 | cleanup_dsq_entry(ds_entry); |
449 | GNUNET_free_non_null (ds_entry->issuer_attribute); | ||
450 | GNUNET_free_non_null (ds_entry->attr_trailer); | ||
451 | // those fields are only set/used in bw search | ||
452 | if (ds_entry->from_bw) | ||
453 | { | ||
454 | GNUNET_free_non_null (ds_entry->lookup_attribute); | ||
455 | GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); | ||
456 | } | ||
457 | if (NULL != ds_entry->lookup_request) | ||
458 | { | ||
459 | GNUNET_GNS_lookup_cancel (ds_entry->lookup_request); | ||
460 | ds_entry->lookup_request = NULL; | ||
461 | } | ||
462 | if (NULL != ds_entry->delegation_chain_entry) | ||
463 | { | ||
464 | GNUNET_free_non_null ( | ||
465 | ds_entry->delegation_chain_entry->subject_attribute); | ||
466 | GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); | ||
467 | GNUNET_free (ds_entry->delegation_chain_entry); | ||
468 | } | ||
469 | //TODO: Free dq_entry, how? | ||
470 | //GNUNET_free (ds_entry->parent_queue_entry); | ||
471 | GNUNET_free (ds_entry); | ||
472 | } | 437 | } |
473 | } | ||
474 | 438 | ||
475 | static void | ||
476 | cleanup_handle (struct VerifyRequestHandle *vrh) | ||
477 | { | ||
478 | struct DelegateRecordEntry *del_entry; | ||
479 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up...\n"); | ||
480 | if (NULL != vrh->lookup_request) | ||
481 | { | ||
482 | GNUNET_GNS_lookup_cancel (vrh->lookup_request); | ||
483 | vrh->lookup_request = NULL; | ||
484 | } | ||
485 | //cleanup_delegation_set (vrh->root_set); | ||
486 | cleanup_dsq_list (vrh); | ||
487 | GNUNET_free_non_null (vrh->issuer_attribute); | 439 | GNUNET_free_non_null (vrh->issuer_attribute); |
488 | for (del_entry = vrh->del_chain_head; NULL != vrh->del_chain_head; | 440 | for (del_entry = vrh->del_chain_head; NULL != vrh->del_chain_head; |
489 | del_entry = vrh->del_chain_head) | 441 | del_entry = vrh->del_chain_head) |
@@ -584,6 +536,8 @@ send_lookup_response (struct VerifyRequestHandle *vrh) | |||
584 | dele[i].subject_key = del->delegate->subject_key; | 536 | dele[i].subject_key = del->delegate->subject_key; |
585 | dele[i].issuer_attribute_len = strlen (del->delegate->issuer_attribute) + 1; | 537 | dele[i].issuer_attribute_len = strlen (del->delegate->issuer_attribute) + 1; |
586 | dele[i].issuer_attribute = del->delegate->issuer_attribute; | 538 | dele[i].issuer_attribute = del->delegate->issuer_attribute; |
539 | dele[i].subject_attribute_len = del->delegate->subject_attribute_len; | ||
540 | dele[i].subject_attribute = del->delegate->subject_attribute; | ||
587 | dele[i].expiration = del->delegate->expiration; | 541 | dele[i].expiration = del->delegate->expiration; |
588 | dele[i].signature = del->delegate->signature; | 542 | dele[i].signature = del->delegate->signature; |
589 | del = del->next; | 543 | del = del->next; |
@@ -617,7 +571,6 @@ send_lookup_response (struct VerifyRequestHandle *vrh) | |||
617 | 571 | ||
618 | GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (vrh->client), env); | 572 | GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (vrh->client), env); |
619 | GNUNET_CONTAINER_DLL_remove (vrh_head, vrh_tail, vrh); | 573 | GNUNET_CONTAINER_DLL_remove (vrh_head, vrh_tail, vrh); |
620 | //TODO fix cleanup with bidirectional | ||
621 | cleanup_handle (vrh); | 574 | cleanup_handle (vrh); |
622 | 575 | ||
623 | GNUNET_STATISTICS_update (statistics, | 576 | GNUNET_STATISTICS_update (statistics, |
@@ -682,20 +635,6 @@ partial_match (char *tmp_trail, | |||
682 | return attr_trailer; | 635 | return attr_trailer; |
683 | } | 636 | } |
684 | 637 | ||
685 | static void | ||
686 | print_deleset (struct DelegationSetQueueEntry *dsentry, char *text) | ||
687 | { | ||
688 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
689 | "%s %s.%s <- %s.%s\n", | ||
690 | text, | ||
691 | GNUNET_CRYPTO_ecdsa_public_key_to_string ( | ||
692 | &dsentry->delegation_chain_entry->issuer_key), | ||
693 | dsentry->delegation_chain_entry->issuer_attribute, | ||
694 | GNUNET_CRYPTO_ecdsa_public_key_to_string ( | ||
695 | &dsentry->delegation_chain_entry->subject_key), | ||
696 | dsentry->delegation_chain_entry->subject_attribute); | ||
697 | } | ||
698 | |||
699 | static int | 638 | static int |
700 | handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry, | 639 | handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry, |
701 | struct DelegationSetQueueEntry *match_entry, | 640 | struct DelegationSetQueueEntry *match_entry, |
@@ -801,6 +740,8 @@ forward_resolution (void *cls, | |||
801 | 740 | ||
802 | // Start: Create DS Entry | 741 | // Start: Create DS Entry |
803 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); | 742 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); |
743 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | ||
744 | ds_entry->from_bw = false; | ||
804 | 745 | ||
805 | // (1) A.a <- A.b.c | 746 | // (1) A.a <- A.b.c |
806 | // (2) A.b <- D.d | 747 | // (2) A.b <- D.d |
@@ -832,10 +773,8 @@ forward_resolution (void *cls, | |||
832 | } | 773 | } |
833 | else if (0 == strcmp (del->subject_attribute, current_set->attr_trailer)) | 774 | else if (0 == strcmp (del->subject_attribute, current_set->attr_trailer)) |
834 | { | 775 | { |
835 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found: Complete match\n"); | ||
836 | // complete match | 776 | // complete match |
837 | // new trailer == issuer attribute (e.g. (5) to (4)) | 777 | // new trailer == issuer attribute (e.g. (5) to (4)) |
838 | // TODO memleak, free trailer before | ||
839 | ds_entry->attr_trailer = GNUNET_strdup (del->issuer_attribute); | 778 | ds_entry->attr_trailer = GNUNET_strdup (del->issuer_attribute); |
840 | } | 779 | } |
841 | else | 780 | else |
@@ -954,9 +893,6 @@ forward_resolution (void *cls, | |||
954 | if (0 == strcmp (del_entry->unresolved_attribute_delegation, | 893 | if (0 == strcmp (del_entry->unresolved_attribute_delegation, |
955 | ds_entry->attr_trailer)) | 894 | ds_entry->attr_trailer)) |
956 | { | 895 | { |
957 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
958 | "Forward: %s!\n", | ||
959 | del_entry->unresolved_attribute_delegation); | ||
960 | print_deleset (del_entry, "Forward:"); | 896 | print_deleset (del_entry, "Forward:"); |
961 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 897 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
962 | "Forward: Found match with above!\n"); | 898 | "Forward: Found match with above!\n"); |
@@ -965,16 +901,13 @@ forward_resolution (void *cls, | |||
965 | if (GNUNET_NO == | 901 | if (GNUNET_NO == |
966 | handle_bidirectional_match (ds_entry, del_entry, vrh)) | 902 | handle_bidirectional_match (ds_entry, del_entry, vrh)) |
967 | return; | 903 | return; |
968 | 904 | ||
969 | send_lookup_response (vrh); | 905 | send_lookup_response (vrh); |
970 | return; | 906 | return; |
971 | } | 907 | } |
972 | } | 908 | } |
973 | } | 909 | } |
974 | } | 910 | } |
975 | // No crossmatch/bidirectional found, add this ds_entry for the bw algo to match | ||
976 | ds_entry->from_bw = false; | ||
977 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | ||
978 | 911 | ||
979 | // Starting a new GNS lookup | 912 | // Starting a new GNS lookup |
980 | vrh->pending_lookups++; | 913 | vrh->pending_lookups++; |
@@ -985,13 +918,14 @@ forward_resolution (void *cls, | |||
985 | ds_entry->attr_trailer, | 918 | ds_entry->attr_trailer, |
986 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&del->issuer_key)); | 919 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&del->issuer_key)); |
987 | 920 | ||
988 | GNUNET_GNS_lookup (gns, | 921 | ds_entry->lookup_request = |
989 | GNUNET_GNS_EMPTY_LABEL_AT, | 922 | GNUNET_GNS_lookup (gns, |
990 | &del->issuer_key, | 923 | GNUNET_GNS_EMPTY_LABEL_AT, |
991 | GNUNET_GNSRECORD_TYPE_DELEGATE, | 924 | &del->issuer_key, |
992 | GNUNET_GNS_LO_DEFAULT, | 925 | GNUNET_GNSRECORD_TYPE_DELEGATE, |
993 | &forward_resolution, | 926 | GNUNET_GNS_LO_DEFAULT, |
994 | ds_entry); | 927 | &forward_resolution, |
928 | ds_entry); | ||
995 | } | 929 | } |
996 | 930 | ||
997 | if (0 == vrh->pending_lookups) | 931 | if (0 == vrh->pending_lookups) |
@@ -1055,6 +989,9 @@ backward_resolution (void *cls, | |||
1055 | for (uint32_t j = 0; j < ntohl (sets->set_count); j++) | 989 | for (uint32_t j = 0; j < ntohl (sets->set_count); j++) |
1056 | { | 990 | { |
1057 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); | 991 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); |
992 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | ||
993 | ds_entry->from_bw = true; | ||
994 | |||
1058 | if (NULL != current_set->attr_trailer) | 995 | if (NULL != current_set->attr_trailer) |
1059 | { | 996 | { |
1060 | if (0 == set[j].subject_attribute_len) | 997 | if (0 == set[j].subject_attribute_len) |
@@ -1100,11 +1037,6 @@ backward_resolution (void *cls, | |||
1100 | 1037 | ||
1101 | ds_entry->parent_queue_entry = dq_entry; // current_delegation; | 1038 | ds_entry->parent_queue_entry = dq_entry; // current_delegation; |
1102 | 1039 | ||
1103 | // TODO required? everything in dsq_head list, change cleanup | ||
1104 | /*GNUNET_CONTAINER_DLL_insert (dq_entry->set_entries_head, | ||
1105 | dq_entry->set_entries_tail, | ||
1106 | ds_entry);*/ | ||
1107 | |||
1108 | /** | 1040 | /** |
1109 | * Check if this delegation already matches one of our credentials | 1041 | * Check if this delegation already matches one of our credentials |
1110 | */ | 1042 | */ |
@@ -1211,8 +1143,8 @@ backward_resolution (void *cls, | |||
1211 | // if one node on the path still needs solutions: return | 1143 | // if one node on the path still needs solutions: return |
1212 | if (GNUNET_NO == | 1144 | if (GNUNET_NO == |
1213 | handle_bidirectional_match (del_entry, ds_entry, vrh)) | 1145 | handle_bidirectional_match (del_entry, ds_entry, vrh)) |
1214 | break; | 1146 | break; |
1215 | 1147 | ||
1216 | // Send lookup response | 1148 | // Send lookup response |
1217 | send_lookup_response (vrh); | 1149 | send_lookup_response (vrh); |
1218 | return; | 1150 | return; |
@@ -1220,10 +1152,6 @@ backward_resolution (void *cls, | |||
1220 | } | 1152 | } |
1221 | } | 1153 | } |
1222 | } | 1154 | } |
1223 | // No crossmatch/bidirectional result, add this ds_entry for the bw algo to match | ||
1224 | ds_entry->from_bw = true; | ||
1225 | |||
1226 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | ||
1227 | 1155 | ||
1228 | // Starting a new GNS lookup | 1156 | // Starting a new GNS lookup |
1229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1157 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1238,12 +1166,12 @@ backward_resolution (void *cls, | |||
1238 | ds_entry->handle = vrh; | 1166 | ds_entry->handle = vrh; |
1239 | ds_entry->lookup_request = | 1167 | ds_entry->lookup_request = |
1240 | GNUNET_GNS_lookup (gns, | 1168 | GNUNET_GNS_lookup (gns, |
1241 | lookup_attribute, | 1169 | lookup_attribute, |
1242 | ds_entry->issuer_key, // issuer_key, | 1170 | ds_entry->issuer_key, // issuer_key, |
1243 | GNUNET_GNSRECORD_TYPE_ATTRIBUTE, | 1171 | GNUNET_GNSRECORD_TYPE_ATTRIBUTE, |
1244 | GNUNET_GNS_LO_DEFAULT, | 1172 | GNUNET_GNS_LO_DEFAULT, |
1245 | &backward_resolution, | 1173 | &backward_resolution, |
1246 | ds_entry); | 1174 | ds_entry); |
1247 | 1175 | ||
1248 | GNUNET_free (lookup_attribute); | 1176 | GNUNET_free (lookup_attribute); |
1249 | } | 1177 | } |
@@ -1269,7 +1197,6 @@ delegation_chain_bw_resolution_start (void *cls) | |||
1269 | struct VerifyRequestHandle *vrh = cls; | 1197 | struct VerifyRequestHandle *vrh = cls; |
1270 | struct DelegationSetQueueEntry *ds_entry; | 1198 | struct DelegationSetQueueEntry *ds_entry; |
1271 | struct DelegateRecordEntry *del_entry; | 1199 | struct DelegateRecordEntry *del_entry; |
1272 | vrh->lookup_request = NULL; | ||
1273 | 1200 | ||
1274 | if (0 == vrh->del_chain_size) | 1201 | if (0 == vrh->del_chain_size) |
1275 | { | 1202 | { |
@@ -1284,7 +1211,7 @@ delegation_chain_bw_resolution_start (void *cls) | |||
1284 | // A.a <- ... | 1211 | // A.a <- ... |
1285 | // X.x <- C | 1212 | // X.x <- C |
1286 | // Y.y <- C | 1213 | // Y.y <- C |
1287 | // if not X.x or Y.y == A.a stat at A | 1214 | // if not X.x or Y.y == A.a start at A |
1288 | for (del_entry = vrh->del_chain_head; del_entry != NULL; | 1215 | for (del_entry = vrh->del_chain_head; del_entry != NULL; |
1289 | del_entry = del_entry->next) | 1216 | del_entry = del_entry->next) |
1290 | { | 1217 | { |
@@ -1310,14 +1237,22 @@ delegation_chain_bw_resolution_start (void *cls) | |||
1310 | "Looking up %s\n", | 1237 | "Looking up %s\n", |
1311 | issuer_attribute_name); | 1238 | issuer_attribute_name); |
1312 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); | 1239 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); |
1240 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | ||
1241 | ds_entry->from_bw = true; | ||
1313 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); | 1242 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); |
1314 | GNUNET_memcpy (ds_entry->issuer_key, | 1243 | GNUNET_memcpy (ds_entry->issuer_key, |
1315 | &vrh->issuer_key, | 1244 | &vrh->issuer_key, |
1316 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); | 1245 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); |
1317 | ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); | 1246 | ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); |
1247 | |||
1248 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); | ||
1249 | ds_entry->delegation_chain_entry->issuer_key = vrh->issuer_key; | ||
1250 | ds_entry->delegation_chain_entry->issuer_attribute = | ||
1251 | GNUNET_strdup (vrh->issuer_attribute); | ||
1252 | |||
1318 | ds_entry->handle = vrh; | 1253 | ds_entry->handle = vrh; |
1319 | ds_entry->lookup_attribute = GNUNET_strdup (vrh->issuer_attribute); | 1254 | ds_entry->lookup_attribute = GNUNET_strdup (vrh->issuer_attribute); |
1320 | vrh->root_set = ds_entry; | 1255 | ds_entry->unresolved_attribute_delegation = NULL; |
1321 | vrh->pending_lookups = 1; | 1256 | vrh->pending_lookups = 1; |
1322 | 1257 | ||
1323 | // Start with backward resolution | 1258 | // Start with backward resolution |
@@ -1339,7 +1274,6 @@ delegation_chain_fw_resolution_start (void *cls) | |||
1339 | struct DelegationSetQueueEntry *ds_entry; | 1274 | struct DelegationSetQueueEntry *ds_entry; |
1340 | struct DelegateRecordEntry *del_entry; | 1275 | struct DelegateRecordEntry *del_entry; |
1341 | 1276 | ||
1342 | vrh->lookup_request = NULL; | ||
1343 | // set to 0 and increase on each lookup: for fw multiple lookups (may be) started | 1277 | // set to 0 and increase on each lookup: for fw multiple lookups (may be) started |
1344 | vrh->pending_lookups = 0; | 1278 | vrh->pending_lookups = 0; |
1345 | 1279 | ||
@@ -1388,15 +1322,24 @@ delegation_chain_fw_resolution_start (void *cls) | |||
1388 | del_entry->delegate->issuer_attribute); | 1322 | del_entry->delegate->issuer_attribute); |
1389 | 1323 | ||
1390 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); | 1324 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); |
1325 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | ||
1326 | ds_entry->from_bw = false; | ||
1391 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); | 1327 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); |
1392 | GNUNET_memcpy (ds_entry->issuer_key, | 1328 | GNUNET_memcpy (ds_entry->issuer_key, |
1393 | &del_entry->delegate->subject_key, | 1329 | &del_entry->delegate->subject_key, |
1394 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); | 1330 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); |
1331 | |||
1332 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); | ||
1333 | ds_entry->delegation_chain_entry->subject_key = del_entry->delegate->subject_key; | ||
1334 | ds_entry->delegation_chain_entry->subject_attribute = NULL; | ||
1335 | ds_entry->delegation_chain_entry->issuer_key = del_entry->delegate->issuer_key; | ||
1336 | ds_entry->delegation_chain_entry->issuer_attribute = | ||
1337 | GNUNET_strdup (del_entry->delegate->issuer_attribute); | ||
1338 | |||
1395 | ds_entry->attr_trailer = | 1339 | ds_entry->attr_trailer = |
1396 | GNUNET_strdup (del_entry->delegate->issuer_attribute); | 1340 | GNUNET_strdup (del_entry->delegate->issuer_attribute); |
1397 | ds_entry->handle = vrh; | 1341 | ds_entry->handle = vrh; |
1398 | 1342 | ||
1399 | vrh->root_set = ds_entry; | ||
1400 | vrh->pending_lookups++; | 1343 | vrh->pending_lookups++; |
1401 | // Start with forward resolution | 1344 | // Start with forward resolution |
1402 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start Forward Resolution\n"); | 1345 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start Forward Resolution\n"); |
@@ -1528,7 +1471,6 @@ handle_verify (void *cls, const struct VerifyMessage *v_msg) | |||
1528 | if (GNUNET_CREDENTIAL_FLAG_BACKWARD & vrh->resolution_algo && | 1471 | if (GNUNET_CREDENTIAL_FLAG_BACKWARD & vrh->resolution_algo && |
1529 | GNUNET_CREDENTIAL_FLAG_FORWARD & vrh->resolution_algo) | 1472 | GNUNET_CREDENTIAL_FLAG_FORWARD & vrh->resolution_algo) |
1530 | { | 1473 | { |
1531 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "--------BOTH\n"); | ||
1532 | delegation_chain_fw_resolution_start (vrh); | 1474 | delegation_chain_fw_resolution_start (vrh); |
1533 | delegation_chain_bw_resolution_start (vrh); | 1475 | delegation_chain_bw_resolution_start (vrh); |
1534 | } | 1476 | } |
diff --git a/src/credential/test_credential_bi_and.sh b/src/credential/test_credential_bi_and.sh index c69aea53f..b5b55031c 100755 --- a/src/credential/test_credential_bi_and.sh +++ b/src/credential/test_credential_bi_and.sh | |||
@@ -70,20 +70,18 @@ gnunet-namestore -D -z h | |||
70 | # Starting to resolve | 70 | # Starting to resolve |
71 | echo "+++ Starting to Resolve +++" | 71 | echo "+++ Starting to Resolve +++" |
72 | 72 | ||
73 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s` | 73 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s - -` |
74 | echo $DELS | 74 | echo $DELS |
75 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf | 75 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf |
76 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` | 76 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` |
77 | 77 | ||
78 | # Cleanup properly | 78 | # Cleanup properly |
79 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 79 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
80 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 80 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
81 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 81 | gnunet-namestore -z g -d -n "g" -t ATTR -c test_credential_lookup.conf |
82 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 82 | gnunet-namestore -z d -d -n "@" -t DEL -c test_credential_lookup.conf |
83 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 83 | gnunet-namestore -z e -d -n "@" -t DEL -c test_credential_lookup.conf |
84 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 84 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
85 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
86 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
87 | 85 | ||
88 | gnunet-arm -e -c test_credential_lookup.conf | 86 | gnunet-arm -e -c test_credential_lookup.conf |
89 | 87 | ||
diff --git a/src/credential/test_credential_bi_and2.sh b/src/credential/test_credential_bi_and2.sh index de3e718aa..19354d3fe 100755 --- a/src/credential/test_credential_bi_and2.sh +++ b/src/credential/test_credential_bi_and2.sh | |||
@@ -67,20 +67,17 @@ gnunet-namestore -D -z h | |||
67 | # Starting to resolve | 67 | # Starting to resolve |
68 | echo "+++ Starting to Resolve +++" | 68 | echo "+++ Starting to Resolve +++" |
69 | 69 | ||
70 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f -c test_credential_lookup.conf | paste -d, -s` | 70 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f -c test_credential_lookup.conf | paste -d, -s - -` |
71 | echo $DELS | 71 | echo $DELS |
72 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' -c test_credential_lookup.conf | 72 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' -c test_credential_lookup.conf |
73 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" -c test_credential_lookup.conf` | 73 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" -c test_credential_lookup.conf` |
74 | 74 | ||
75 | # Cleanup properly | 75 | # Cleanup properly |
76 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 76 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
77 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 77 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
78 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 78 | gnunet-namestore -z d -d -n "@" -t DEL -c test_credential_lookup.conf |
79 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 79 | gnunet-namestore -z e -d -n "@" -t DEL -c test_credential_lookup.conf |
80 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 80 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
81 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
82 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
83 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
84 | 81 | ||
85 | gnunet-arm -e -c test_credential_lookup.conf | 82 | gnunet-arm -e -c test_credential_lookup.conf |
86 | 83 | ||
diff --git a/src/credential/test_credential_bi_bw.sh b/src/credential/test_credential_bi_bw.sh index 2b8cfc452..ae5549a1d 100755 --- a/src/credential/test_credential_bi_bw.sh +++ b/src/credential/test_credential_bi_bw.sh | |||
@@ -61,20 +61,17 @@ gnunet-namestore -D -z f | |||
61 | # Starting to resolve | 61 | # Starting to resolve |
62 | echo "+++ Starting to Resolve +++" | 62 | echo "+++ Starting to Resolve +++" |
63 | 63 | ||
64 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s` | 64 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s - -` |
65 | echo $DELS | 65 | echo $DELS |
66 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf | 66 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf |
67 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` | 67 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` |
68 | 68 | ||
69 | # Cleanup properly | 69 | # Cleanup properly |
70 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 70 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
71 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 71 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
72 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 72 | gnunet-namestore -z d -d -n "@" -t DEL -c test_credential_lookup.conf |
73 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 73 | gnunet-namestore -z e -d -n "@" -t DEL -c test_credential_lookup.conf |
74 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 74 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
75 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
76 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
77 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
78 | 75 | ||
79 | gnunet-arm -e -c test_credential_lookup.conf | 76 | gnunet-arm -e -c test_credential_lookup.conf |
80 | 77 | ||
diff --git a/src/credential/test_credential_bi_bw_link.sh b/src/credential/test_credential_bi_bw_link.sh index dd66741fa..2ae04f824 100755 --- a/src/credential/test_credential_bi_bw_link.sh +++ b/src/credential/test_credential_bi_bw_link.sh | |||
@@ -64,20 +64,18 @@ gnunet-namestore -D -z f | |||
64 | # Starting to resolve | 64 | # Starting to resolve |
65 | echo "+++ Starting to Resolve +++" | 65 | echo "+++ Starting to Resolve +++" |
66 | 66 | ||
67 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s` | 67 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s - -` |
68 | echo $DELS | 68 | echo $DELS |
69 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf | 69 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf |
70 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` | 70 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` |
71 | 71 | ||
72 | # Cleanup properly | 72 | # Cleanup properly |
73 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 73 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
74 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 74 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
75 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 75 | gnunet-namestore -z g -d -n "g" -t ATTR -c test_credential_lookup.conf |
76 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 76 | gnunet-namestore -z d -d -n "@" -t DEL -c test_credential_lookup.conf |
77 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 77 | gnunet-namestore -z e -d -n "@" -t DEL -c test_credential_lookup.conf |
78 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 78 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
79 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
80 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
81 | 79 | ||
82 | gnunet-arm -e -c test_credential_lookup.conf | 80 | gnunet-arm -e -c test_credential_lookup.conf |
83 | 81 | ||
diff --git a/src/credential/test_credential_bi_bw_link2.sh b/src/credential/test_credential_bi_bw_link2.sh index 46a04a26e..de4eec213 100755 --- a/src/credential/test_credential_bi_bw_link2.sh +++ b/src/credential/test_credential_bi_bw_link2.sh | |||
@@ -65,20 +65,18 @@ gnunet-namestore -D -z f | |||
65 | # Starting to resolve | 65 | # Starting to resolve |
66 | echo "+++ Starting to Resolve +++" | 66 | echo "+++ Starting to Resolve +++" |
67 | 67 | ||
68 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s` | 68 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --forward --backward -c test_credential_lookup.conf | paste -d, -s - -` |
69 | echo $DELS | 69 | echo $DELS |
70 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf | 70 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf |
71 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` | 71 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` |
72 | 72 | ||
73 | # Cleanup properly | 73 | # Cleanup properly |
74 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 74 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
75 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 75 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
76 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 76 | gnunet-namestore -z c -d -n "@" -t DEL -c test_credential_lookup.conf |
77 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 77 | gnunet-namestore -z d -d -n "@" -t DEL -c test_credential_lookup.conf |
78 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 78 | gnunet-namestore -z e -d -n "@" -t DEL -c test_credential_lookup.conf |
79 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 79 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
80 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
81 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
82 | 80 | ||
83 | gnunet-arm -e -c test_credential_lookup.conf | 81 | gnunet-arm -e -c test_credential_lookup.conf |
84 | 82 | ||
diff --git a/src/credential/test_credential_bi_fw.sh b/src/credential/test_credential_bi_fw.sh index 5df73a4fd..3eeb48ee9 100755 --- a/src/credential/test_credential_bi_fw.sh +++ b/src/credential/test_credential_bi_fw.sh | |||
@@ -65,21 +65,18 @@ gnunet-namestore -D -z g | |||
65 | # Starting to resolve | 65 | # Starting to resolve |
66 | echo "+++ Starting to Resolve +++" | 66 | echo "+++ Starting to Resolve +++" |
67 | 67 | ||
68 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g --forward --backward -c test_credential_lookup.conf | paste -d, -s` | 68 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g --forward --backward -c test_credential_lookup.conf | paste -d, -s - -` |
69 | echo $DELS | 69 | echo $DELS |
70 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf | 70 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate=\'$DELS\' --forward --backward -c test_credential_lookup.conf |
71 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` | 71 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate="$DELS" --forward --backward -c test_credential_lookup.conf` |
72 | 72 | ||
73 | # Cleanup properly | 73 | # Cleanup properly |
74 | gnunet-namestore -z a -d -n "@"-t DELE -c test_credential_lookup.conf | 74 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
75 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 75 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
76 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 76 | gnunet-namestore -z d -d -n "@" -t DEL -c test_credential_lookup.conf |
77 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 77 | gnunet-namestore -z e -d -n "@" -t DEL -c test_credential_lookup.conf |
78 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 78 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
79 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 79 | gnunet-namestore -z g -d -n "@" -t DEL -c test_credential_lookup.conf |
80 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
81 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
82 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
83 | 80 | ||
84 | gnunet-arm -e -c test_credential_lookup.conf | 81 | gnunet-arm -e -c test_credential_lookup.conf |
85 | 82 | ||