From 6ad2e1f1dce42e5c998425e80f48d512638e278e Mon Sep 17 00:00:00 2001 From: Andreas Ebner Date: Sun, 18 Aug 2019 13:46:05 +0200 Subject: Bidirectional implementation finished, more complex tests for bidirectional, cleanup fix, todos done: - fixed cleanup to not cause errors and uncommented it again - added new tests for AND, linked roles and fw/bw - fixed an older bug to make test ..own_and2.sh work - replaced bidirectional matching of bw with unresolved_attribute.. (because it contains all the subject attributes/roles) - introduced extra function for bidirectional match handling (is the same for bw and fw and pretty long) - commandline: if not specified to use bw or fw search -> assume it's bidirectional - moved the bidirecitonal matching list to vrh and removed it from being global - valgrind on service (one error remaining, to be solved in future commits) - use the vrh->dsq_head/tail for the cleanup stuff --- src/credential/gnunet-credential.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'src/credential/gnunet-credential.c') diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c index 5cc1a791e..f2d967eea 100644 --- a/src/credential/gnunet-credential.c +++ b/src/credential/gnunet-credential.c @@ -769,12 +769,9 @@ run (void *cls, if (GNUNET_NO == forward && GNUNET_NO == backward) { - fprintf ( - stderr, - _ ( - "You must state which search direction: '--forward' or '--backward'\n")); - GNUNET_SCHEDULER_shutdown (); - return; + // set default: bidirectional + forward = GNUNET_YES; + backward = GNUNET_YES; } if (GNUNET_YES == forward) direction |= GNUNET_CREDENTIAL_FLAG_FORWARD; @@ -834,15 +831,6 @@ run (void *cls, if (GNUNET_YES == verify) { - if (GNUNET_NO == forward && GNUNET_NO == backward) - { - fprintf ( - stderr, - _ ( - "You must state which search direction: '-forward' or 'backward'\n")); - GNUNET_SCHEDULER_shutdown (); - return; - } if (NULL == issuer_key) { fprintf (stderr, _ ("Issuer public key not well-formed\n")); @@ -973,12 +961,12 @@ main (int argc, char *const *argv) "EGO", gettext_noop ("The ego/zone name to use"), &ego_name), - GNUNET_GETOPT_option_string ( - 'a', - "attribute", - "ATTR", - gettext_noop ("The issuer attribute to verify against or to issue"), - &issuer_attr), + GNUNET_GETOPT_option_string ( + 'a', + "attribute", + "ATTR", + gettext_noop ("The issuer attribute to verify against or to issue"), + &issuer_attr), GNUNET_GETOPT_option_string ('T', "ttl", "EXP", -- cgit v1.2.3