diff options
author | Andreas Ebner <pansy007@googlemail.com> | 2019-08-18 13:46:05 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-10-07 12:17:29 +0200 |
commit | 6ad2e1f1dce42e5c998425e80f48d512638e278e (patch) | |
tree | bb8e2d7d10aca751dc5711746c802c061846aff0 /src/credential/gnunet-credential.c | |
parent | 7b749c91759eb75eda5cac1e02954cc82ef27db3 (diff) | |
download | gnunet-6ad2e1f1dce42e5c998425e80f48d512638e278e.tar.gz gnunet-6ad2e1f1dce42e5c998425e80f48d512638e278e.zip |
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
Diffstat (limited to 'src/credential/gnunet-credential.c')
-rw-r--r-- | src/credential/gnunet-credential.c | 30 |
1 files changed, 9 insertions, 21 deletions
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, | |||
769 | 769 | ||
770 | if (GNUNET_NO == forward && GNUNET_NO == backward) | 770 | if (GNUNET_NO == forward && GNUNET_NO == backward) |
771 | { | 771 | { |
772 | fprintf ( | 772 | // set default: bidirectional |
773 | stderr, | 773 | forward = GNUNET_YES; |
774 | _ ( | 774 | backward = GNUNET_YES; |
775 | "You must state which search direction: '--forward' or '--backward'\n")); | ||
776 | GNUNET_SCHEDULER_shutdown (); | ||
777 | return; | ||
778 | } | 775 | } |
779 | if (GNUNET_YES == forward) | 776 | if (GNUNET_YES == forward) |
780 | direction |= GNUNET_CREDENTIAL_FLAG_FORWARD; | 777 | direction |= GNUNET_CREDENTIAL_FLAG_FORWARD; |
@@ -834,15 +831,6 @@ run (void *cls, | |||
834 | 831 | ||
835 | if (GNUNET_YES == verify) | 832 | if (GNUNET_YES == verify) |
836 | { | 833 | { |
837 | if (GNUNET_NO == forward && GNUNET_NO == backward) | ||
838 | { | ||
839 | fprintf ( | ||
840 | stderr, | ||
841 | _ ( | ||
842 | "You must state which search direction: '-forward' or 'backward'\n")); | ||
843 | GNUNET_SCHEDULER_shutdown (); | ||
844 | return; | ||
845 | } | ||
846 | if (NULL == issuer_key) | 834 | if (NULL == issuer_key) |
847 | { | 835 | { |
848 | fprintf (stderr, _ ("Issuer public key not well-formed\n")); | 836 | fprintf (stderr, _ ("Issuer public key not well-formed\n")); |
@@ -973,12 +961,12 @@ main (int argc, char *const *argv) | |||
973 | "EGO", | 961 | "EGO", |
974 | gettext_noop ("The ego/zone name to use"), | 962 | gettext_noop ("The ego/zone name to use"), |
975 | &ego_name), | 963 | &ego_name), |
976 | GNUNET_GETOPT_option_string ( | 964 | GNUNET_GETOPT_option_string ( |
977 | 'a', | 965 | 'a', |
978 | "attribute", | 966 | "attribute", |
979 | "ATTR", | 967 | "ATTR", |
980 | gettext_noop ("The issuer attribute to verify against or to issue"), | 968 | gettext_noop ("The issuer attribute to verify against or to issue"), |
981 | &issuer_attr), | 969 | &issuer_attr), |
982 | GNUNET_GETOPT_option_string ('T', | 970 | GNUNET_GETOPT_option_string ('T', |
983 | "ttl", | 971 | "ttl", |
984 | "EXP", | 972 | "EXP", |