summaryrefslogtreecommitdiff
path: root/src/credential/test_credential_verify_simple.sh
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2016-12-06 22:21:49 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2016-12-06 22:21:49 +0100
commit1be263982990fc0650c30fb5f758d4100540561d (patch)
treeca7823ac9906822cc88e6a3e0c40b215796e0b95 /src/credential/test_credential_verify_simple.sh
parent14045cba92ab8167e1371f2e2447a5bcdd71f12a (diff)
downloadgnunet-1be263982990fc0650c30fb5f758d4100540561d.tar.gz
gnunet-1be263982990fc0650c30fb5f758d4100540561d.zip
- add simple verification
Diffstat (limited to 'src/credential/test_credential_verify_simple.sh')
-rwxr-xr-xsrc/credential/test_credential_verify_simple.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/credential/test_credential_verify_simple.sh b/src/credential/test_credential_verify_simple.sh
index 73ea24137..ce0a2207a 100755
--- a/src/credential/test_credential_verify_simple.sh
+++ b/src/credential/test_credential_verify_simple.sh
@@ -26,14 +26,14 @@ gnunet-identity -C testsubject -c test_credential_lookup.conf
26TEST_ATTR="user" 26TEST_ATTR="user"
27SUBJECT_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testsubject | awk '{print $3}') 27SUBJECT_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testsubject | awk '{print $3}')
28ISSUER_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testissuer | awk '{print $3}') 28ISSUER_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testissuer | awk '{print $3}')
29CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_KEY --attribute=$TEST_ATTR -c test_credential_lookup.conf` 29CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_KEY --attribute=$TEST_ATTR --ttl=5m -c test_credential_lookup.conf`
30 30
31TEST_CREDENTIAL="t1" 31TEST_CREDENTIAL="t1"
32gnunet-namestore -p -z testsubject -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf 32gnunet-namestore -p -z testsubject -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf
33 33
34#TODO2 Add -z swich like in gnunet-gns 34#TODO2 Add -z swich like in gnunet-gns
35#RES_CRED=`$DO_TIMEOUT gnunet-credential --verify --issuer=$ISSUER_KEY --attribute="$TEST_ATTR" --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf` 35#RES_CRED=`$DO_TIMEOUT gnunet-credential --verify --issuer=$ISSUER_KEY --attribute="$TEST_ATTR" --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf`
36valgrind gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf 36RES_CRED=`gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf`
37 37
38#TODO cleanup properly 38#TODO cleanup properly
39gnunet-namestore -z testsubject -d -n $TEST_CREDENTIAL -t CRED -e never -c test_credential_lookup.conf 39gnunet-namestore -z testsubject -d -n $TEST_CREDENTIAL -t CRED -e never -c test_credential_lookup.conf
@@ -41,9 +41,7 @@ gnunet-identity -D testsubject -c test_credential_lookup.conf
41gnunet-arm -e -c test_credential_lookup.conf 41gnunet-arm -e -c test_credential_lookup.conf
42 42
43#TODO3 proper test 43#TODO3 proper test
44exit 0 44if [ "$RES_CRED" == "Successful." ]
45
46if [ "$RES_CRED" == "Ok!" ]
47then 45then
48 exit 0 46 exit 0
49else 47else