aboutsummaryrefslogtreecommitdiff
path: root/src/revocation
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-11-26 12:51:44 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-11-26 12:51:44 +0000
commit97cd15acabbcfa2357aeecd15df3297a5cbe08aa (patch)
treea1135706d6bc373cd75c1bc6f1ed80ca89077181 /src/revocation
parentfa05c4a3e2371239b7c80a04fdf551b19845f2a6 (diff)
downloadgnunet-97cd15acabbcfa2357aeecd15df3297a5cbe08aa.tar.gz
gnunet-97cd15acabbcfa2357aeecd15df3297a5cbe08aa.zip
evalutation
Diffstat (limited to 'src/revocation')
-rwxr-xr-xsrc/revocation/test_local_revocation.sh20
-rw-r--r--src/revocation/test_revocation.conf9
2 files changed, 26 insertions, 3 deletions
diff --git a/src/revocation/test_local_revocation.sh b/src/revocation/test_local_revocation.sh
index 8661a2583..309975429 100755
--- a/src/revocation/test_local_revocation.sh
+++ b/src/revocation/test_local_revocation.sh
@@ -9,19 +9,35 @@ trap "gnunet-arm -e -c test_revocation.conf" SIGINT
9rm -rf `gnunet-config -c test_revocation.conf -s PATHS -o GNUNET_HOME -f` 9rm -rf `gnunet-config -c test_revocation.conf -s PATHS -o GNUNET_HOME -f`
10 10
11# Start 11# Start
12RES=0
12gnunet-arm -s -c $TEST_CONFIGURATION 13gnunet-arm -s -c $TEST_CONFIGURATION
13gnunet-identity -C $TEST_REVOCATION_EGO -c $TEST_CONFIGURATION 14gnunet-identity -C $TEST_REVOCATION_EGO -c $TEST_CONFIGURATION
14TEST_REVOCATION_KEY=$(gnunet-identity -d | awk '{split($0,a," "); print a[3]}') 15TEST_REVOCATION_KEY=$(gnunet-identity -d | awk '{split($0,a," "); print a[3]}')
15 16
16echo Testing key $TEST_REVOCATION_KEY 17echo Testing key $TEST_REVOCATION_KEY
17OUTPUT_NOT_REVOKED=$(gnunet-revocation -t $TEST_REVOCATION_KEY -c $TEST_CONFIGURATION ) 18OUTPUT_NOT_REVOKED=$(gnunet-revocation -t $TEST_REVOCATION_KEY -c $TEST_CONFIGURATION)
19if grep -q valid <<<$OUTPUT_NOT_REVOKED;
20then
21 echo "Key was valid"
22else
23 RES=1
24fi
18 25
19echo Revoking key $TEST_REVOCATION_KEY 26echo Revoking key $TEST_REVOCATION_KEY
20gnunet-revocation -R $TEST_REVOCATION_EGO -p -c $TEST_CONFIGURATION 1> /dev/null 2> /dev/null 27gnunet-revocation -R $TEST_REVOCATION_EGO -p -c $TEST_CONFIGURATION 1> /dev/null 2> /dev/null
21 28
22echo Testing revoked key $TEST_REVOCATION_KEY 29echo Testing revoked key $TEST_REVOCATION_KEY
23OUTPUT_REVOKED=$(gnunet-revocation -t $TEST_REVOCATION_KEY -c $TEST_CONFIGURATION) 30OUTPUT_REVOKED=$(gnunet-revocation -t $TEST_REVOCATION_KEY -c $TEST_CONFIGURATION)
31if grep -q revoked <<<$OUTPUT_REVOKED;
32then
33 echo "Key was revoked"
34else
35 RES=1
36fi
37
24 38
25#clean up 39#clean up
26gnunet-arm -e -c test_revocation.conf 40gnunet-arm -e -c $TEST_CONFIGURATION
27rm -rf `gnunet-config -c test_revocation.conf -s PATHS -o GNUNET_HOME -f` 41rm -rf `gnunet-config -c test_revocation.conf -s PATHS -o GNUNET_HOME -f`
42
43exit $RES \ No newline at end of file
diff --git a/src/revocation/test_revocation.conf b/src/revocation/test_revocation.conf
index 43bf698b7..0b6beb0a3 100644
--- a/src/revocation/test_revocation.conf
+++ b/src/revocation/test_revocation.conf
@@ -11,4 +11,11 @@ EGODIR = $GNUNET_HOME/identity/egos/
11SUBSYSTEM_CFG = $SERVICEHOME/s.conf 11SUBSYSTEM_CFG = $SERVICEHOME/s.conf
12 12
13[hostlist] 13[hostlist]
14SERVER = dummy \ No newline at end of file 14AUTOSTART = NO
15SERVERS = dummy
16
17[transport-udp]
18BROADCAST = NO
19
20[peerinfo]
21USE_INCLUDED_HELLOS = NO \ No newline at end of file