aboutsummaryrefslogtreecommitdiff
path: root/src/credential/test_credential_own.sh
diff options
context:
space:
mode:
authorAndreas Ebner <a.e.bner@web.de>2019-09-20 11:32:00 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-07 12:18:20 +0200
commit4d4a16e000683046ebb19e6efe15e11d60c2178d (patch)
tree291ce657e2eabe7bf89b4ca3c929f2331da16f23 /src/credential/test_credential_own.sh
parent3099a7c25cf6b11b0f1909e5a2651d65c0e921c7 (diff)
downloadgnunet-4d4a16e000683046ebb19e6efe15e11d60c2178d.tar.gz
gnunet-4d4a16e000683046ebb19e6efe15e11d60c2178d.zip
Test cleanup/fix:
- added missing "- -" to collect for macOS - replaced 'import $SIGNED' with 'import=$SIGNED' to match all other parameters and better visibility
Diffstat (limited to 'src/credential/test_credential_own.sh')
-rwxr-xr-xsrc/credential/test_credential_own.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/credential/test_credential_own.sh b/src/credential/test_credential_own.sh
index b868cdf67..8a94f90e7 100755
--- a/src/credential/test_credential_own.sh
+++ b/src/credential/test_credential_own.sh
@@ -56,31 +56,33 @@ STATE_STUD_ATTR="student"
56REG_STUD_ATTR="student" 56REG_STUD_ATTR="student"
57END_ATTR="end" 57END_ATTR="end"
58 58
59gnunet-identity -d
60
59# FORWARD, subject side stored (different constallations) 61# FORWARD, subject side stored (different constallations)
60SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="a" --subject="$AKEY b.c" --ttl="2019-12-12 10:00:00"` 62SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="a" --subject="$AKEY b.c" --ttl="2019-12-12 10:00:00"`
61gnunet-credential --createSubjectSide --ego=a --import "$SIGNED" 63gnunet-credential --createSubjectSide --ego=a --import="$SIGNED"
62gnunet-namestore -D -z a 64gnunet-namestore -D -z a
63 65
64SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="b" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` 66SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="b" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"`
65gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" 67gnunet-credential --createSubjectSide --ego=d --import="$SIGNED"
66gnunet-namestore -D -z d 68gnunet-namestore -D -z d
67 69
68SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY" --ttl="2019-12-12 10:00:00"` 70SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY" --ttl="2019-12-12 10:00:00"`
69gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" 71gnunet-credential --createSubjectSide --ego=e --import="$SIGNED"
70gnunet-namestore -D -z e 72gnunet-namestore -D -z e
71 73
72SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` 74SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"`
73gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" 75gnunet-credential --createSubjectSide --ego=f --import="$SIGNED"
74SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"` 76SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"`
75gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" 77gnunet-credential --createSubjectSide --ego=f --import="$SIGNED"
76gnunet-namestore -D -z f 78gnunet-namestore -D -z f
77 79
78SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` 80SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"`
79gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private 81gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private
80SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` 82SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"`
81gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private 83gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private
82SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="h.o" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` 84SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="h.o" --subject="$GKEY" --ttl="2019-12-12 10:00:00"`
83gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" 85gnunet-credential --createSubjectSide --ego=g --import="$SIGNED"
84gnunet-namestore -D -z g 86gnunet-namestore -D -z g
85 87
86 88
@@ -96,19 +98,19 @@ gnunet-credential --createIssuerSide --ego=stateu --attribute=$STATE_STUD_ATTR -
96 98
97# (4) RegistrarB issues Alice the credential "student" 99# (4) RegistrarB issues Alice the credential "student"
98SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"` 100SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"`
99gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" --private 101gnunet-credential --createSubjectSide --ego=alice --import="$SIGNED" --private
100 102
101# Starting to resolve 103# Starting to resolve
102echo "+++ Starting to Resolve +++" 104echo "+++ Starting to Resolve +++"
103 105
104# FORWARD 106# FORWARD
105#DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g --forward -c test_credential_lookup.conf | paste -d, -s` 107#DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g --forward -c test_credential_lookup.conf | paste -d, -s - -`
106#echo $DELS 108#echo $DELS
107#echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate=\'$DELS\' --forward -c test_credential_lookup.conf 109#echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate=\'$DELS\' --forward -c test_credential_lookup.conf
108#RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate="$DELS" --forward -c test_credential_lookup.conf` 110#RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate="$DELS" --forward -c test_credential_lookup.conf`
109 111
110# BACKWARD 112# BACKWARD
111DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` 113DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s - -`
112echo $DELS 114echo $DELS
113echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf 115echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf
114gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf 116gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf