2 TEST_CONFIGURATION="test_revocation.conf"
3 TEST_REVOCATION_EGO="revoc_test"
5 which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
6 trap "gnunet-arm -e -c test_revocation.conf" SIGINT
9 rm -rf `gnunet-config -c test_revocation.conf -s PATHS -o GNUNET_HOME -f`
13 gnunet-arm -s -c $TEST_CONFIGURATION
14 gnunet-identity -C $TEST_REVOCATION_EGO -c $TEST_CONFIGURATION
15 TEST_REVOCATION_KEY=$(gnunet-identity -d | awk '{split($0,a," "); print a[3]}')
17 echo Testing key $TEST_REVOCATION_KEY
18 OUTPUT_NOT_REVOKED=$(gnunet-revocation -t $TEST_REVOCATION_KEY -c $TEST_CONFIGURATION)
19 if grep -q valid <<<$OUTPUT_NOT_REVOKED;
26 echo Revoking key $TEST_REVOCATION_KEY
27 gnunet-revocation -R $TEST_REVOCATION_EGO -p -c $TEST_CONFIGURATION 1> /dev/null 2> /dev/null
29 echo Testing revoked key $TEST_REVOCATION_KEY
30 OUTPUT_REVOKED=$(gnunet-revocation -t $TEST_REVOCATION_KEY -c $TEST_CONFIGURATION)
31 if grep -q revoked <<<$OUTPUT_REVOKED;
33 echo "Key was revoked"
40 gnunet-arm -e -c $TEST_CONFIGURATION
41 rm -rf `gnunet-config -c test_revocation.conf -s PATHS -o GNUNET_HOME -f`