aboutsummaryrefslogtreecommitdiff
path: root/src/credential/test_credential_own.sh
diff options
context:
space:
mode:
authorAndreas Ebner <a.e.bner@web.de>2019-09-14 16:58:39 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-07 12:17:29 +0200
commit5be14856a356b087ad97b479efd9b06172fdfd2f (patch)
tree724a52f386be772cd8605224c47017f3b4d64e20 /src/credential/test_credential_own.sh
parentd4790594a33a4688641f66841f05533b3c0956b9 (diff)
downloadgnunet-5be14856a356b087ad97b479efd9b06172fdfd2f.tar.gz
gnunet-5be14856a356b087ad97b479efd9b06172fdfd2f.zip
Bugfixes, changed test reporting behavior, modified intermediate result reporting:
- fixed a memory error when serializing the delegations - all tests now handle the returned error code from the gnunet-credential.c via "ret" variable - intermediate reporting excluded during collect message - intermediate reporting now contains the direction (bw/fw)
Diffstat (limited to 'src/credential/test_credential_own.sh')
-rwxr-xr-xsrc/credential/test_credential_own.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/credential/test_credential_own.sh b/src/credential/test_credential_own.sh
index 2bb5cb070..fa2580a22 100755
--- a/src/credential/test_credential_own.sh
+++ b/src/credential/test_credential_own.sh
@@ -107,9 +107,9 @@ echo "+++ Starting to Resolve +++"
107DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` 107DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s`
108echo $DELS 108echo $DELS
109echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf 109echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf
110RES_DELS=`gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf` 110gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf
111
112 111
112RES=$?
113 113
114# Cleanup properly 114# Cleanup properly
115gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf 115gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf
@@ -123,13 +123,11 @@ gnunet-namestore -z stateu -d -n $STATE_STUD_ATTR -t ATTR -c test_credential_loo
123 123
124gnunet-arm -e -c test_credential_lookup.conf 124gnunet-arm -e -c test_credential_lookup.conf
125 125
126if [ "$RES_DELS" != "Failed." ] 126if [ $RES == 0 ]
127then 127then
128 # TODO: replace echo -e bashism
129 echo -e "${RES_DELS}"
130 exit 0 128 exit 0
131else 129else
132 echo "FAIL: Failed to verify credential $RES_DELS." 130 echo "FAIL: Failed to verify credential."
133 exit 1 131 exit 1
134fi 132fi
135 133