gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 16/171: -update test


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 16/171: -update test
Date: Thu, 04 Jan 2018 16:08:44 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit f89b1efa793f9c2201ab9f4575c0f283b3bba288
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Fri Dec 2 15:36:56 2016 +0100

    -update test
---
 src/credential/test_credential_lookup.sh | 36 +++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

diff --git a/src/credential/test_credential_lookup.sh 
b/src/credential/test_credential_lookup.sh
index 216c281d7..fc6a59c50 100755
--- a/src/credential/test_credential_lookup.sh
+++ b/src/credential/test_credential_lookup.sh
@@ -14,16 +14,42 @@ then
 fi
 
 rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME 
-f`
+
+#  (1) PKEY1.user -> PKEY2.resu.user
+#  (2) PKEY2.resu -> PKEY3
+#  (3) PKEY3.user -> PKEY4
+
+
 which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
-TEST_CREDENTIAL="keySub keyIss credName"
+TEST_ISSUER="PKEY1"
+TEST_ATTR="user"
+TEST_SUB_ATTR="resu"
+TEST_DELEGATION_SUBJECT="PKEY2"
+TEST_DELEGATION_ATTR="$TEST_SUB_ATTR.$TEST_ATTR"
+TEST_SUBDELEGATION_SUBJECT="PKEY3"
+TEST_SUBJECT="PKEY4"
+TEST_CREDENTIAL="c1"
 gnunet-arm -s -c test_credential_lookup.conf
-gnunet-identity -C testsubject -c test_credential_lookup.conf
+gnunet-identity -C testone -c test_credential_lookup.conf
+gnunet-identity -C testtwo -c test_credential_lookup.conf
+gnunet-identity -C testthree -c test_credential_lookup.conf
+gnunet-identity -C testfour -c test_credential_lookup.conf
+
+#TODO1 Get credential and store it with subject (3)
+CRED=`$DO_TIMEOUT gnunet-credential --issue 
--issuer=$TEST_SUBDELEGATION_SUBJECT --attribute=$TEST_SUB_ATTR --expiration 1m 
-c test_credential_lookup.conf`
+gnunet-namestore -p -z testfour -a -n $TEST_CREDENTIAL -t CRED -V $CRED -e 5m 
-c test_credential_lookup.conf
+
+# (1)
+gnunet-namestore -p -z testone -a -n $TEST_ATTR -t ATTR -V 
"$TEST_DELEGATION_SUBJECT $TEST_DELEGATION_ATTR"
+
+# (2)
+gnunet-namestore -p -z testtwo -a -n $TEST_SUB_ATTR -t ATTR -V 
"$TEST_SUBDELEGATION_SUBJECT"
 
-#TODO1 Plugin serialization functions see REVERSE in gns/plugin_gnsrecord_gns.c
-gnunet-namestore -p -z testsubject -a -n newcred -t CRED -V $TEST_CREDENTIAL 
-e never -c test_credential_lookup.conf
 
 #TODO2 Add -z swich like in gnunet-gns
-RES_IP=`$DO_TIMEOUT gnunet-credential -z testsubject -s testsubject -u 
credName -c test_credential_lookup.conf`
+RES_IP=`$DO_TIMEOUT gnunet-credential --verify --issuer=$TEST_ISSUER 
--attribute="$TEST_DELEGATION_ATTR" --subject=$TEST_SUBJECT 
--credential=$TEST_CREDENTIAL -c test_credential_lookup.conf`
+
+#TODO cleanup properly
 gnunet-namestore -z testsubject -d -n newcred -t CRED -e never -c 
test_credential_lookup.conf
 gnunet-identity -D testsubject -c test_credential_lookup.conf
 gnunet-arm -e -c test_credential_lookup.conf

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]