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