diff options
Diffstat (limited to 'src/credential/test_credential_own.sh')
-rwxr-xr-x | src/credential/test_credential_own.sh | 24 |
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" | |||
56 | REG_STUD_ATTR="student" | 56 | REG_STUD_ATTR="student" |
57 | END_ATTR="end" | 57 | END_ATTR="end" |
58 | 58 | ||
59 | gnunet-identity -d | ||
60 | |||
59 | # FORWARD, subject side stored (different constallations) | 61 | # FORWARD, subject side stored (different constallations) |
60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="a" --subject="$AKEY b.c" --ttl="2019-12-12 10:00:00"` | 62 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="a" --subject="$AKEY b.c" --ttl="2019-12-12 10:00:00"` |
61 | gnunet-credential --createSubjectSide --ego=a --import "$SIGNED" | 63 | gnunet-credential --createSubjectSide --ego=a --import="$SIGNED" |
62 | gnunet-namestore -D -z a | 64 | gnunet-namestore -D -z a |
63 | 65 | ||
64 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="b" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 66 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="b" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
65 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 67 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
66 | gnunet-namestore -D -z d | 68 | gnunet-namestore -D -z d |
67 | 69 | ||
68 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY" --ttl="2019-12-12 10:00:00"` | 70 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY" --ttl="2019-12-12 10:00:00"` |
69 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 71 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
70 | gnunet-namestore -D -z e | 72 | gnunet-namestore -D -z e |
71 | 73 | ||
72 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` | 74 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` |
73 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | 75 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" |
74 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"` | 76 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"` |
75 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | 77 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" |
76 | gnunet-namestore -D -z f | 78 | gnunet-namestore -D -z f |
77 | 79 | ||
78 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 80 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
79 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private | 81 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private |
80 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 82 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
81 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private | 83 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private |
82 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="h.o" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 84 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="h.o" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
83 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" | 85 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" |
84 | gnunet-namestore -D -z g | 86 | gnunet-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" |
98 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"` | 100 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"` |
99 | gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" --private | 101 | gnunet-credential --createSubjectSide --ego=alice --import="$SIGNED" --private |
100 | 102 | ||
101 | # Starting to resolve | 103 | # Starting to resolve |
102 | echo "+++ Starting to Resolve +++" | 104 | echo "+++ 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 |
111 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` | 113 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s - -` |
112 | echo $DELS | 114 | echo $DELS |
113 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 115 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
114 | gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf | 116 | gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf |