diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-06 22:21:49 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-06 22:21:49 +0100 |
commit | 1be263982990fc0650c30fb5f758d4100540561d (patch) | |
tree | ca7823ac9906822cc88e6a3e0c40b215796e0b95 /src/credential/test_credential_verify_simple.sh | |
parent | 14045cba92ab8167e1371f2e2447a5bcdd71f12a (diff) | |
download | gnunet-1be263982990fc0650c30fb5f758d4100540561d.tar.gz gnunet-1be263982990fc0650c30fb5f758d4100540561d.zip |
- add simple verification
Diffstat (limited to 'src/credential/test_credential_verify_simple.sh')
-rwxr-xr-x | src/credential/test_credential_verify_simple.sh | 8 |
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 | |||
26 | TEST_ATTR="user" | 26 | TEST_ATTR="user" |
27 | SUBJECT_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testsubject | awk '{print $3}') | 27 | SUBJECT_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testsubject | awk '{print $3}') |
28 | ISSUER_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testissuer | awk '{print $3}') | 28 | ISSUER_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testissuer | awk '{print $3}') |
29 | CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_KEY --attribute=$TEST_ATTR -c test_credential_lookup.conf` | 29 | CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_KEY --attribute=$TEST_ATTR --ttl=5m -c test_credential_lookup.conf` |
30 | 30 | ||
31 | TEST_CREDENTIAL="t1" | 31 | TEST_CREDENTIAL="t1" |
32 | gnunet-namestore -p -z testsubject -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf | 32 | gnunet-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` |
36 | valgrind gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf | 36 | RES_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 |
39 | gnunet-namestore -z testsubject -d -n $TEST_CREDENTIAL -t CRED -e never -c test_credential_lookup.conf | 39 | gnunet-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 | |||
41 | gnunet-arm -e -c test_credential_lookup.conf | 41 | gnunet-arm -e -c test_credential_lookup.conf |
42 | 42 | ||
43 | #TODO3 proper test | 43 | #TODO3 proper test |
44 | exit 0 | 44 | if [ "$RES_CRED" == "Successful." ] |
45 | |||
46 | if [ "$RES_CRED" == "Ok!" ] | ||
47 | then | 45 | then |
48 | exit 0 | 46 | exit 0 |
49 | else | 47 | else |