X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgns%2Ftest_gns_revocation.sh;h=12f0c088143183010df10dd74216994472bac438;hb=061526a35bf19cd71e375ae7eb9dc3b5fd6c711f;hp=fdd3c76de36a71a499da092b19090f7f0a7b598b;hpb=389e869325e475a3a0f016c32611c5d10049b07b;p=oweals%2Fgnunet.git diff --git a/src/gns/test_gns_revocation.sh b/src/gns/test_gns_revocation.sh index fdd3c76de..12f0c0881 100755 --- a/src/gns/test_gns_revocation.sh +++ b/src/gns/test_gns_revocation.sh @@ -14,22 +14,24 @@ then exit 77 fi -rm -rf /tmp/test-gnunet-gns-peer-1/ - +rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` +MY_EGO="myego" +OTHER_EGO="delegatedego" TEST_IP="127.0.0.1" + gnunet-arm -s -c test_gns_lookup.conf -gnunet-identity -C delegatedego -c test_gns_lookup.conf -DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego | awk '{print $3}') -gnunet-identity -C testego -c test_gns_lookup.conf -gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf -gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf -RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf` -gnunet-revocation -R delegatedego -p -c test_gns_lookup.conf -RES_IP_REV=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf` -gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf -gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf +gnunet-identity -C $OTHER_EGO -c test_gns_lookup.conf +DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO | awk '{print $3}') +gnunet-identity -C $MY_EGO -c test_gns_lookup.conf +gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf +gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf +RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` +gnunet-revocation -R $OTHER_EGO -p -c test_gns_lookup.conf +RES_IP_REV=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` +gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf +gnunet-namestore -z $OTHER_EGO -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf gnunet-arm -e -c test_gns_lookup.conf -rm -rf /tmp/test-gnunet-gns-peer-1/ +rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` if [ "$RES_IP" != "$TEST_IP" ] then