diff options
Diffstat (limited to 'src/identity-provider/test_idp_revoke.sh')
-rwxr-xr-x | src/identity-provider/test_idp_revoke.sh | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/identity-provider/test_idp_revoke.sh b/src/identity-provider/test_idp_revoke.sh deleted file mode 100755 index 7a3f5d030..000000000 --- a/src/identity-provider/test_idp_revoke.sh +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_idp.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_idp.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_idp.conf 2&>1 > /dev/null | ||
27 | gnunet-identity -C alice -c test_idp.conf | ||
28 | gnunet-identity -C bob -c test_idp.conf | ||
29 | gnunet-identity -C eve -c test_idp.conf | ||
30 | ALICE_KEY=$(gnunet-identity -d -c test_idp.conf | grep alice | awk '{print $3}') | ||
31 | BOB_KEY=$(gnunet-identity -d -c test_idp.conf | grep bob | awk '{print $3}') | ||
32 | EVE_KEY=$(gnunet-identity -d -c test_idp.conf | grep eve | awk '{print $3}') | ||
33 | |||
34 | gnunet-idp -e alice -E 15s -a email -V john@doe.gnu -c test_idp.conf | ||
35 | gnunet-idp -e alice -E 15s -a name -V John -c test_idp.conf | ||
36 | TICKET_BOB=$(gnunet-idp -e alice -i "email,name" -r $BOB_KEY -c test_idp.conf | awk '{print $1}') | ||
37 | #gnunet-idp -e bob -C $TICKET_BOB -c test_idp.conf | ||
38 | TICKET_EVE=$(gnunet-idp -e alice -i "email" -r $EVE_KEY -c test_idp.conf | awk '{print $1}') | ||
39 | |||
40 | #echo "Consuming $TICKET" | ||
41 | #gnunet-idp -e eve -C $TICKET_EVE -c test_idp.conf | ||
42 | gnunet-idp -e alice -R $TICKET_EVE -c test_idp.conf | ||
43 | |||
44 | #sleep 6 | ||
45 | |||
46 | gnunet-idp -e eve -C $TICKET_EVE -c test_idp.conf 2&>1 >/dev/null | ||
47 | if test $? == 0 | ||
48 | then | ||
49 | echo "Eve can still resolve attributes..." | ||
50 | gnunet-arm -e -c test_idp.conf | ||
51 | exit 1 | ||
52 | fi | ||
53 | |||
54 | gnunet-arm -e -c test_idp.conf | ||
55 | gnunet-arm -s -c test_idp.conf 2&>1 > /dev/null | ||
56 | |||
57 | gnunet-idp -e bob -C $TICKET_BOB -c test_idp.conf 2&>1 >/dev/null | ||
58 | if test $? != 0 | ||
59 | then | ||
60 | echo "Bob cannot resolve attributes..." | ||
61 | gnunet-arm -e -c test_idp.conf | ||
62 | exit 1 | ||
63 | fi | ||
64 | |||
65 | gnunet-arm -e -c test_idp.conf | ||