test_gns_plus_lookup.sh\
test_gns_zkey_lookup.sh\
test_gns_rel_expiration.sh\
+ test_gns_soa_lookup.sh\
+ test_gns_revocation.sh\
test_gns_cname_lookup.sh
if ENABLE_TEST_RUN
RECORD_PUT_INTERVAL = 1 h
ZONE_PUBLISH_TIME_WINDOW = 1 h
DNS_ROOT=6KT43HD94T0C7R43JSE1U5G982BOHT9RCENEV7HT1207APDBQIT5RLLK2LCSC0PL2ICNRFPPQ834TIVOKK421TP1T1NNUKG43OHKPV8
+
+[revocation]
+WORKBITS = 1
TEST_DOMAIN_ALT2="uk.homepage.gnu"
TEST_IP_ALT2="81.187.252.184"
TEST_IP="131.159.74.67"
+TEST_IP6="2001:4ca0:2001:42:225:90ff:fe6b:d60"
TEST_IP_GNS2DNS="184.172.157.218"
TEST_RECORD_NAME="homepage"
TEST_RECORD_GNS2DNS="gnunet.org"
gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME -t A -V $TEST_IP_GNS2DNS -e never -c test_gns_lookup.conf
gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf
RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN -t A -c test_gns_lookup.conf)
+RES_IP6=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf)
RES_IP_ALT=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf)
RES_IP_ALT2=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN_ALT2 -t A -c test_gns_lookup.conf)
gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
exit 1
fi
+if [ "$RES_IP6" == "$TEST_IP6" ]
+then
+ echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6."
+else
+ echo "Failed to resolve to proper IP for $TEST_DOMAIN, got $RES_IP6, wanted $TEST_IP6."
+ exit 1
+fi
+
if [ "$RES_IP_ALT" == "$TEST_IP" ]
then
echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT."
--- /dev/null
+#!/bin/bash
+trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
+which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
+rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
+
+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-arm -e -c test_gns_lookup.conf
+
+if [ "$RES_IP" != "$TEST_IP" ]
+then
+ echo "Failed to resolve to proper IP, got $RES_IP."
+ exit 1
+fi
+
+if [ "$RES_IP_REV" == " " ]
+then
+ exit 0
+else
+ echo "Failed to revoke zone, got $RES_IP."
+ exit 1
+fi