diff options
Diffstat (limited to 'src/credential/test_credential_issue.sh')
-rwxr-xr-x | src/credential/test_credential_issue.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/credential/test_credential_issue.sh b/src/credential/test_credential_issue.sh index 833a094e6..3d4b82cf6 100755 --- a/src/credential/test_credential_issue.sh +++ b/src/credential/test_credential_issue.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/sh | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -28,8 +28,8 @@ gnunet-identity -C testissuer -c test_credential_lookup.conf | |||
28 | gnunet-identity -C testsubject -c test_credential_lookup.conf | 28 | gnunet-identity -C testsubject -c test_credential_lookup.conf |
29 | SUBJECT_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testsubject | awk '{print $3}') | 29 | SUBJECT_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testsubject | awk '{print $3}') |
30 | ISSUER_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testissuer | awk '{print $3}') | 30 | ISSUER_KEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep testissuer | awk '{print $3}') |
31 | |||
31 | # Get credential and store it with subject (3) | 32 | # Get credential and store it with subject (3) |
32 | #CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_KEY --attribute=$TEST_ATTR --ttl=5m -c test_credential_lookup.conf` | ||
33 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=testissuer --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --ttl="2019-12-12 10:00:00" -c test_credential_lookup.conf` | 33 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=testissuer --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --ttl="2019-12-12 10:00:00" -c test_credential_lookup.conf` |
34 | 34 | ||
35 | STATUS=$? | 35 | STATUS=$? |
@@ -40,8 +40,7 @@ then | |||
40 | exit 1 | 40 | exit 1 |
41 | fi | 41 | fi |
42 | #Try import | 42 | #Try import |
43 | $DO_TIMEOUT gnunet-credential --createSubjectSide --ego=testsubject --import "$SIGNED" --private -c test_credential_lookup.conf | 43 | $DO_TIMEOUT gnunet-credential --createSubjectSide --ego=testsubject --import="$SIGNED" --private -c test_credential_lookup.conf |
44 | #$DO_TIMEOUT gnunet-namestore -a -z testsubject -n c1 -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf | ||
45 | RES=$? | 44 | RES=$? |
46 | gnunet-arm -e -c test_credential_lookup.conf | 45 | gnunet-arm -e -c test_credential_lookup.conf |
47 | exit $RES | 46 | exit $RES |