NULL pointer fix
[oweals/gnunet.git] / src / reclaim / test_reclaim_revoke.sh
index 595752fd82cfdb8d80cee305c6b5d791d8f167b4..ffbc7ef2b8fe81bfa949d3be32f462d11489aa72 100755 (executable)
@@ -27,25 +27,24 @@ gnunet-arm -s -c test_reclaim.conf 2&>1 > /dev/null
 gnunet-identity -C alice -c test_reclaim.conf
 gnunet-identity -C bob -c test_reclaim.conf
 gnunet-identity -C eve -c test_reclaim.conf
-ALICE_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep alice | awk '{print $3}')
-BOB_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep bob | awk '{print $3}')
-EVE_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep eve | awk '{print $3}')
-
-gnunet-reclaim -e alice -E 15s -a email -V john@doe.gnu -c test_reclaim.conf 
+ALICE_KEY=$(gnunet-identity -d -e alice -q -c test_reclaim.conf)
+BOB_KEY=$(gnunet-identity -d -e bob -q -c test_reclaim.conf)
+EVE_KEY=$(gnunet-identity -d -e eve -q -c test_reclaim.conf)
+gnunet-reclaim -e alice -E 15s -a email -V john@doe.gnu -c test_reclaim.conf
 gnunet-reclaim -e alice -E 15s -a name -V John -c test_reclaim.conf
 TICKET_BOB=$(gnunet-reclaim -e alice -i "email,name" -r $BOB_KEY -c test_reclaim.conf | awk '{print $1}')
 #gnunet-reclaim -e bob -C $TICKET_BOB -c test_reclaim.conf
 TICKET_EVE=$(gnunet-reclaim -e alice -i "email" -r $EVE_KEY -c test_reclaim.conf | awk '{print $1}')
-
-#echo "Consuming $TICKET"
-#gnunet-reclaim -e eve -C $TICKET_EVE -c test_reclaim.conf
+gnunet-namestore -z alice -D
+echo "Revoking $TICKET"
 gnunet-reclaim -e alice -R $TICKET_EVE -c test_reclaim.conf
+gnunet-namestore -z alice -D
+sleep 16
+echo "Consuming $TICKET"
 
-#sleep 6
-
-gnunet-reclaim -e eve -C $TICKET_EVE -c test_reclaim.conf 2&>1 >/dev/null
+gnunet-reclaim -e eve -C $TICKET_EVE -c test_reclaim.conf
 if test $? == 0
-then 
+then
   echo "Eve can still resolve attributes..."
   gnunet-arm -e -c test_reclaim.conf
   exit 1
@@ -54,7 +53,8 @@ fi
 gnunet-arm -e -c test_reclaim.conf
 gnunet-arm -s -c test_reclaim.conf 2&>1 > /dev/null
 
-gnunet-reclaim -e bob -C $TICKET_BOB -c test_reclaim.conf 2&>1 >/dev/null
+gnunet-reclaim -e bob -C $TICKET_BOB -c test_reclaim.conf
+#gnunet-reclaim -e bob -C $TICKET_BOB -c test_reclaim.conf 2&>1 >/dev/null
 if test $? != 0
 then
   echo "Bob cannot resolve attributes..."