diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-29 11:28:10 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-29 11:28:10 +0100 |
commit | 897dd85d9feb5cd962db3bf2156a2a2b4d2841d4 (patch) | |
tree | 39a6fb6c66c0e3e16584b40b879069a1a6b9694b /src/credential/test_credential_verify_rest.sh | |
parent | d833a55288cc8e5dc8a028b85f1ec4d4803f1e6b (diff) | |
download | gnunet-897dd85d9feb5cd962db3bf2156a2a2b4d2841d4.tar.gz gnunet-897dd85d9feb5cd962db3bf2156a2a2b4d2841d4.zip |
-add collect rest; fixes
Diffstat (limited to 'src/credential/test_credential_verify_rest.sh')
-rwxr-xr-x | src/credential/test_credential_verify_rest.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/credential/test_credential_verify_rest.sh b/src/credential/test_credential_verify_rest.sh index 092737df7..6133ea25e 100755 --- a/src/credential/test_credential_verify_rest.sh +++ b/src/credential/test_credential_verify_rest.sh | |||
@@ -58,14 +58,17 @@ CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=gnunet --subject=$ALICE_KEY -- | |||
58 | gnunet-namestore -p -z alice -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf | 58 | gnunet-namestore -p -z alice -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf |
59 | 59 | ||
60 | #TODO2 Add -z swich like in gnunet-gns | 60 | #TODO2 Add -z swich like in gnunet-gns |
61 | RES_CRED=`gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf` | 61 | #RES_CRED=`gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf` |
62 | 62 | ||
63 | gnunet-arm -i rest -c test_credential_lookup.conf | 63 | gnunet-arm -i rest -c test_credential_lookup.conf |
64 | 64 | ||
65 | sleep 5 | 65 | sleep 5 |
66 | 66 | ||
67 | echo "localhost:7776/credential?attribute=$SERVICE_KEY.$USER_ATTR&credential=$ALICE_KEY.$TEST_CREDENTIAL" | 67 | CREDS=`curl "localhost:7776/credential/collect?attribute=$SERVICE_KEY.$USER_ATTR&subject=alice"` |
68 | curl -v "localhost:7776/credential?attribute=$SERVICE_KEY.$USER_ATTR&credential=$ALICE_KEY.$TEST_CREDENTIAL" | 68 | |
69 | echo $CREDS | ||
70 | |||
71 | curl -v "localhost:7776/credential/verify?attribute=$SERVICE_KEY.$USER_ATTR&subject_key=$ALICE_KEY" --data "$CREDS" | ||
69 | 72 | ||
70 | #TODO cleanup properly | 73 | #TODO cleanup properly |
71 | gnunet-namestore -z alice -d -n $TEST_CREDENTIAL -t CRED -e never -c test_credential_lookup.conf | 74 | gnunet-namestore -z alice -d -n $TEST_CREDENTIAL -t CRED -e never -c test_credential_lookup.conf |