diff options
Diffstat (limited to 'src/credential/test_credential_own_and2.sh')
-rwxr-xr-x | src/credential/test_credential_own_and2.sh | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/credential/test_credential_own_and2.sh b/src/credential/test_credential_own_and2.sh index bbce251ec..9abfac899 100755 --- a/src/credential/test_credential_own_and2.sh +++ b/src/credential/test_credential_own_and2.sh | |||
@@ -51,7 +51,6 @@ gnunet-namestore -D -z b | |||
51 | 51 | ||
52 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 52 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
53 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 53 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private |
54 | gnunet-namestore -D -z h | ||
55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 54 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
56 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 55 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private |
57 | gnunet-namestore -D -z f | 56 | gnunet-namestore -D -z f |
@@ -62,27 +61,22 @@ echo "+++ Starting to Resolve +++" | |||
62 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --backward -c test_credential_lookup.conf | paste -d, -s` | 61 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --backward -c test_credential_lookup.conf | paste -d, -s` |
63 | echo $DELS | 62 | echo $DELS |
64 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 63 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
65 | RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --backward -c test_credential_lookup.conf` | 64 | gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --backward -c test_credential_lookup.conf |
65 | |||
66 | RES = $? | ||
66 | 67 | ||
67 | # Cleanup properly | 68 | # Cleanup properly |
68 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 69 | gnunet-namestore -z a -d -n "a" -t ATTR -c test_credential_lookup.conf |
69 | gnunet-namestore -z eorg -d -n $PREF_ATTR -t ATTR -c test_credential_lookup.conf | 70 | gnunet-namestore -z b -d -n "b" -t ATTR -c test_credential_lookup.conf |
70 | gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | 71 | gnunet-namestore -z f -d -n "@" -t DEL -c test_credential_lookup.conf |
71 | #gnunet-namestore -z a -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
72 | #gnunet-namestore -z d -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
73 | #gnunet-namestore -z e -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
74 | #gnunet-namestore -z f -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
75 | #gnunet-namestore -z g -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_lookup.conf | ||
76 | 72 | ||
77 | gnunet-arm -e -c test_credential_lookup.conf | 73 | gnunet-arm -e -c test_credential_lookup.conf |
78 | 74 | ||
79 | if [ "$RES_DELS" != "Failed." ] | 75 | if [ $RES == 0 ] |
80 | then | 76 | then |
81 | # TODO: replace echo -e bashism | ||
82 | echo -e "${RES_DELS}" | ||
83 | exit 0 | 77 | exit 0 |
84 | else | 78 | else |
85 | echo "FAIL: Failed to verify credential $RES_DELS." | 79 | echo "FAIL: Failed to verify credential." |
86 | exit 1 | 80 | exit 1 |
87 | fi | 81 | fi |
88 | 82 | ||