diff options
author | Andreas Ebner <pansy007@googlemail.com> | 2019-08-03 13:01:22 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-10-07 12:16:50 +0200 |
commit | 93cd93a1330fb38add615f797ac9a87fc252ff98 (patch) | |
tree | 89766b502d47d576531dc481fd488a9bdb1a701e /src/credential/test_credential_own.sh | |
parent | 40624873cbd2eaf3a94185995b14899ea6ab36bf (diff) | |
download | gnunet-93cd93a1330fb38add615f797ac9a87fc252ff98.tar.gz gnunet-93cd93a1330fb38add615f797ac9a87fc252ff98.zip |
Updated fw/bw algo, collect, and verify (still some things left to do)
- collect/verify now use delegate instead of credential
- parameter in api messages to indicate the direction of the resolution
- fw algo sets delegation_chain and ref_count on solution find
- namestore lookup instead of iteration to get all delegates from starting/goal subject
Diffstat (limited to 'src/credential/test_credential_own.sh')
-rwxr-xr-x | src/credential/test_credential_own.sh | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/credential/test_credential_own.sh b/src/credential/test_credential_own.sh index 23935c75a..19dd686a9 100755 --- a/src/credential/test_credential_own.sh +++ b/src/credential/test_credential_own.sh | |||
@@ -68,10 +68,14 @@ gnunet-namestore -D -z e | |||
68 | 68 | ||
69 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` | 69 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` |
70 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | 70 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" |
71 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"` | ||
72 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | ||
71 | gnunet-namestore -D -z f | 73 | gnunet-namestore -D -z f |
72 | 74 | ||
73 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 75 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
74 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" | 76 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" |
77 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | ||
78 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" | ||
75 | gnunet-namestore -D -z g | 79 | gnunet-namestore -D -z g |
76 | 80 | ||
77 | 81 | ||
@@ -114,18 +118,23 @@ gnunet-namestore -p -z stateu -a -n $STATE_STUD_ATTR -t ATTR -V "$REGISTRARB_KEY | |||
114 | CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=registrarb --subject=$ALICE_KEY --attribute=$REG_STUD_ATTR --ttl=5m -c test_credential_lookup.conf` | 118 | CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=registrarb --subject=$ALICE_KEY --attribute=$REG_STUD_ATTR --ttl=5m -c test_credential_lookup.conf` |
115 | 119 | ||
116 | # Alice stores the credential under "mygnunetcreds" | 120 | # Alice stores the credential under "mygnunetcreds" |
117 | gnunet-namestore -p -z alice -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf | 121 | #gnunet-namestore -p -z alice -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf |
122 | |||
123 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"` | ||
124 | gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" | ||
118 | 125 | ||
119 | # Starting to resolve | 126 | # Starting to resolve |
120 | echo "+++++Starting Collect" | 127 | echo "+++++Starting Collect" |
121 | 128 | ||
122 | CREDS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute="random" --ego=alice -c test_credential_lookup.conf | paste -d, -s` | 129 | CREDS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g -c test_credential_lookup.conf | paste -d, -s` |
123 | #CREDS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice -c test_credential_lookup.conf | paste -d, -s` | ||
124 | echo $CREDS | 130 | echo $CREDS |
125 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --credential=\'$CREDS\' -c test_credential_lookup.conf | 131 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --credential=\'$CREDS\' -c test_credential_lookup.conf |
132 | RES_CRED=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --credential="$CREDS" -c test_credential_lookup.conf` | ||
126 | 133 | ||
127 | RES_CRED=`gnunet-credential --verify --issuer=$EPUB_KEY --attribute="random" --subject=$ALICE_KEY --credential="$CREDS" -c test_credential_lookup.conf` | 134 | #CREDS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice -c test_credential_lookup.conf | paste -d, -s` |
128 | #RES_CRED=`gnunet-credential --verify --issuer=$GKEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --credential="$CREDS" -c test_credential_lookup.conf` | 135 | #echo $CREDS |
136 | #echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --credential=\'$CREDS\' -c test_credential_lookup.conf | ||
137 | #RES_CRED=`gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --credential="$CREDS" -c test_credential_lookup.conf` | ||
129 | 138 | ||
130 | 139 | ||
131 | # Cleanup properly | 140 | # Cleanup properly |