diff options
author | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-07-19 23:28:53 +0200 |
---|---|---|
committer | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-07-19 23:28:53 +0200 |
commit | 4fd677cec39e5621d16bc2c63926b803b31582e3 (patch) | |
tree | b1ed7c7544c1a8a721308d67c908e0f3cd758486 /src/reclaim/test_reclaim_consume.sh | |
parent | 0f75e5c54c6e6c9087cf565539266514abd67e98 (diff) | |
download | gnunet-4fd677cec39e5621d16bc2c63926b803b31582e3.tar.gz gnunet-4fd677cec39e5621d16bc2c63926b803b31582e3.zip |
renamed identity-provider subsystem to reclaim
Diffstat (limited to 'src/reclaim/test_reclaim_consume.sh')
-rwxr-xr-x | src/reclaim/test_reclaim_consume.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/reclaim/test_reclaim_consume.sh b/src/reclaim/test_reclaim_consume.sh new file mode 100755 index 000000000..36c8052d0 --- /dev/null +++ b/src/reclaim/test_reclaim_consume.sh | |||
@@ -0,0 +1,43 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_reclaim.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_reclaim.conf | ||
27 | #gnunet-arm -i rest -c test_reclaim.conf | ||
28 | gnunet-identity -C testego -c test_reclaim.conf | ||
29 | gnunet-identity -C rpego -c test_reclaim.conf | ||
30 | SUBJECT_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep rpego | awk '{print $3}') | ||
31 | TEST_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep testego | awk '{print $3}') | ||
32 | gnunet-reclaim -e testego -a email -V john@doe.gnu -c test_reclaim.conf | ||
33 | gnunet-reclaim -e testego -a name -V John -c test_reclaim.conf | ||
34 | TICKET=$(gnunet-reclaim -e testego -i "email,name" -r $SUBJECT_KEY -c test_reclaim.conf | awk '{print $1}') | ||
35 | gnunet-reclaim -e rpego -C $TICKET -c test_reclaim.conf > /dev/null 2>&1 | ||
36 | |||
37 | if test $? != 0 | ||
38 | then | ||
39 | "Failed." | ||
40 | exit 1 | ||
41 | fi | ||
42 | #curl http://localhost:7776/reclaim/tickets/testego | ||
43 | gnunet-arm -e -c test_reclaim.conf | ||