diff options
Diffstat (limited to 'src/credential')
-rwxr-xr-x | src/credential/test_credential_bi_and.sh | 9 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_and2.sh | 9 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_and3.sh | 12 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_and4.sh | 7 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_bw.sh | 7 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_bw_link.sh | 7 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_bw_link2.sh | 9 | ||||
-rwxr-xr-x | src/credential/test_credential_bi_fw.sh | 9 | ||||
-rwxr-xr-x | src/credential/test_credential_issue.sh | 7 | ||||
-rwxr-xr-x | src/credential/test_credential_own.sh | 24 | ||||
-rwxr-xr-x | src/credential/test_credential_verify.sh | 6 | ||||
-rwxr-xr-x | src/credential/test_credential_verify_and.sh | 8 | ||||
-rwxr-xr-x | src/credential/test_credential_verify_simple.sh | 6 |
13 files changed, 67 insertions, 53 deletions
diff --git a/src/credential/test_credential_bi_and.sh b/src/credential/test_credential_bi_and.sh index a7ed3ce1a..d52fb5dbe 100755 --- a/src/credential/test_credential_bi_and.sh +++ b/src/credential/test_credential_bi_and.sh | |||
@@ -37,6 +37,7 @@ EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print | |||
37 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 37 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
38 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 38 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
39 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') | 39 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') |
40 | gnunet-identity -d | ||
40 | 41 | ||
41 | # (1) (A.a) <- B.b | 42 | # (1) (A.a) <- B.b |
42 | # (2) (B.b) <- C.c AND G.g | 43 | # (2) (B.b) <- C.c AND G.g |
@@ -55,16 +56,16 @@ gnunet-credential --createIssuerSide --ego=g --attribute="g" --subject="$HKEY h" | |||
55 | gnunet-namestore -D -z b | 56 | gnunet-namestore -D -z b |
56 | 57 | ||
57 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
58 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 59 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
59 | gnunet-namestore -D -z d | 60 | gnunet-namestore -D -z d |
60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
61 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 62 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
62 | gnunet-namestore -D -z e | 63 | gnunet-namestore -D -z e |
63 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 64 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
64 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 65 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
65 | gnunet-namestore -D -z f | 66 | gnunet-namestore -D -z f |
66 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=h --attribute="h" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 67 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=h --attribute="h" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
67 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 68 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
68 | gnunet-namestore -D -z h | 69 | gnunet-namestore -D -z h |
69 | 70 | ||
70 | # Starting to resolve | 71 | # Starting to resolve |
diff --git a/src/credential/test_credential_bi_and2.sh b/src/credential/test_credential_bi_and2.sh index 23b55111c..f076c1c5c 100755 --- a/src/credential/test_credential_bi_and2.sh +++ b/src/credential/test_credential_bi_and2.sh | |||
@@ -37,6 +37,7 @@ EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print | |||
37 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 37 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
38 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 38 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
39 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') | 39 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') |
40 | gnunet-identity -d | ||
40 | 41 | ||
41 | # (1) (A.a) <- B.b | 42 | # (1) (A.a) <- B.b |
42 | # (2) (B.b) <- C.c AND G.g | 43 | # (2) (B.b) <- C.c AND G.g |
@@ -52,16 +53,16 @@ gnunet-credential --createIssuerSide --ego=b --attribute="b" --subject="$CKEY c, | |||
52 | gnunet-namestore -D -z b | 53 | gnunet-namestore -D -z b |
53 | 54 | ||
54 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
55 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 56 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
56 | gnunet-namestore -D -z d | 57 | gnunet-namestore -D -z d |
57 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
58 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 59 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
59 | gnunet-namestore -D -z e | 60 | gnunet-namestore -D -z e |
60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
61 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 62 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
62 | gnunet-namestore -D -z f | 63 | gnunet-namestore -D -z f |
63 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 64 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
64 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 65 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
65 | gnunet-namestore -D -z h | 66 | gnunet-namestore -D -z h |
66 | 67 | ||
67 | # Starting to resolve | 68 | # Starting to resolve |
diff --git a/src/credential/test_credential_bi_and3.sh b/src/credential/test_credential_bi_and3.sh index e2f167622..80dddcc14 100755 --- a/src/credential/test_credential_bi_and3.sh +++ b/src/credential/test_credential_bi_and3.sh | |||
@@ -36,8 +36,8 @@ EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print | |||
36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
38 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') | 38 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') |
39 | |||
40 | gnunet-identity -d | 39 | gnunet-identity -d |
40 | |||
41 | # (1) (A.a) <- B.b | 41 | # (1) (A.a) <- B.b |
42 | # (2) (B.b) <- C.c AND G.g | 42 | # (2) (B.b) <- C.c AND G.g |
43 | # (3) C.c <- (D.d) | 43 | # (3) C.c <- (D.d) |
@@ -53,18 +53,18 @@ gnunet-credential --createIssuerSide --ego=b --attribute="b" --subject="$CKEY c, | |||
53 | gnunet-namestore -D -z b | 53 | gnunet-namestore -D -z b |
54 | 54 | ||
55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
56 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 56 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
57 | gnunet-namestore -D -z d | 57 | gnunet-namestore -D -z d |
58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
59 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 59 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
60 | gnunet-namestore -D -z e | 60 | gnunet-namestore -D -z e |
61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$HKEY h" --ttl="2019-12-12 10:00:00"` | 61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$HKEY h" --ttl="2019-12-12 10:00:00"` |
62 | gnunet-credential --createSubjectSide --ego=h --import "$SIGNED" | 62 | gnunet-credential --createSubjectSide --ego=h --import="$SIGNED" |
63 | gnunet-namestore -D -z h | 63 | gnunet-namestore -D -z h |
64 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 64 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
65 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 65 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
66 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=h --attribute="h" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 66 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=h --attribute="h" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
67 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 67 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
68 | gnunet-namestore -D -z f | 68 | gnunet-namestore -D -z f |
69 | 69 | ||
70 | # Starting to resolve | 70 | # Starting to resolve |
diff --git a/src/credential/test_credential_bi_and4.sh b/src/credential/test_credential_bi_and4.sh index c4db5c82a..18731d5d1 100755 --- a/src/credential/test_credential_bi_and4.sh +++ b/src/credential/test_credential_bi_and4.sh | |||
@@ -37,6 +37,7 @@ EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print | |||
37 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 37 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
38 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 38 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
39 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') | 39 | HKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep h | awk '{print $3}') |
40 | gnunet-identity -d | ||
40 | 41 | ||
41 | # (1) (A.a) <- B.b | 42 | # (1) (A.a) <- B.b |
42 | # (2) (B.b) <- C.c AND G.g | 43 | # (2) (B.b) <- C.c AND G.g |
@@ -50,15 +51,15 @@ gnunet-credential --createIssuerSide --ego=b --attribute="b" --subject="$CKEY c, | |||
50 | gnunet-namestore -D -z b | 51 | gnunet-namestore -D -z b |
51 | 52 | ||
52 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 53 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
53 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 54 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
54 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
55 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 56 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
56 | gnunet-namestore -D -z f | 57 | gnunet-namestore -D -z f |
57 | 58 | ||
58 | # Starting to resolve | 59 | # Starting to resolve |
59 | echo "+++ Starting to Resolve +++" | 60 | echo "+++ Starting to Resolve +++" |
60 | 61 | ||
61 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --backward -c test_credential_lookup.conf | paste -d, -s` | 62 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=f --backward -c test_credential_lookup.conf | paste -d, -s - -` |
62 | echo $DELS | 63 | echo $DELS |
63 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 64 | echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
64 | gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --backward -c test_credential_lookup.conf | 65 | gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$FKEY --delegate="$DELS" --backward -c test_credential_lookup.conf |
diff --git a/src/credential/test_credential_bi_bw.sh b/src/credential/test_credential_bi_bw.sh index 3a2043db6..618fae95f 100755 --- a/src/credential/test_credential_bi_bw.sh +++ b/src/credential/test_credential_bi_bw.sh | |||
@@ -35,6 +35,7 @@ DKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep d | awk '{print | |||
35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') | 35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') |
36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
38 | gnunet-identity -d | ||
38 | 39 | ||
39 | # (1) (A.a) <- B.b | 40 | # (1) (A.a) <- B.b |
40 | # (2) (B.b) <- C.c | 41 | # (2) (B.b) <- C.c |
@@ -49,13 +50,13 @@ gnunet-credential --createIssuerSide --ego=b --attribute="b" --subject="$CKEY c" | |||
49 | gnunet-namestore -D -z b | 50 | gnunet-namestore -D -z b |
50 | 51 | ||
51 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 52 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
52 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 53 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
53 | gnunet-namestore -D -z d | 54 | gnunet-namestore -D -z d |
54 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
55 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 56 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
56 | gnunet-namestore -D -z e | 57 | gnunet-namestore -D -z e |
57 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
58 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 59 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
59 | gnunet-namestore -D -z f | 60 | gnunet-namestore -D -z f |
60 | 61 | ||
61 | # Starting to resolve | 62 | # Starting to resolve |
diff --git a/src/credential/test_credential_bi_bw_link.sh b/src/credential/test_credential_bi_bw_link.sh index 86b0e7418..f002c2141 100755 --- a/src/credential/test_credential_bi_bw_link.sh +++ b/src/credential/test_credential_bi_bw_link.sh | |||
@@ -35,6 +35,7 @@ DKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep d | awk '{print | |||
35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') | 35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') |
36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
38 | gnunet-identity -d | ||
38 | 39 | ||
39 | # (1) (A.a) <- B.b | 40 | # (1) (A.a) <- B.b |
40 | # (2) (B.b) <- G.g.c | 41 | # (2) (B.b) <- G.g.c |
@@ -52,13 +53,13 @@ gnunet-credential --createIssuerSide --ego=g --attribute="g" --subject="$CKEY" - | |||
52 | gnunet-namestore -D -z b | 53 | gnunet-namestore -D -z b |
53 | 54 | ||
54 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
55 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 56 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
56 | gnunet-namestore -D -z d | 57 | gnunet-namestore -D -z d |
57 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
58 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 59 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
59 | gnunet-namestore -D -z e | 60 | gnunet-namestore -D -z e |
60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
61 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 62 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
62 | gnunet-namestore -D -z f | 63 | gnunet-namestore -D -z f |
63 | 64 | ||
64 | # Starting to resolve | 65 | # Starting to resolve |
diff --git a/src/credential/test_credential_bi_bw_link2.sh b/src/credential/test_credential_bi_bw_link2.sh index ccb71b880..f6055a7bb 100755 --- a/src/credential/test_credential_bi_bw_link2.sh +++ b/src/credential/test_credential_bi_bw_link2.sh | |||
@@ -35,6 +35,7 @@ DKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep d | awk '{print | |||
35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') | 35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') |
36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
38 | gnunet-identity -d | ||
38 | 39 | ||
39 | # (1) (A.a) <- B.b | 40 | # (1) (A.a) <- B.b |
40 | # (2) (B.b) <- G.g.c | 41 | # (2) (B.b) <- G.g.c |
@@ -50,16 +51,16 @@ gnunet-credential --createIssuerSide --ego=b --attribute="b" --subject="$GKEY g. | |||
50 | gnunet-namestore -D -z b | 51 | gnunet-namestore -D -z b |
51 | 52 | ||
52 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$CKEY" --ttl="2019-12-12 10:00:00"` | 53 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=g --attribute="g" --subject="$CKEY" --ttl="2019-12-12 10:00:00"` |
53 | gnunet-credential --createSubjectSide --ego=c --import "$SIGNED" | 54 | gnunet-credential --createSubjectSide --ego=c --import="$SIGNED" |
54 | gnunet-namestore -D -z c | 55 | gnunet-namestore -D -z c |
55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 56 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
56 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 57 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
57 | gnunet-namestore -D -z d | 58 | gnunet-namestore -D -z d |
58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 59 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
59 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 60 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
60 | gnunet-namestore -D -z e | 61 | gnunet-namestore -D -z e |
61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` | 62 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` |
62 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" --private | 63 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" --private |
63 | gnunet-namestore -D -z f | 64 | gnunet-namestore -D -z f |
64 | 65 | ||
65 | # Starting to resolve | 66 | # Starting to resolve |
diff --git a/src/credential/test_credential_bi_fw.sh b/src/credential/test_credential_bi_fw.sh index 9c8f768c5..7cd5e5c52 100755 --- a/src/credential/test_credential_bi_fw.sh +++ b/src/credential/test_credential_bi_fw.sh | |||
@@ -35,6 +35,7 @@ DKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep d | awk '{print | |||
35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') | 35 | EKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep e | awk '{print $3}') |
36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') | 36 | FKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep f | awk '{print $3}') |
37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') | 37 | GKEY=$(gnunet-identity -d -c test_credential_lookup.conf | grep g | awk '{print $3}') |
38 | gnunet-identity -d | ||
38 | 39 | ||
39 | # (1) (A.a) <- B.b | 40 | # (1) (A.a) <- B.b |
40 | # (2) (B.b) <- C.c | 41 | # (2) (B.b) <- C.c |
@@ -50,16 +51,16 @@ gnunet-credential --createIssuerSide --ego=b --attribute="b" --subject="$CKEY c" | |||
50 | gnunet-namestore -D -z b | 51 | gnunet-namestore -D -z b |
51 | 52 | ||
52 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 53 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
53 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 54 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
54 | gnunet-namestore -D -z d | 55 | gnunet-namestore -D -z d |
55 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` | 56 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` |
56 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 57 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
57 | gnunet-namestore -D -z e | 58 | gnunet-namestore -D -z e |
58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY f" --ttl="2019-12-12 10:00:00"` | 59 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="e" --subject="$FKEY f" --ttl="2019-12-12 10:00:00"` |
59 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | 60 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" |
60 | gnunet-namestore -D -z f | 61 | gnunet-namestore -D -z f |
61 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="f" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 62 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="f" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
62 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private | 63 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private |
63 | gnunet-namestore -D -z g | 64 | gnunet-namestore -D -z g |
64 | 65 | ||
65 | # Starting to resolve | 66 | # Starting to resolve |
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 |
diff --git a/src/credential/test_credential_own.sh b/src/credential/test_credential_own.sh index b868cdf67..8a94f90e7 100755 --- a/src/credential/test_credential_own.sh +++ b/src/credential/test_credential_own.sh | |||
@@ -56,31 +56,33 @@ STATE_STUD_ATTR="student" | |||
56 | REG_STUD_ATTR="student" | 56 | REG_STUD_ATTR="student" |
57 | END_ATTR="end" | 57 | END_ATTR="end" |
58 | 58 | ||
59 | gnunet-identity -d | ||
60 | |||
59 | # FORWARD, subject side stored (different constallations) | 61 | # FORWARD, subject side stored (different constallations) |
60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="a" --subject="$AKEY b.c" --ttl="2019-12-12 10:00:00"` | 62 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="a" --subject="$AKEY b.c" --ttl="2019-12-12 10:00:00"` |
61 | gnunet-credential --createSubjectSide --ego=a --import "$SIGNED" | 63 | gnunet-credential --createSubjectSide --ego=a --import="$SIGNED" |
62 | gnunet-namestore -D -z a | 64 | gnunet-namestore -D -z a |
63 | 65 | ||
64 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="b" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` | 66 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="b" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` |
65 | gnunet-credential --createSubjectSide --ego=d --import "$SIGNED" | 67 | gnunet-credential --createSubjectSide --ego=d --import="$SIGNED" |
66 | gnunet-namestore -D -z d | 68 | gnunet-namestore -D -z d |
67 | 69 | ||
68 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY" --ttl="2019-12-12 10:00:00"` | 70 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="d" --subject="$EKEY" --ttl="2019-12-12 10:00:00"` |
69 | gnunet-credential --createSubjectSide --ego=e --import "$SIGNED" | 71 | gnunet-credential --createSubjectSide --ego=e --import="$SIGNED" |
70 | gnunet-namestore -D -z e | 72 | gnunet-namestore -D -z e |
71 | 73 | ||
72 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` | 74 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="c" --subject="$FKEY c" --ttl="2019-12-12 10:00:00"` |
73 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | 75 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" |
74 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"` | 76 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=e --attribute="k" --subject="$FKEY c.k" --ttl="2019-12-12 10:00:00"` |
75 | gnunet-credential --createSubjectSide --ego=f --import "$SIGNED" | 77 | gnunet-credential --createSubjectSide --ego=f --import="$SIGNED" |
76 | gnunet-namestore -D -z f | 78 | gnunet-namestore -D -z f |
77 | 79 | ||
78 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 80 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=f --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
79 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private | 81 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private |
80 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 82 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=a --attribute="c" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
81 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" --private | 83 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" --private |
82 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="h.o" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` | 84 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=d --attribute="h.o" --subject="$GKEY" --ttl="2019-12-12 10:00:00"` |
83 | gnunet-credential --createSubjectSide --ego=g --import "$SIGNED" | 85 | gnunet-credential --createSubjectSide --ego=g --import="$SIGNED" |
84 | gnunet-namestore -D -z g | 86 | gnunet-namestore -D -z g |
85 | 87 | ||
86 | 88 | ||
@@ -96,19 +98,19 @@ gnunet-credential --createIssuerSide --ego=stateu --attribute=$STATE_STUD_ATTR - | |||
96 | 98 | ||
97 | # (4) RegistrarB issues Alice the credential "student" | 99 | # (4) RegistrarB issues Alice the credential "student" |
98 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"` | 100 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=registrarb --attribute="$REG_STUD_ATTR" --subject="$ALICE_KEY" --ttl="2019-12-12 10:00:00"` |
99 | gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" --private | 101 | gnunet-credential --createSubjectSide --ego=alice --import="$SIGNED" --private |
100 | 102 | ||
101 | # Starting to resolve | 103 | # Starting to resolve |
102 | echo "+++ Starting to Resolve +++" | 104 | echo "+++ Starting to Resolve +++" |
103 | 105 | ||
104 | # FORWARD | 106 | # FORWARD |
105 | #DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g --forward -c test_credential_lookup.conf | paste -d, -s` | 107 | #DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$AKEY --attribute="a" --ego=g --forward -c test_credential_lookup.conf | paste -d, -s - -` |
106 | #echo $DELS | 108 | #echo $DELS |
107 | #echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate=\'$DELS\' --forward -c test_credential_lookup.conf | 109 | #echo gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate=\'$DELS\' --forward -c test_credential_lookup.conf |
108 | #RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate="$DELS" --forward -c test_credential_lookup.conf` | 110 | #RES_DELS=`gnunet-credential --verify --issuer=$AKEY --attribute="a" --subject=$GKEY --delegate="$DELS" --forward -c test_credential_lookup.conf` |
109 | 111 | ||
110 | # BACKWARD | 112 | # BACKWARD |
111 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` | 113 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$EPUB_KEY --attribute=$DISC_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s - -` |
112 | echo $DELS | 114 | echo $DELS |
113 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 115 | echo gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
114 | gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf | 116 | gnunet-credential --verify --issuer=$EPUB_KEY --attribute=$DISC_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf |
diff --git a/src/credential/test_credential_verify.sh b/src/credential/test_credential_verify.sh index 08060f60a..38492de8e 100755 --- a/src/credential/test_credential_verify.sh +++ b/src/credential/test_credential_verify.sh | |||
@@ -41,6 +41,8 @@ DEVELOPER_ATTR="developer" | |||
41 | DEV_ATTR="developer" | 41 | DEV_ATTR="developer" |
42 | TEST_CREDENTIAL="mygnunetcreds" | 42 | TEST_CREDENTIAL="mygnunetcreds" |
43 | 43 | ||
44 | gnunet-identity -d | ||
45 | |||
44 | # (1) A service assigns the attribute "user" to all entities that have been assigned "member" by entities that werde assigned "project" from GNU | 46 | # (1) A service assigns the attribute "user" to all entities that have been assigned "member" by entities that werde assigned "project" from GNU |
45 | gnunet-credential --createIssuerSide --ego=service --attribute="$USER_ATTR" --subject="$GNU_KEY $GNU_PROJECT_ATTR.$MEMBER_ATTR" --ttl="2019-12-12 10:00:00" -c test_credential_lookup.conf | 47 | gnunet-credential --createIssuerSide --ego=service --attribute="$USER_ATTR" --subject="$GNU_KEY $GNU_PROJECT_ATTR.$MEMBER_ATTR" --ttl="2019-12-12 10:00:00" -c test_credential_lookup.conf |
46 | gnunet-namestore -D -z service | 48 | gnunet-namestore -D -z service |
@@ -56,13 +58,13 @@ gnunet-namestore -D -z gnunet | |||
56 | 58 | ||
57 | # (5) GNUnet signes the delegate and Alice stores it | 59 | # (5) GNUnet signes the delegate and Alice stores it |
58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=gnunet --attribute=$DEV_ATTR --subject=$ALICE_KEY --ttl="2019-12-12 10:00:00"` | 60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=gnunet --attribute=$DEV_ATTR --subject=$ALICE_KEY --ttl="2019-12-12 10:00:00"` |
59 | gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" --private | 61 | gnunet-credential --createSubjectSide --ego=alice --import="$SIGNED" --private |
60 | gnunet-namestore -D -z alice | 62 | gnunet-namestore -D -z alice |
61 | 63 | ||
62 | # Starting to resolve | 64 | # Starting to resolve |
63 | echo "+++ Starting to Resolve +++" | 65 | echo "+++ Starting to Resolve +++" |
64 | 66 | ||
65 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$SERVICE_KEY --attribute=$USER_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` | 67 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$SERVICE_KEY --attribute=$USER_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s - -` |
66 | echo $DELS | 68 | echo $DELS |
67 | echo gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 69 | echo gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
68 | gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf | 70 | gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf |
diff --git a/src/credential/test_credential_verify_and.sh b/src/credential/test_credential_verify_and.sh index 03313c692..3a2852dc6 100755 --- a/src/credential/test_credential_verify_and.sh +++ b/src/credential/test_credential_verify_and.sh | |||
@@ -40,6 +40,8 @@ DEVELOPER_ATTR="developer" | |||
40 | DEV_ATTR="developer" | 40 | DEV_ATTR="developer" |
41 | TEST_CREDENTIAL="mygnunetcreds" | 41 | TEST_CREDENTIAL="mygnunetcreds" |
42 | 42 | ||
43 | gnunet-identity -d | ||
44 | |||
43 | # (1) A service assigns the attribute "user" to all entities that have been assigned "member" by entities that werde assigned "project" from GNU | 45 | # (1) A service assigns the attribute "user" to all entities that have been assigned "member" by entities that werde assigned "project" from GNU |
44 | gnunet-credential --createIssuerSide --ego=service --attribute="$USER_ATTR" --subject="$GNU_KEY $GNU_PROJECT_ATTR.$MEMBER_ATTR" --ttl="2019-12-12 10:00:00" -c test_credential_lookup.conf | 46 | gnunet-credential --createIssuerSide --ego=service --attribute="$USER_ATTR" --subject="$GNU_KEY $GNU_PROJECT_ATTR.$MEMBER_ATTR" --ttl="2019-12-12 10:00:00" -c test_credential_lookup.conf |
45 | gnunet-namestore -D -z service | 47 | gnunet-namestore -D -z service |
@@ -54,15 +56,15 @@ gnunet-namestore -D -z gnunet | |||
54 | 56 | ||
55 | # (5) GNUnet signes the delegates and Alice stores it | 57 | # (5) GNUnet signes the delegates and Alice stores it |
56 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=gnunet --attribute=$DEV_ATTR --subject=$ALICE_KEY --ttl="2019-12-12 10:00:00"` | 58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=gnunet --attribute=$DEV_ATTR --subject=$ALICE_KEY --ttl="2019-12-12 10:00:00"` |
57 | gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" --private | 59 | gnunet-credential --createSubjectSide --ego=alice --import="$SIGNED" --private |
58 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=gnunet --attribute=$USER_ATTR --subject=$ALICE_KEY --ttl="2019-12-12 10:00:00"` | 60 | SIGNED=`$DO_TIMEOUT gnunet-credential --signSubjectSide --ego=gnunet --attribute=$USER_ATTR --subject=$ALICE_KEY --ttl="2019-12-12 10:00:00"` |
59 | gnunet-credential --createSubjectSide --ego=alice --import "$SIGNED" --private | 61 | gnunet-credential --createSubjectSide --ego=alice --import="$SIGNED" --private |
60 | gnunet-namestore -D -z alice | 62 | gnunet-namestore -D -z alice |
61 | 63 | ||
62 | # Starting to resolve | 64 | # Starting to resolve |
63 | echo "+++ Starting to Resolve +++" | 65 | echo "+++ Starting to Resolve +++" |
64 | 66 | ||
65 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$SERVICE_KEY --attribute=$USER_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s` | 67 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$SERVICE_KEY --attribute=$USER_ATTR --ego=alice --backward -c test_credential_lookup.conf | paste -d, -s - -` |
66 | echo $DELS | 68 | echo $DELS |
67 | echo gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf | 69 | echo gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate=\'$DELS\' --backward -c test_credential_lookup.conf |
68 | gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf | 70 | gnunet-credential --verify --issuer=$SERVICE_KEY --attribute=$USER_ATTR --subject=$ALICE_KEY --delegate="$DELS" --backward -c test_credential_lookup.conf |
diff --git a/src/credential/test_credential_verify_simple.sh b/src/credential/test_credential_verify_simple.sh index d7657c55f..bd0b260b1 100755 --- a/src/credential/test_credential_verify_simple.sh +++ b/src/credential/test_credential_verify_simple.sh | |||
@@ -27,15 +27,17 @@ 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 | 29 | ||
30 | gnunet-identity -d | ||
31 | |||
30 | # Create delegate (1) | 32 | # Create delegate (1) |
31 | 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` |
32 | gnunet-credential --createSubjectSide --ego=testsubject --import "$SIGNED" --private | 34 | gnunet-credential --createSubjectSide --ego=testsubject --import="$SIGNED" --private |
33 | gnunet-namestore -D -z testsubject | 35 | gnunet-namestore -D -z testsubject |
34 | 36 | ||
35 | # Starting to resolve | 37 | # Starting to resolve |
36 | echo "+++ Starting to Resolve +++" | 38 | echo "+++ Starting to Resolve +++" |
37 | 39 | ||
38 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --ego=testsubject -c test_credential_lookup.conf | paste -d, -s` | 40 | DELS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --ego=testsubject -c test_credential_lookup.conf | paste -d, -s - -` |
39 | echo $DELS | 41 | echo $DELS |
40 | gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --delegate="$DELS" -c test_credential_lookup.conf | 42 | gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --delegate="$DELS" -c test_credential_lookup.conf |
41 | 43 | ||