diff options
Diffstat (limited to 'src/credential/test_credential_own.sh')
-rwxr-xr-x | src/credential/test_credential_own.sh | 10 |
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 +++" | |||
107 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` | 107 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` |
108 | echo $DELS | 108 | echo $DELS |
109 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 109 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
110 | RES_DELS=`gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf` | 110 | gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf |
111 | |||
112 | 111 | ||
112 | RES=$? | ||
113 | 113 | ||
114 | # Cleanup properly | 114 | # Cleanup properly |
115 | gnunet-namestore -z epub -d -n $DISC_ATTR -t ATTR -c test_credential_lookup.conf | 115 | gnunet-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 | ||
124 | gnunet-arm -e -c test_credential_lookup.conf | 124 | gnunet-arm -e -c test_credential_lookup.conf |
125 | 125 | ||
126 | if [ "$RES_DELS" != "Failed." ] | 126 | if [ $RES == 0 ] |
127 | then | 127 | then |
128 | # TODO: replace echo -e bashism | ||
129 | echo -e "${RES_DELS}" | ||
130 | exit 0 | 128 | exit 0 |
131 | else | 129 | else |
132 | echo "FAIL: Failed to verify credential $RES_DELS." | 130 | echo "FAIL: Failed to verify credential." |
133 | exit 1 | 131 | exit 1 |
134 | fi | 132 | fi |
135 | 133 | ||