-fix test
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>
Fri, 5 Jan 2018 09:46:32 +0000 (10:46 +0100)
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>
Fri, 5 Jan 2018 09:46:32 +0000 (10:46 +0100)
src/credential/test_credential_verify_simple.sh

index c4fd8c7a397f21ccf879f8ffcc530ccd48d79f81..bcb3f9877babd823e18252c550cdd78566a7b367 100755 (executable)
@@ -31,17 +31,19 @@ CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_
 TEST_CREDENTIAL="t1"
 gnunet-namestore -p -z testsubject -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf
 
+CREDS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --ego=testsubject -c test_credential_lookup.conf | paste -d, -s`
+
+
 #TODO2 Add -z swich like in gnunet-gns
 #RES_CRED=`$DO_TIMEOUT gnunet-credential --verify --issuer=$ISSUER_KEY --attribute="$TEST_ATTR" --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf`
-RES_CRED=`gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf`
+RES_CRED=`gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential="$CREDS" -c test_credential_lookup.conf`
 
 #TODO cleanup properly
 gnunet-namestore -z testsubject -d -n $TEST_CREDENTIAL -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
-echo $RES_CRED
 #TODO3 proper test
-if [ "$RES_CRED" == "Successful." ]
+if [ "$RES_CRED" != "Failed." ]
 then
   exit 0
 else