diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | po/POTFILES.in | 20 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/identity-provider/identity-token.conf | 2 | ||||
-rw-r--r-- | src/identity-provider/test_idp.conf | 33 | ||||
-rwxr-xr-x | src/identity-provider/test_idp.sh | 31 | ||||
-rwxr-xr-x | src/identity-provider/test_idp_attribute.sh | 40 | ||||
-rwxr-xr-x | src/identity-provider/test_idp_consume.sh | 43 | ||||
-rwxr-xr-x | src/identity-provider/test_idp_issue.sh | 42 | ||||
-rwxr-xr-x | src/identity-provider/test_idp_revoke.sh | 65 | ||||
-rw-r--r-- | src/include/Makefile.am | 2 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 30 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_attribute_lib.h (renamed from src/include/gnunet_identity_attribute_lib.h) | 64 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_attribute_plugin.h (renamed from src/include/gnunet_identity_attribute_plugin.h) | 24 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_plugin.h (renamed from src/include/gnunet_identity_provider_plugin.h) | 28 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_service.h (renamed from src/include/gnunet_identity_provider_service.h) | 116 | ||||
-rw-r--r-- | src/reclaim-attribute/Makefile.am (renamed from src/identity-attribute/Makefile.am) | 20 | ||||
-rw-r--r-- | src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c (renamed from src/identity-attribute/plugin_identity_attribute_gnuid.c) | 22 | ||||
-rw-r--r-- | src/reclaim-attribute/reclaim_attribute.c (renamed from src/identity-attribute/identity_attribute.c) | 100 | ||||
-rw-r--r-- | src/reclaim-attribute/reclaim_attribute.h (renamed from src/identity-attribute/identity_attribute.h) | 10 | ||||
-rw-r--r-- | src/reclaim/.gitignore (renamed from src/identity-provider/.gitignore) | 0 | ||||
-rw-r--r-- | src/reclaim/Makefile.am (renamed from src/identity-provider/Makefile.am) | 72 | ||||
-rw-r--r-- | src/reclaim/gnunet-reclaim.c (renamed from src/identity-provider/gnunet-idp.c) | 148 | ||||
-rw-r--r-- | src/reclaim/gnunet-service-reclaim.c (renamed from src/identity-provider/gnunet-service-identity-provider.c) | 158 | ||||
-rw-r--r-- | src/reclaim/jwt.c (renamed from src/identity-provider/jwt.c) | 10 | ||||
-rw-r--r-- | src/reclaim/jwt.h (renamed from src/identity-provider/jwt.h) | 2 | ||||
-rw-r--r-- | src/reclaim/plugin_gnsrecord_reclaim.c (renamed from src/identity-provider/plugin_gnsrecord_identity_provider.c) | 6 | ||||
-rw-r--r-- | src/reclaim/plugin_reclaim_sqlite.c (renamed from src/identity-provider/plugin_identity_provider_sqlite.c) | 72 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_openid_connect.c (renamed from src/identity-provider/plugin_rest_openid_connect.c) | 98 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c (renamed from src/identity-provider/plugin_rest_identity_provider.c) | 110 | ||||
-rw-r--r-- | src/reclaim/reclaim.conf (renamed from src/identity-provider/identity-provider.conf) | 12 | ||||
-rw-r--r-- | src/reclaim/reclaim.h (renamed from src/identity-provider/identity_provider.h) | 24 | ||||
-rw-r--r-- | src/reclaim/reclaim_api.c (renamed from src/identity-provider/identity_provider_api.c) | 334 | ||||
-rwxr-xr-x | src/reclaim/test_reclaim.sh | 31 | ||||
-rwxr-xr-x | src/reclaim/test_reclaim_attribute.sh | 40 | ||||
-rwxr-xr-x | src/reclaim/test_reclaim_consume.sh | 43 | ||||
-rw-r--r-- | src/reclaim/test_reclaim_defaults.conf (renamed from src/identity-provider/test_idp_defaults.conf) | 0 | ||||
-rwxr-xr-x | src/reclaim/test_reclaim_issue.sh | 42 | ||||
-rwxr-xr-x | src/reclaim/test_reclaim_revoke.sh | 65 |
39 files changed, 968 insertions, 1001 deletions
diff --git a/configure.ac b/configure.ac index c7314d765..535ce0ffe 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1759,8 +1759,8 @@ src/zonemaster/Makefile | |||
1759 | src/zonemaster/zonemaster.conf | 1759 | src/zonemaster/zonemaster.conf |
1760 | src/rest/Makefile | 1760 | src/rest/Makefile |
1761 | src/abe/Makefile | 1761 | src/abe/Makefile |
1762 | src/identity-attribute/Makefile | 1762 | src/reclaim-attribute/Makefile |
1763 | src/identity-provider/Makefile | 1763 | src/reclaim/Makefile |
1764 | pkgconfig/Makefile | 1764 | pkgconfig/Makefile |
1765 | pkgconfig/gnunetarm.pc | 1765 | pkgconfig/gnunetarm.pc |
1766 | pkgconfig/gnunetats.pc | 1766 | pkgconfig/gnunetats.pc |
diff --git a/po/POTFILES.in b/po/POTFILES.in index 83c3c7bdd..86235f860 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -198,16 +198,6 @@ src/hello/hello.c | |||
198 | src/hostlist/gnunet-daemon-hostlist.c | 198 | src/hostlist/gnunet-daemon-hostlist.c |
199 | src/hostlist/gnunet-daemon-hostlist_client.c | 199 | src/hostlist/gnunet-daemon-hostlist_client.c |
200 | src/hostlist/gnunet-daemon-hostlist_server.c | 200 | src/hostlist/gnunet-daemon-hostlist_server.c |
201 | src/identity-attribute/identity_attribute.c | ||
202 | src/identity-attribute/plugin_identity_attribute_gnuid.c | ||
203 | src/identity-provider/gnunet-idp.c | ||
204 | src/identity-provider/gnunet-service-identity-provider.c | ||
205 | src/identity-provider/identity_provider_api.c | ||
206 | src/identity-provider/jwt.c | ||
207 | src/identity-provider/plugin_gnsrecord_identity_provider.c | ||
208 | src/identity-provider/plugin_identity_provider_sqlite.c | ||
209 | src/identity-provider/plugin_rest_identity_provider.c | ||
210 | src/identity-provider/plugin_rest_openid_connect.c | ||
211 | src/identity/gnunet-identity.c | 201 | src/identity/gnunet-identity.c |
212 | src/identity/gnunet-service-identity.c | 202 | src/identity/gnunet-service-identity.c |
213 | src/identity/identity_api.c | 203 | src/identity/identity_api.c |
@@ -297,6 +287,16 @@ src/psycutil/psyc_env.c | |||
297 | src/psycutil/psyc_message.c | 287 | src/psycutil/psyc_message.c |
298 | src/psycutil/psyc_slicer.c | 288 | src/psycutil/psyc_slicer.c |
299 | src/pt/gnunet-daemon-pt.c | 289 | src/pt/gnunet-daemon-pt.c |
290 | src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c | ||
291 | src/reclaim-attribute/reclaim_attribute.c | ||
292 | src/reclaim/gnunet-reclaim.c | ||
293 | src/reclaim/gnunet-service-reclaim.c | ||
294 | src/reclaim/jwt.c | ||
295 | src/reclaim/plugin_gnsrecord_reclaim.c | ||
296 | src/reclaim/plugin_reclaim_sqlite.c | ||
297 | src/reclaim/plugin_rest_openid_connect.c | ||
298 | src/reclaim/plugin_rest_reclaim.c | ||
299 | src/reclaim/reclaim_api.c | ||
300 | src/regex/gnunet-daemon-regexprofiler.c | 300 | src/regex/gnunet-daemon-regexprofiler.c |
301 | src/regex/gnunet-regex-profiler.c | 301 | src/regex/gnunet-regex-profiler.c |
302 | src/regex/gnunet-regex-simulation-profiler.c | 302 | src/regex/gnunet-regex-simulation-profiler.c |
diff --git a/src/Makefile.am b/src/Makefile.am index 00f30adc3..4ded81891 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -19,11 +19,13 @@ if HAVE_EXPERIMENTAL | |||
19 | social | 19 | social |
20 | # dv (FTBFS) | 20 | # dv (FTBFS) |
21 | if HAVE_ABE | 21 | if HAVE_ABE |
22 | if HAVE_JSON | ||
22 | EXP_DIR += \ | 23 | EXP_DIR += \ |
23 | abe \ | 24 | abe \ |
24 | credential \ | 25 | credential \ |
25 | identity-attribute \ | 26 | reclaim-attribute \ |
26 | identity-provider | 27 | reclaim |
28 | endif | ||
27 | endif | 29 | endif |
28 | if HAVE_JSON | 30 | if HAVE_JSON |
29 | EXP_DIR += \ | 31 | EXP_DIR += \ |
diff --git a/src/identity-provider/identity-token.conf b/src/identity-provider/identity-token.conf deleted file mode 100644 index f29f6cdf3..000000000 --- a/src/identity-provider/identity-token.conf +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | [identity-token] | ||
2 | BINARY=gnunet-service-identity-token | ||
diff --git a/src/identity-provider/test_idp.conf b/src/identity-provider/test_idp.conf deleted file mode 100644 index 3e4df561a..000000000 --- a/src/identity-provider/test_idp.conf +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | @INLINE@ test_idp_defaults.conf | ||
2 | |||
3 | [PATHS] | ||
4 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-idp-peer-1/ | ||
5 | |||
6 | [dht] | ||
7 | START_ON_DEMAND = YES | ||
8 | |||
9 | [rest] | ||
10 | START_ON_DEMAND = YES | ||
11 | PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=$GNUNET_TMP/restlog | ||
12 | |||
13 | [transport] | ||
14 | PLUGINS = | ||
15 | |||
16 | [identity-provider] | ||
17 | START_ON_DEMAND = YES | ||
18 | #PREFIX = valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=$GNUNET_TMP/idplog | ||
19 | |||
20 | [gns] | ||
21 | #PREFIX = valgrind --leak-check=full --track-origins=yes | ||
22 | START_ON_DEMAND = YES | ||
23 | AUTO_IMPORT_PKEY = YES | ||
24 | MAX_PARALLEL_BACKGROUND_QUERIES = 10 | ||
25 | DEFAULT_LOOKUP_TIMEOUT = 15 s | ||
26 | RECORD_PUT_INTERVAL = 1 h | ||
27 | ZONE_PUBLISH_TIME_WINDOW = 1 h | ||
28 | DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0 | ||
29 | |||
30 | [identity-rest-plugin] | ||
31 | address = http://localhost:8000/#/login | ||
32 | psw = mysupersecretpassword | ||
33 | expiration_time = 3600 | ||
diff --git a/src/identity-provider/test_idp.sh b/src/identity-provider/test_idp.sh deleted file mode 100755 index 598d1008c..000000000 --- a/src/identity-provider/test_idp.sh +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | #trap "gnunet-arm -e -c test_idp_lookup.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_idp.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_idp.conf | ||
27 | gnunet-identity -C testego -c test_idp.conf | ||
28 | valgrind gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf | ||
29 | gnunet-idp -e testego -a name -V John -c test_idp.conf | ||
30 | gnunet-idp -e testego -D -c test_idp.conf | ||
31 | gnunet-arm -e -c test_idp.conf | ||
diff --git a/src/identity-provider/test_idp_attribute.sh b/src/identity-provider/test_idp_attribute.sh deleted file mode 100755 index 7f0f06dac..000000000 --- a/src/identity-provider/test_idp_attribute.sh +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_idp.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_idp.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_idp.conf | ||
27 | #gnunet-arm -i rest -c test_idp.conf | ||
28 | gnunet-identity -C testego -c test_idp.conf | ||
29 | gnunet-identity -C rpego -c test_idp.conf | ||
30 | TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep testego | awk '{print $3}') | ||
31 | gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf | ||
32 | gnunet-idp -e testego -a name -V John -c test_idp.conf > /dev/null 2>&1 | ||
33 | if test $? != 0 | ||
34 | then | ||
35 | echo "Failed." | ||
36 | exit 1 | ||
37 | fi | ||
38 | |||
39 | #curl localhost:7776/idp/attributes/testego | ||
40 | gnunet-arm -e -c test_idp.conf | ||
diff --git a/src/identity-provider/test_idp_consume.sh b/src/identity-provider/test_idp_consume.sh deleted file mode 100755 index 11f6865a4..000000000 --- a/src/identity-provider/test_idp_consume.sh +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_idp.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_idp.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_idp.conf | ||
27 | #gnunet-arm -i rest -c test_idp.conf | ||
28 | gnunet-identity -C testego -c test_idp.conf | ||
29 | gnunet-identity -C rpego -c test_idp.conf | ||
30 | SUBJECT_KEY=$(gnunet-identity -d -c test_idp.conf | grep rpego | awk '{print $3}') | ||
31 | TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep testego | awk '{print $3}') | ||
32 | gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf | ||
33 | gnunet-idp -e testego -a name -V John -c test_idp.conf | ||
34 | TICKET=$(gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c test_idp.conf | awk '{print $1}') | ||
35 | gnunet-idp -e rpego -C $TICKET -c test_idp.conf > /dev/null 2>&1 | ||
36 | |||
37 | if test $? != 0 | ||
38 | then | ||
39 | "Failed." | ||
40 | exit 1 | ||
41 | fi | ||
42 | #curl http://localhost:7776/idp/tickets/testego | ||
43 | gnunet-arm -e -c test_idp.conf | ||
diff --git a/src/identity-provider/test_idp_issue.sh b/src/identity-provider/test_idp_issue.sh deleted file mode 100755 index 90487ee73..000000000 --- a/src/identity-provider/test_idp_issue.sh +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_idp.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_idp.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_idp.conf | ||
27 | #gnunet-arm -i rest -c test_idp.conf | ||
28 | gnunet-identity -C testego -c test_idp.conf | ||
29 | gnunet-identity -C rpego -c test_idp.conf | ||
30 | SUBJECT_KEY=$(gnunet-identity -d -c test_idp.conf | grep rpego | awk '{print $3}') | ||
31 | TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep testego | awk '{print $3}') | ||
32 | gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf > /dev/null 2>&1 | ||
33 | gnunet-idp -e testego -a name -V John -c test_idp.conf > /dev/null 2>&1 | ||
34 | #gnunet-idp -e testego -D -c test_idp.conf | ||
35 | gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c test_idp.conf > /dev/null 2>&1 | ||
36 | if test $? != 0 | ||
37 | then | ||
38 | echo "Failed." | ||
39 | exit 1 | ||
40 | fi | ||
41 | #curl http://localhost:7776/idp/attributes/testego | ||
42 | gnunet-arm -e -c test_idp.conf | ||
diff --git a/src/identity-provider/test_idp_revoke.sh b/src/identity-provider/test_idp_revoke.sh deleted file mode 100755 index 7a3f5d030..000000000 --- a/src/identity-provider/test_idp_revoke.sh +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_idp.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_idp.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_idp.conf 2&>1 > /dev/null | ||
27 | gnunet-identity -C alice -c test_idp.conf | ||
28 | gnunet-identity -C bob -c test_idp.conf | ||
29 | gnunet-identity -C eve -c test_idp.conf | ||
30 | ALICE_KEY=$(gnunet-identity -d -c test_idp.conf | grep alice | awk '{print $3}') | ||
31 | BOB_KEY=$(gnunet-identity -d -c test_idp.conf | grep bob | awk '{print $3}') | ||
32 | EVE_KEY=$(gnunet-identity -d -c test_idp.conf | grep eve | awk '{print $3}') | ||
33 | |||
34 | gnunet-idp -e alice -E 15s -a email -V john@doe.gnu -c test_idp.conf | ||
35 | gnunet-idp -e alice -E 15s -a name -V John -c test_idp.conf | ||
36 | TICKET_BOB=$(gnunet-idp -e alice -i "email,name" -r $BOB_KEY -c test_idp.conf | awk '{print $1}') | ||
37 | #gnunet-idp -e bob -C $TICKET_BOB -c test_idp.conf | ||
38 | TICKET_EVE=$(gnunet-idp -e alice -i "email" -r $EVE_KEY -c test_idp.conf | awk '{print $1}') | ||
39 | |||
40 | #echo "Consuming $TICKET" | ||
41 | #gnunet-idp -e eve -C $TICKET_EVE -c test_idp.conf | ||
42 | gnunet-idp -e alice -R $TICKET_EVE -c test_idp.conf | ||
43 | |||
44 | #sleep 6 | ||
45 | |||
46 | gnunet-idp -e eve -C $TICKET_EVE -c test_idp.conf 2&>1 >/dev/null | ||
47 | if test $? == 0 | ||
48 | then | ||
49 | echo "Eve can still resolve attributes..." | ||
50 | gnunet-arm -e -c test_idp.conf | ||
51 | exit 1 | ||
52 | fi | ||
53 | |||
54 | gnunet-arm -e -c test_idp.conf | ||
55 | gnunet-arm -s -c test_idp.conf 2&>1 > /dev/null | ||
56 | |||
57 | gnunet-idp -e bob -C $TICKET_BOB -c test_idp.conf 2&>1 >/dev/null | ||
58 | if test $? != 0 | ||
59 | then | ||
60 | echo "Bob cannot resolve attributes..." | ||
61 | gnunet-arm -e -c test_idp.conf | ||
62 | exit 1 | ||
63 | fi | ||
64 | |||
65 | gnunet-arm -e -c test_idp.conf | ||
diff --git a/src/include/Makefile.am b/src/include/Makefile.am index 08e9dd156..41b2b1382 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am | |||
@@ -66,7 +66,7 @@ gnunetinclude_HEADERS = \ | |||
66 | gnunet_hello_lib.h \ | 66 | gnunet_hello_lib.h \ |
67 | gnunet_helper_lib.h \ | 67 | gnunet_helper_lib.h \ |
68 | gnunet_identity_service.h \ | 68 | gnunet_identity_service.h \ |
69 | gnunet_identity_provider_service.h \ | 69 | gnunet_reclaim_service.h \ |
70 | gnunet_json_lib.h \ | 70 | gnunet_json_lib.h \ |
71 | gnunet_jsonapi_lib.h \ | 71 | gnunet_jsonapi_lib.h \ |
72 | gnunet_jsonapi_util.h \ | 72 | gnunet_jsonapi_util.h \ |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 36aa424b4..4400db7e1 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -2656,35 +2656,35 @@ extern "C" | |||
2656 | * | 2656 | * |
2657 | * IDENTITY PROVIDER MESSAGE TYPES | 2657 | * IDENTITY PROVIDER MESSAGE TYPES |
2658 | */ | 2658 | */ |
2659 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE 961 | 2659 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE 961 |
2660 | 2660 | ||
2661 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE 962 | 2661 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE_RESPONSE 962 |
2662 | 2662 | ||
2663 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START 963 | 2663 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_START 963 |
2664 | 2664 | ||
2665 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP 964 | 2665 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP 964 |
2666 | 2666 | ||
2667 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT 965 | 2667 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT 965 |
2668 | 2668 | ||
2669 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT 966 | 2669 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT 966 |
2670 | 2670 | ||
2671 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_TICKET 967 | 2671 | #define GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET 967 |
2672 | 2672 | ||
2673 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT 968 | 2673 | #define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT 968 |
2674 | 2674 | ||
2675 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET 969 | 2675 | #define GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET 969 |
2676 | 2676 | ||
2677 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT 970 | 2677 | #define GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT 970 |
2678 | 2678 | ||
2679 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET 971 | 2679 | #define GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET 971 |
2680 | 2680 | ||
2681 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT 972 | 2681 | #define GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT 972 |
2682 | 2682 | ||
2683 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START 973 | 2683 | #define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START 973 |
2684 | 2684 | ||
2685 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP 974 | 2685 | #define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP 974 |
2686 | 2686 | ||
2687 | #define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT 975 | 2687 | #define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT 975 |
2688 | 2688 | ||
2689 | /************************************************** | 2689 | /************************************************** |
2690 | * | 2690 | * |
diff --git a/src/include/gnunet_identity_attribute_lib.h b/src/include/gnunet_reclaim_attribute_lib.h index eb01f7ac2..df5356d76 100644 --- a/src/include/gnunet_identity_attribute_lib.h +++ b/src/include/gnunet_reclaim_attribute_lib.h | |||
@@ -25,8 +25,8 @@ | |||
25 | * @defgroup identity-provider Identity Provider service | 25 | * @defgroup identity-provider Identity Provider service |
26 | * @{ | 26 | * @{ |
27 | */ | 27 | */ |
28 | #ifndef GNUNET_IDENTITY_ATTRIBUTE_LIB_H | 28 | #ifndef GNUNET_RECLAIM_ATTRIBUTE_LIB_H |
29 | #define GNUNET_IDENTITY_ATTRIBUTE_LIB_H | 29 | #define GNUNET_RECLAIM_ATTRIBUTE_LIB_H |
30 | 30 | ||
31 | #ifdef __cplusplus | 31 | #ifdef __cplusplus |
32 | extern "C" | 32 | extern "C" |
@@ -42,19 +42,19 @@ extern "C" | |||
42 | /** | 42 | /** |
43 | * No value attribute. | 43 | * No value attribute. |
44 | */ | 44 | */ |
45 | #define GNUNET_IDENTITY_ATTRIBUTE_TYPE_NONE 0 | 45 | #define GNUNET_RECLAIM_ATTRIBUTE_TYPE_NONE 0 |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * String attribute. | 48 | * String attribute. |
49 | */ | 49 | */ |
50 | #define GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING 1 | 50 | #define GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING 1 |
51 | 51 | ||
52 | 52 | ||
53 | 53 | ||
54 | /** | 54 | /** |
55 | * An attribute. | 55 | * An attribute. |
56 | */ | 56 | */ |
57 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim | 57 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim |
58 | { | 58 | { |
59 | /** | 59 | /** |
60 | * The name of the attribute. Note "name" must never be individually | 60 | * The name of the attribute. Note "name" must never be individually |
@@ -86,35 +86,35 @@ struct GNUNET_IDENTITY_ATTRIBUTE_Claim | |||
86 | 86 | ||
87 | }; | 87 | }; |
88 | 88 | ||
89 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList | 89 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList |
90 | { | 90 | { |
91 | /** | 91 | /** |
92 | * List head | 92 | * List head |
93 | */ | 93 | */ |
94 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *list_head; | 94 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *list_head; |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * List tail | 97 | * List tail |
98 | */ | 98 | */ |
99 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *list_tail; | 99 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *list_tail; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry | 102 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry |
103 | { | 103 | { |
104 | /** | 104 | /** |
105 | * DLL | 105 | * DLL |
106 | */ | 106 | */ |
107 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *prev; | 107 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *prev; |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * DLL | 110 | * DLL |
111 | */ | 111 | */ |
112 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *next; | 112 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *next; |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * The attribute claim | 115 | * The attribute claim |
116 | */ | 116 | */ |
117 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *claim; | 117 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *claim; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | /** | 120 | /** |
@@ -126,8 +126,8 @@ struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry | |||
126 | * @param data_size the attribute value size | 126 | * @param data_size the attribute value size |
127 | * @return the new attribute | 127 | * @return the new attribute |
128 | */ | 128 | */ |
129 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim * | 129 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * |
130 | GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, | 130 | GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char* attr_name, |
131 | uint32_t type, | 131 | uint32_t type, |
132 | const void* data, | 132 | const void* data, |
133 | size_t data_size); | 133 | size_t data_size); |
@@ -141,13 +141,13 @@ GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, | |||
141 | * @return the required buffer size | 141 | * @return the required buffer size |
142 | */ | 142 | */ |
143 | size_t | 143 | size_t |
144 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs); | 144 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
145 | 145 | ||
146 | void | 146 | void |
147 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs); | 147 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
148 | 148 | ||
149 | void | 149 | void |
150 | GNUNET_IDENTITY_ATTRIBUTE_list_add (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 150 | GNUNET_RECLAIM_ATTRIBUTE_list_add (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
151 | const char* attr_name, | 151 | const char* attr_name, |
152 | uint32_t type, | 152 | uint32_t type, |
153 | const void* data, | 153 | const void* data, |
@@ -162,7 +162,7 @@ GNUNET_IDENTITY_ATTRIBUTE_list_add (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList * | |||
162 | * @return length of serialized data | 162 | * @return length of serialized data |
163 | */ | 163 | */ |
164 | size_t | 164 | size_t |
165 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 165 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
166 | char *result); | 166 | char *result); |
167 | 167 | ||
168 | /** | 168 | /** |
@@ -173,8 +173,8 @@ GNUNET_IDENTITY_ATTRIBUTE_list_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE | |||
173 | * | 173 | * |
174 | * @return a GNUNET_IDENTITY_PROVIDER_AttributeList, must be free'd by caller | 174 | * @return a GNUNET_IDENTITY_PROVIDER_AttributeList, must be free'd by caller |
175 | */ | 175 | */ |
176 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList * | 176 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * |
177 | GNUNET_IDENTITY_ATTRIBUTE_list_deserialize (const char* data, | 177 | GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char* data, |
178 | size_t data_size); | 178 | size_t data_size); |
179 | 179 | ||
180 | 180 | ||
@@ -186,7 +186,7 @@ GNUNET_IDENTITY_ATTRIBUTE_list_deserialize (const char* data, | |||
186 | * @return the required buffer size | 186 | * @return the required buffer size |
187 | */ | 187 | */ |
188 | size_t | 188 | size_t |
189 | GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr); | 189 | GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr); |
190 | 190 | ||
191 | 191 | ||
192 | 192 | ||
@@ -199,7 +199,7 @@ GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (const struct GNUNET_IDENTITY_ATTRI | |||
199 | * @return length of serialized data | 199 | * @return length of serialized data |
200 | */ | 200 | */ |
201 | size_t | 201 | size_t |
202 | GNUNET_IDENTITY_ATTRIBUTE_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr, | 202 | GNUNET_RECLAIM_ATTRIBUTE_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
203 | char *result); | 203 | char *result); |
204 | 204 | ||
205 | /** | 205 | /** |
@@ -210,12 +210,12 @@ GNUNET_IDENTITY_ATTRIBUTE_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE_Clai | |||
210 | * | 210 | * |
211 | * @return a GNUNET_IDENTITY_PROVIDER_Attribute, must be free'd by caller | 211 | * @return a GNUNET_IDENTITY_PROVIDER_Attribute, must be free'd by caller |
212 | */ | 212 | */ |
213 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim * | 213 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * |
214 | GNUNET_IDENTITY_ATTRIBUTE_deserialize (const char* data, | 214 | GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char* data, |
215 | size_t data_size); | 215 | size_t data_size); |
216 | 216 | ||
217 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList* | 217 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList* |
218 | GNUNET_IDENTITY_ATTRIBUTE_list_dup (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs); | 218 | GNUNET_RECLAIM_ATTRIBUTE_list_dup (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
219 | 219 | ||
220 | /** | 220 | /** |
221 | * Convert a type name to the corresponding number | 221 | * Convert a type name to the corresponding number |
@@ -224,7 +224,7 @@ GNUNET_IDENTITY_ATTRIBUTE_list_dup (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim | |||
224 | * @return corresponding number, UINT32_MAX on error | 224 | * @return corresponding number, UINT32_MAX on error |
225 | */ | 225 | */ |
226 | uint32_t | 226 | uint32_t |
227 | GNUNET_IDENTITY_ATTRIBUTE_typename_to_number (const char *typename); | 227 | GNUNET_RECLAIM_ATTRIBUTE_typename_to_number (const char *typename); |
228 | 228 | ||
229 | /** | 229 | /** |
230 | * Convert human-readable version of a 'claim' of an attribute to the binary | 230 | * Convert human-readable version of a 'claim' of an attribute to the binary |
@@ -237,7 +237,7 @@ GNUNET_IDENTITY_ATTRIBUTE_typename_to_number (const char *typename); | |||
237 | * @return #GNUNET_OK on success | 237 | * @return #GNUNET_OK on success |
238 | */ | 238 | */ |
239 | int | 239 | int |
240 | GNUNET_IDENTITY_ATTRIBUTE_string_to_value (uint32_t type, | 240 | GNUNET_RECLAIM_ATTRIBUTE_string_to_value (uint32_t type, |
241 | const char *s, | 241 | const char *s, |
242 | void **data, | 242 | void **data, |
243 | size_t *data_size); | 243 | size_t *data_size); |
@@ -251,7 +251,7 @@ GNUNET_IDENTITY_ATTRIBUTE_string_to_value (uint32_t type, | |||
251 | * @return NULL on error, otherwise human-readable representation of the claim | 251 | * @return NULL on error, otherwise human-readable representation of the claim |
252 | */ | 252 | */ |
253 | char * | 253 | char * |
254 | GNUNET_IDENTITY_ATTRIBUTE_value_to_string (uint32_t type, | 254 | GNUNET_RECLAIM_ATTRIBUTE_value_to_string (uint32_t type, |
255 | const void* data, | 255 | const void* data, |
256 | size_t data_size); | 256 | size_t data_size); |
257 | 257 | ||
@@ -262,7 +262,7 @@ GNUNET_IDENTITY_ATTRIBUTE_value_to_string (uint32_t type, | |||
262 | * @return corresponding typestring, NULL on error | 262 | * @return corresponding typestring, NULL on error |
263 | */ | 263 | */ |
264 | const char* | 264 | const char* |
265 | GNUNET_IDENTITY_ATTRIBUTE_number_to_typename (uint32_t type); | 265 | GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (uint32_t type); |
266 | 266 | ||
267 | 267 | ||
268 | #if 0 /* keep Emacsens' auto-indent happy */ | 268 | #if 0 /* keep Emacsens' auto-indent happy */ |
@@ -273,9 +273,9 @@ GNUNET_IDENTITY_ATTRIBUTE_number_to_typename (uint32_t type); | |||
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | 275 | ||
276 | /* ifndef GNUNET_IDENTITY_ATTRIBUTE_LIB_H */ | 276 | /* ifndef GNUNET_RECLAIM_ATTRIBUTE_LIB_H */ |
277 | #endif | 277 | #endif |
278 | 278 | ||
279 | /** @} */ /* end of group identity */ | 279 | /** @} */ /* end of group identity */ |
280 | 280 | ||
281 | /* end of gnunet_identity_attribute_lib.h */ | 281 | /* end of gnunet_reclaim_attribute_lib.h */ |
diff --git a/src/include/gnunet_identity_attribute_plugin.h b/src/include/gnunet_reclaim_attribute_plugin.h index 7c399c616..cf0bb141a 100644 --- a/src/include/gnunet_identity_attribute_plugin.h +++ b/src/include/gnunet_reclaim_attribute_plugin.h | |||
@@ -26,11 +26,11 @@ | |||
26 | * Plugin API for the idp database backend | 26 | * Plugin API for the idp database backend |
27 | * @{ | 27 | * @{ |
28 | */ | 28 | */ |
29 | #ifndef GNUNET_IDENTITY_ATTRIBUTE_PLUGIN_H | 29 | #ifndef GNUNET_RECLAIM_ATTRIBUTE_PLUGIN_H |
30 | #define GNUNET_IDENTITY_ATTRIBUTE_PLUGIN_H | 30 | #define GNUNET_RECLAIM_ATTRIBUTE_PLUGIN_H |
31 | 31 | ||
32 | #include "gnunet_util_lib.h" | 32 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_identity_attribute_lib.h" | 33 | #include "gnunet_reclaim_attribute_lib.h" |
34 | 34 | ||
35 | #ifdef __cplusplus | 35 | #ifdef __cplusplus |
36 | extern "C" | 36 | extern "C" |
@@ -51,7 +51,7 @@ extern "C" | |||
51 | * @param data_size number of bytes in @a data | 51 | * @param data_size number of bytes in @a data |
52 | * @return NULL on error, otherwise human-readable representation of the value | 52 | * @return NULL on error, otherwise human-readable representation of the value |
53 | */ | 53 | */ |
54 | typedef char * (*GNUNET_IDENTITY_ATTRIBUTE_ValueToStringFunction) (void *cls, | 54 | typedef char * (*GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction) (void *cls, |
55 | uint32_t type, | 55 | uint32_t type, |
56 | const void *data, | 56 | const void *data, |
57 | size_t data_size); | 57 | size_t data_size); |
@@ -69,7 +69,7 @@ typedef char * (*GNUNET_IDENTITY_ATTRIBUTE_ValueToStringFunction) (void *cls, | |||
69 | * @param data_size set to number of bytes in @a data | 69 | * @param data_size set to number of bytes in @a data |
70 | * @return #GNUNET_OK on success | 70 | * @return #GNUNET_OK on success |
71 | */ | 71 | */ |
72 | typedef int (*GNUNET_IDENTITY_ATTRIBUTE_StringToValueFunction) (void *cls, | 72 | typedef int (*GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction) (void *cls, |
73 | uint32_t type, | 73 | uint32_t type, |
74 | const char *s, | 74 | const char *s, |
75 | void **data, | 75 | void **data, |
@@ -84,7 +84,7 @@ typedef int (*GNUNET_IDENTITY_ATTRIBUTE_StringToValueFunction) (void *cls, | |||
84 | * @param typename name to convert | 84 | * @param typename name to convert |
85 | * @return corresponding number, UINT32_MAX on error | 85 | * @return corresponding number, UINT32_MAX on error |
86 | */ | 86 | */ |
87 | typedef uint32_t (*GNUNET_IDENTITY_ATTRIBUTE_TypenameToNumberFunction) (void *cls, | 87 | typedef uint32_t (*GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction) (void *cls, |
88 | const char *typename); | 88 | const char *typename); |
89 | 89 | ||
90 | 90 | ||
@@ -96,7 +96,7 @@ typedef uint32_t (*GNUNET_IDENTITY_ATTRIBUTE_TypenameToNumberFunction) (void *cl | |||
96 | * @param type number of a type to convert | 96 | * @param type number of a type to convert |
97 | * @return corresponding typestring, NULL on error | 97 | * @return corresponding typestring, NULL on error |
98 | */ | 98 | */ |
99 | typedef const char * (*GNUNET_IDENTITY_ATTRIBUTE_NumberToTypenameFunction) (void *cls, | 99 | typedef const char * (*GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction) (void *cls, |
100 | uint32_t type); | 100 | uint32_t type); |
101 | 101 | ||
102 | 102 | ||
@@ -104,7 +104,7 @@ typedef const char * (*GNUNET_IDENTITY_ATTRIBUTE_NumberToTypenameFunction) (void | |||
104 | * Each plugin is required to return a pointer to a struct of this | 104 | * Each plugin is required to return a pointer to a struct of this |
105 | * type as the return value from its entry point. | 105 | * type as the return value from its entry point. |
106 | */ | 106 | */ |
107 | struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions | 107 | struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions |
108 | { | 108 | { |
109 | 109 | ||
110 | /** | 110 | /** |
@@ -115,22 +115,22 @@ struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions | |||
115 | /** | 115 | /** |
116 | * Conversion to string. | 116 | * Conversion to string. |
117 | */ | 117 | */ |
118 | GNUNET_IDENTITY_ATTRIBUTE_ValueToStringFunction value_to_string; | 118 | GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction value_to_string; |
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Conversion to binary. | 121 | * Conversion to binary. |
122 | */ | 122 | */ |
123 | GNUNET_IDENTITY_ATTRIBUTE_StringToValueFunction string_to_value; | 123 | GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction string_to_value; |
124 | 124 | ||
125 | /** | 125 | /** |
126 | * Typename to number. | 126 | * Typename to number. |
127 | */ | 127 | */ |
128 | GNUNET_IDENTITY_ATTRIBUTE_TypenameToNumberFunction typename_to_number; | 128 | GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction typename_to_number; |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Number to typename. | 131 | * Number to typename. |
132 | */ | 132 | */ |
133 | GNUNET_IDENTITY_ATTRIBUTE_NumberToTypenameFunction number_to_typename; | 133 | GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction number_to_typename; |
134 | 134 | ||
135 | }; | 135 | }; |
136 | 136 | ||
diff --git a/src/include/gnunet_identity_provider_plugin.h b/src/include/gnunet_reclaim_plugin.h index 2330066dd..c400af64c 100644 --- a/src/include/gnunet_identity_provider_plugin.h +++ b/src/include/gnunet_reclaim_plugin.h | |||
@@ -22,15 +22,15 @@ | |||
22 | * @file | 22 | * @file |
23 | * Plugin API for the idp database backend | 23 | * Plugin API for the idp database backend |
24 | * | 24 | * |
25 | * @defgroup identity-provider-plugin IdP service plugin API | 25 | * @defgroup reclaim-plugin IdP service plugin API |
26 | * Plugin API for the idp database backend | 26 | * Plugin API for the idp database backend |
27 | * @{ | 27 | * @{ |
28 | */ | 28 | */ |
29 | #ifndef GNUNET_IDENTITY_PROVIDER_PLUGIN_H | 29 | #ifndef GNUNET_RECLAIM_PLUGIN_H |
30 | #define GNUNET_IDENTITY_PROVIDER_PLUGIN_H | 30 | #define GNUNET_RECLAIM_PLUGIN_H |
31 | 31 | ||
32 | #include "gnunet_util_lib.h" | 32 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_identity_provider_service.h" | 33 | #include "gnunet_reclaim_service.h" |
34 | 34 | ||
35 | #ifdef __cplusplus | 35 | #ifdef __cplusplus |
36 | extern "C" | 36 | extern "C" |
@@ -47,15 +47,15 @@ extern "C" | |||
47 | * @param cls closure | 47 | * @param cls closure |
48 | * @param ticket the ticket | 48 | * @param ticket the ticket |
49 | */ | 49 | */ |
50 | typedef void (*GNUNET_IDENTITY_PROVIDER_TicketIterator) (void *cls, | 50 | typedef void (*GNUNET_RECLAIM_TicketIterator) (void *cls, |
51 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 51 | const struct GNUNET_RECLAIM_Ticket *ticket, |
52 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs); | 52 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
53 | 53 | ||
54 | 54 | ||
55 | /** | 55 | /** |
56 | * @brief struct returned by the initialization function of the plugin | 56 | * @brief struct returned by the initialization function of the plugin |
57 | */ | 57 | */ |
58 | struct GNUNET_IDENTITY_PROVIDER_PluginFunctions | 58 | struct GNUNET_RECLAIM_PluginFunctions |
59 | { | 59 | { |
60 | 60 | ||
61 | /** | 61 | /** |
@@ -71,8 +71,8 @@ struct GNUNET_IDENTITY_PROVIDER_PluginFunctions | |||
71 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 71 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
72 | */ | 72 | */ |
73 | int (*store_ticket) (void *cls, | 73 | int (*store_ticket) (void *cls, |
74 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 74 | const struct GNUNET_RECLAIM_Ticket *ticket, |
75 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs); | 75 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Delete a ticket from the database. | 78 | * Delete a ticket from the database. |
@@ -82,7 +82,7 @@ struct GNUNET_IDENTITY_PROVIDER_PluginFunctions | |||
82 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 82 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
83 | */ | 83 | */ |
84 | int (*delete_ticket) (void *cls, | 84 | int (*delete_ticket) (void *cls, |
85 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket); | 85 | const struct GNUNET_RECLAIM_Ticket *ticket); |
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
@@ -101,11 +101,11 @@ struct GNUNET_IDENTITY_PROVIDER_PluginFunctions | |||
101 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 101 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
102 | int audience, | 102 | int audience, |
103 | uint64_t offset, | 103 | uint64_t offset, |
104 | GNUNET_IDENTITY_PROVIDER_TicketIterator iter, void *iter_cls); | 104 | GNUNET_RECLAIM_TicketIterator iter, void *iter_cls); |
105 | 105 | ||
106 | int (*get_ticket_attributes) (void* cls, | 106 | int (*get_ticket_attributes) (void* cls, |
107 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 107 | const struct GNUNET_RECLAIM_Ticket *ticket, |
108 | GNUNET_IDENTITY_PROVIDER_TicketIterator iter, | 108 | GNUNET_RECLAIM_TicketIterator iter, |
109 | void *iter_cls); | 109 | void *iter_cls); |
110 | }; | 110 | }; |
111 | 111 | ||
diff --git a/src/include/gnunet_identity_provider_service.h b/src/include/gnunet_reclaim_service.h index 0c72556e8..7e668cd62 100644 --- a/src/include/gnunet_identity_provider_service.h +++ b/src/include/gnunet_reclaim_service.h | |||
@@ -22,11 +22,11 @@ | |||
22 | * @file | 22 | * @file |
23 | * Identity provider service; implements identity provider for GNUnet | 23 | * Identity provider service; implements identity provider for GNUnet |
24 | * | 24 | * |
25 | * @defgroup identity-provider Identity Provider service | 25 | * @defgroup reclaim Identity Provider service |
26 | * @{ | 26 | * @{ |
27 | */ | 27 | */ |
28 | #ifndef GNUNET_IDENTITY_PROVIDER_SERVICE_H | 28 | #ifndef GNUNET_RECLAIM_SERVICE_H |
29 | #define GNUNET_IDENTITY_PROVIDER_SERVICE_H | 29 | #define GNUNET_RECLAIM_SERVICE_H |
30 | 30 | ||
31 | #ifdef __cplusplus | 31 | #ifdef __cplusplus |
32 | extern "C" | 32 | extern "C" |
@@ -37,27 +37,27 @@ extern "C" | |||
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #include "gnunet_util_lib.h" | 39 | #include "gnunet_util_lib.h" |
40 | #include "gnunet_identity_attribute_lib.h" | 40 | #include "gnunet_reclaim_attribute_lib.h" |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Version number of GNUnet Identity Provider API. | 43 | * Version number of GNUnet Identity Provider API. |
44 | */ | 44 | */ |
45 | #define GNUNET_IDENTITY_PROVIDER_VERSION 0x00000000 | 45 | #define GNUNET_RECLAIM_VERSION 0x00000000 |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Handle to access the identity service. | 48 | * Handle to access the identity service. |
49 | */ | 49 | */ |
50 | struct GNUNET_IDENTITY_PROVIDER_Handle; | 50 | struct GNUNET_RECLAIM_Handle; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Handle for a token. | 53 | * Handle for a token. |
54 | */ | 54 | */ |
55 | struct GNUNET_IDENTITY_PROVIDER_Token; | 55 | struct GNUNET_RECLAIM_Token; |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * The ticket | 58 | * The ticket |
59 | */ | 59 | */ |
60 | struct GNUNET_IDENTITY_PROVIDER_Ticket | 60 | struct GNUNET_RECLAIM_Ticket |
61 | { | 61 | { |
62 | /** | 62 | /** |
63 | * The ticket issuer | 63 | * The ticket issuer |
@@ -78,7 +78,7 @@ struct GNUNET_IDENTITY_PROVIDER_Ticket | |||
78 | /** | 78 | /** |
79 | * Handle for an operation with the identity provider service. | 79 | * Handle for an operation with the identity provider service. |
80 | */ | 80 | */ |
81 | struct GNUNET_IDENTITY_PROVIDER_Operation; | 81 | struct GNUNET_RECLAIM_Operation; |
82 | 82 | ||
83 | 83 | ||
84 | /** | 84 | /** |
@@ -87,8 +87,8 @@ struct GNUNET_IDENTITY_PROVIDER_Operation; | |||
87 | * @param cfg Configuration to contact the identity provider service. | 87 | * @param cfg Configuration to contact the identity provider service. |
88 | * @return handle to communicate with identity provider service | 88 | * @return handle to communicate with identity provider service |
89 | */ | 89 | */ |
90 | struct GNUNET_IDENTITY_PROVIDER_Handle * | 90 | struct GNUNET_RECLAIM_Handle * |
91 | GNUNET_IDENTITY_PROVIDER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); | 91 | GNUNET_RECLAIM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); |
92 | 92 | ||
93 | /** | 93 | /** |
94 | * Continuation called to notify client about result of the | 94 | * Continuation called to notify client about result of the |
@@ -101,7 +101,7 @@ GNUNET_IDENTITY_PROVIDER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
101 | * @param emsg NULL on success, otherwise an error message | 101 | * @param emsg NULL on success, otherwise an error message |
102 | */ | 102 | */ |
103 | typedef void | 103 | typedef void |
104 | (*GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus) (void *cls, | 104 | (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls, |
105 | int32_t success, | 105 | int32_t success, |
106 | const char *emsg); | 106 | const char *emsg); |
107 | 107 | ||
@@ -118,12 +118,12 @@ typedef void | |||
118 | * @param cont_cls closure for @a cont | 118 | * @param cont_cls closure for @a cont |
119 | * @return handle to abort the request | 119 | * @return handle to abort the request |
120 | */ | 120 | */ |
121 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 121 | struct GNUNET_RECLAIM_Operation * |
122 | GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 122 | GNUNET_RECLAIM_attribute_store (struct GNUNET_RECLAIM_Handle *h, |
123 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 123 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, |
124 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr, | 124 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
125 | const struct GNUNET_TIME_Relative *exp_interval, | 125 | const struct GNUNET_TIME_Relative *exp_interval, |
126 | GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cont, | 126 | GNUNET_RECLAIM_ContinuationWithStatus cont, |
127 | void *cont_cls); | 127 | void *cont_cls); |
128 | 128 | ||
129 | 129 | ||
@@ -135,19 +135,19 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
135 | * @param attr the attribute | 135 | * @param attr the attribute |
136 | */ | 136 | */ |
137 | typedef void | 137 | typedef void |
138 | (*GNUNET_IDENTITY_PROVIDER_AttributeResult) (void *cls, | 138 | (*GNUNET_RECLAIM_AttributeResult) (void *cls, |
139 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 139 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
140 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr); | 140 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr); |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | /** | 144 | /** |
145 | * List all attributes for a local identity. | 145 | * List all attributes for a local identity. |
146 | * This MUST lock the `struct GNUNET_IDENTITY_PROVIDER_Handle` | 146 | * This MUST lock the `struct GNUNET_RECLAIM_Handle` |
147 | * for any other calls than #GNUNET_IDENTITY_PROVIDER_get_attributes_next() and | 147 | * for any other calls than #GNUNET_RECLAIM_get_attributes_next() and |
148 | * #GNUNET_IDENTITY_PROVIDER_get_attributes_stop. @a proc will be called once | 148 | * #GNUNET_RECLAIM_get_attributes_stop. @a proc will be called once |
149 | * immediately, and then again after | 149 | * immediately, and then again after |
150 | * #GNUNET_IDENTITY_PROVIDER_get_attributes_next() is invoked. | 150 | * #GNUNET_RECLAIM_get_attributes_next() is invoked. |
151 | * | 151 | * |
152 | * On error (disconnect), @a error_cb will be invoked. | 152 | * On error (disconnect), @a error_cb will be invoked. |
153 | * On normal completion, @a finish_cb proc will be | 153 | * On normal completion, @a finish_cb proc will be |
@@ -166,36 +166,36 @@ typedef void | |||
166 | * @param finish_cb_cls closure for @a finish_cb | 166 | * @param finish_cb_cls closure for @a finish_cb |
167 | * @return an iterator handle to use for iteration | 167 | * @return an iterator handle to use for iteration |
168 | */ | 168 | */ |
169 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator * | 169 | struct GNUNET_RECLAIM_AttributeIterator * |
170 | GNUNET_IDENTITY_PROVIDER_get_attributes_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 170 | GNUNET_RECLAIM_get_attributes_start (struct GNUNET_RECLAIM_Handle *h, |
171 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 171 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
172 | GNUNET_SCHEDULER_TaskCallback error_cb, | 172 | GNUNET_SCHEDULER_TaskCallback error_cb, |
173 | void *error_cb_cls, | 173 | void *error_cb_cls, |
174 | GNUNET_IDENTITY_PROVIDER_AttributeResult proc, | 174 | GNUNET_RECLAIM_AttributeResult proc, |
175 | void *proc_cls, | 175 | void *proc_cls, |
176 | GNUNET_SCHEDULER_TaskCallback finish_cb, | 176 | GNUNET_SCHEDULER_TaskCallback finish_cb, |
177 | void *finish_cb_cls); | 177 | void *finish_cb_cls); |
178 | 178 | ||
179 | 179 | ||
180 | /** | 180 | /** |
181 | * Calls the record processor specified in #GNUNET_IDENTITY_PROVIDER_get_attributes_start | 181 | * Calls the record processor specified in #GNUNET_RECLAIM_get_attributes_start |
182 | * for the next record. | 182 | * for the next record. |
183 | * | 183 | * |
184 | * @param it the iterator | 184 | * @param it the iterator |
185 | */ | 185 | */ |
186 | void | 186 | void |
187 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it); | 187 | GNUNET_RECLAIM_get_attributes_next (struct GNUNET_RECLAIM_AttributeIterator *it); |
188 | 188 | ||
189 | 189 | ||
190 | /** | 190 | /** |
191 | * Stops iteration and releases the idp handle for further calls. Must | 191 | * Stops iteration and releases the idp handle for further calls. Must |
192 | * be called on any iteration that has not yet completed prior to calling | 192 | * be called on any iteration that has not yet completed prior to calling |
193 | * #GNUNET_IDENTITY_PROVIDER_disconnect. | 193 | * #GNUNET_RECLAIM_disconnect. |
194 | * | 194 | * |
195 | * @param it the iterator | 195 | * @param it the iterator |
196 | */ | 196 | */ |
197 | void | 197 | void |
198 | GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it); | 198 | GNUNET_RECLAIM_get_attributes_stop (struct GNUNET_RECLAIM_AttributeIterator *it); |
199 | 199 | ||
200 | 200 | ||
201 | /** | 201 | /** |
@@ -207,12 +207,12 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At | |||
207 | * @param ticket the ticket | 207 | * @param ticket the ticket |
208 | */ | 208 | */ |
209 | typedef void | 209 | typedef void |
210 | (*GNUNET_IDENTITY_PROVIDER_TicketCallback)(void *cls, | 210 | (*GNUNET_RECLAIM_TicketCallback)(void *cls, |
211 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket); | 211 | const struct GNUNET_RECLAIM_Ticket *ticket); |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * Issues a ticket to another identity. The identity may use | 214 | * Issues a ticket to another identity. The identity may use |
215 | * GNUNET_IDENTITY_PROVIDER_ticket_consume to consume the ticket | 215 | * GNUNET_RECLAIM_ticket_consume to consume the ticket |
216 | * and retrieve the attributes specified in the AttributeList. | 216 | * and retrieve the attributes specified in the AttributeList. |
217 | * | 217 | * |
218 | * @param h the identity provider to use | 218 | * @param h the identity provider to use |
@@ -223,12 +223,12 @@ typedef void | |||
223 | * @param cb_cls the callback closure | 223 | * @param cb_cls the callback closure |
224 | * @return handle to abort the operation | 224 | * @return handle to abort the operation |
225 | */ | 225 | */ |
226 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 226 | struct GNUNET_RECLAIM_Operation * |
227 | GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 227 | GNUNET_RECLAIM_ticket_issue (struct GNUNET_RECLAIM_Handle *h, |
228 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, | 228 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, |
229 | const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, | 229 | const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, |
230 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 230 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
231 | GNUNET_IDENTITY_PROVIDER_TicketCallback cb, | 231 | GNUNET_RECLAIM_TicketCallback cb, |
232 | void *cb_cls); | 232 | void *cb_cls); |
233 | 233 | ||
234 | /** | 234 | /** |
@@ -242,11 +242,11 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h | |||
242 | * @param cb_cls the callback closure | 242 | * @param cb_cls the callback closure |
243 | * @return handle to abort the operation | 243 | * @return handle to abort the operation |
244 | */ | 244 | */ |
245 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 245 | struct GNUNET_RECLAIM_Operation * |
246 | GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 246 | GNUNET_RECLAIM_ticket_revoke (struct GNUNET_RECLAIM_Handle *h, |
247 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 247 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
248 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 248 | const struct GNUNET_RECLAIM_Ticket *ticket, |
249 | GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb, | 249 | GNUNET_RECLAIM_ContinuationWithStatus cb, |
250 | void *cb_cls); | 250 | void *cb_cls); |
251 | 251 | ||
252 | 252 | ||
@@ -262,11 +262,11 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle * | |||
262 | * @param cb_cls the callback closure | 262 | * @param cb_cls the callback closure |
263 | * @return handle to abort the operation | 263 | * @return handle to abort the operation |
264 | */ | 264 | */ |
265 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 265 | struct GNUNET_RECLAIM_Operation * |
266 | GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 266 | GNUNET_RECLAIM_ticket_consume (struct GNUNET_RECLAIM_Handle *h, |
267 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 267 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
268 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 268 | const struct GNUNET_RECLAIM_Ticket *ticket, |
269 | GNUNET_IDENTITY_PROVIDER_AttributeResult cb, | 269 | GNUNET_RECLAIM_AttributeResult cb, |
270 | void *cb_cls); | 270 | void *cb_cls); |
271 | 271 | ||
272 | /** | 272 | /** |
@@ -286,12 +286,12 @@ GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
286 | * @param finish_cb_cls closure for @a finish_cb | 286 | * @param finish_cb_cls closure for @a finish_cb |
287 | * @return an iterator handle to use for iteration | 287 | * @return an iterator handle to use for iteration |
288 | */ | 288 | */ |
289 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator * | 289 | struct GNUNET_RECLAIM_TicketIterator * |
290 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 290 | GNUNET_RECLAIM_ticket_iteration_start (struct GNUNET_RECLAIM_Handle *h, |
291 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 291 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
292 | GNUNET_SCHEDULER_TaskCallback error_cb, | 292 | GNUNET_SCHEDULER_TaskCallback error_cb, |
293 | void *error_cb_cls, | 293 | void *error_cb_cls, |
294 | GNUNET_IDENTITY_PROVIDER_TicketCallback proc, | 294 | GNUNET_RECLAIM_TicketCallback proc, |
295 | void *proc_cls, | 295 | void *proc_cls, |
296 | GNUNET_SCHEDULER_TaskCallback finish_cb, | 296 | GNUNET_SCHEDULER_TaskCallback finish_cb, |
297 | void *finish_cb_cls); | 297 | void *finish_cb_cls); |
@@ -313,34 +313,34 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER | |||
313 | * @param finish_cb_cls closure for @a finish_cb | 313 | * @param finish_cb_cls closure for @a finish_cb |
314 | * @return an iterator handle to use for iteration | 314 | * @return an iterator handle to use for iteration |
315 | */ | 315 | */ |
316 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator * | 316 | struct GNUNET_RECLAIM_TicketIterator * |
317 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_start_rp (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 317 | GNUNET_RECLAIM_ticket_iteration_start_rp (struct GNUNET_RECLAIM_Handle *h, |
318 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 318 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
319 | GNUNET_SCHEDULER_TaskCallback error_cb, | 319 | GNUNET_SCHEDULER_TaskCallback error_cb, |
320 | void *error_cb_cls, | 320 | void *error_cb_cls, |
321 | GNUNET_IDENTITY_PROVIDER_TicketCallback proc, | 321 | GNUNET_RECLAIM_TicketCallback proc, |
322 | void *proc_cls, | 322 | void *proc_cls, |
323 | GNUNET_SCHEDULER_TaskCallback finish_cb, | 323 | GNUNET_SCHEDULER_TaskCallback finish_cb, |
324 | void *finish_cb_cls); | 324 | void *finish_cb_cls); |
325 | 325 | ||
326 | /** | 326 | /** |
327 | * Calls the record processor specified in #GNUNET_IDENTITY_PROVIDER_ticket_iteration_start | 327 | * Calls the record processor specified in #GNUNET_RECLAIM_ticket_iteration_start |
328 | * for the next record. | 328 | * for the next record. |
329 | * | 329 | * |
330 | * @param it the iterator | 330 | * @param it the iterator |
331 | */ | 331 | */ |
332 | void | 332 | void |
333 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_next (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it); | 333 | GNUNET_RECLAIM_ticket_iteration_next (struct GNUNET_RECLAIM_TicketIterator *it); |
334 | 334 | ||
335 | /** | 335 | /** |
336 | * Stops iteration and releases the idp handle for further calls. Must | 336 | * Stops iteration and releases the idp handle for further calls. Must |
337 | * be called on any iteration that has not yet completed prior to calling | 337 | * be called on any iteration that has not yet completed prior to calling |
338 | * #GNUNET_IDENTITY_PROVIDER_disconnect. | 338 | * #GNUNET_RECLAIM_disconnect. |
339 | * | 339 | * |
340 | * @param it the iterator | 340 | * @param it the iterator |
341 | */ | 341 | */ |
342 | void | 342 | void |
343 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it); | 343 | GNUNET_RECLAIM_ticket_iteration_stop (struct GNUNET_RECLAIM_TicketIterator *it); |
344 | 344 | ||
345 | /** | 345 | /** |
346 | * Disconnect from identity provider service. | 346 | * Disconnect from identity provider service. |
@@ -348,7 +348,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_ | |||
348 | * @param h identity provider service to disconnect | 348 | * @param h identity provider service to disconnect |
349 | */ | 349 | */ |
350 | void | 350 | void |
351 | GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h); | 351 | GNUNET_RECLAIM_disconnect (struct GNUNET_RECLAIM_Handle *h); |
352 | 352 | ||
353 | 353 | ||
354 | /** | 354 | /** |
@@ -360,7 +360,7 @@ GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h); | |||
360 | * @param op operation to cancel | 360 | * @param op operation to cancel |
361 | */ | 361 | */ |
362 | void | 362 | void |
363 | GNUNET_IDENTITY_PROVIDER_cancel (struct GNUNET_IDENTITY_PROVIDER_Operation *op); | 363 | GNUNET_RECLAIM_cancel (struct GNUNET_RECLAIM_Operation *op); |
364 | 364 | ||
365 | #if 0 /* keep Emacsens' auto-indent happy */ | 365 | #if 0 /* keep Emacsens' auto-indent happy */ |
366 | { | 366 | { |
@@ -370,9 +370,9 @@ GNUNET_IDENTITY_PROVIDER_cancel (struct GNUNET_IDENTITY_PROVIDER_Operation *op); | |||
370 | #endif | 370 | #endif |
371 | 371 | ||
372 | 372 | ||
373 | /* ifndef GNUNET_IDENTITY_PROVIDER_SERVICE_H */ | 373 | /* ifndef GNUNET_RECLAIM_SERVICE_H */ |
374 | #endif | 374 | #endif |
375 | 375 | ||
376 | /** @} */ /* end of group identity */ | 376 | /** @} */ /* end of group identity */ |
377 | 377 | ||
378 | /* end of gnunet_identity_provider_service.h */ | 378 | /* end of gnunet_reclaim_service.h */ |
diff --git a/src/identity-attribute/Makefile.am b/src/reclaim-attribute/Makefile.am index 2c73a443e..7db2925b1 100644 --- a/src/identity-attribute/Makefile.am +++ b/src/reclaim-attribute/Makefile.am | |||
@@ -17,28 +17,28 @@ if USE_COVERAGE | |||
17 | endif | 17 | endif |
18 | 18 | ||
19 | lib_LTLIBRARIES = \ | 19 | lib_LTLIBRARIES = \ |
20 | libgnunetidentityattribute.la | 20 | libgnunetreclaimattribute.la |
21 | 21 | ||
22 | libgnunetidentityattribute_la_SOURCES = \ | 22 | libgnunetreclaimattribute_la_SOURCES = \ |
23 | identity_attribute.c | 23 | reclaim_attribute.c |
24 | libgnunetidentityattribute_la_LIBADD = \ | 24 | libgnunetreclaimattribute_la_LIBADD = \ |
25 | $(top_builddir)/src/util/libgnunetutil.la \ | 25 | $(top_builddir)/src/util/libgnunetutil.la \ |
26 | $(GN_LIBINTL) | 26 | $(GN_LIBINTL) |
27 | libgnunetidentityattribute_la_LDFLAGS = \ | 27 | libgnunetreclaimattribute_la_LDFLAGS = \ |
28 | $(GN_LIB_LDFLAGS) $(WINFLAGS) \ | 28 | $(GN_LIB_LDFLAGS) $(WINFLAGS) \ |
29 | -version-info 0:0:0 | 29 | -version-info 0:0:0 |
30 | 30 | ||
31 | 31 | ||
32 | plugin_LTLIBRARIES = \ | 32 | plugin_LTLIBRARIES = \ |
33 | libgnunet_plugin_identity_attribute_gnuid.la | 33 | libgnunet_plugin_reclaim_attribute_gnuid.la |
34 | 34 | ||
35 | 35 | ||
36 | libgnunet_plugin_identity_attribute_gnuid_la_SOURCES = \ | 36 | libgnunet_plugin_reclaim_attribute_gnuid_la_SOURCES = \ |
37 | plugin_identity_attribute_gnuid.c | 37 | plugin_reclaim_attribute_gnuid.c |
38 | libgnunet_plugin_identity_attribute_gnuid_la_LIBADD = \ | 38 | libgnunet_plugin_reclaim_attribute_gnuid_la_LIBADD = \ |
39 | $(top_builddir)/src/util/libgnunetutil.la \ | 39 | $(top_builddir)/src/util/libgnunetutil.la \ |
40 | $(LTLIBINTL) | 40 | $(LTLIBINTL) |
41 | libgnunet_plugin_identity_attribute_gnuid_la_LDFLAGS = \ | 41 | libgnunet_plugin_reclaim_attribute_gnuid_la_LDFLAGS = \ |
42 | $(GN_PLUGIN_LDFLAGS) | 42 | $(GN_PLUGIN_LDFLAGS) |
43 | 43 | ||
44 | 44 | ||
diff --git a/src/identity-attribute/plugin_identity_attribute_gnuid.c b/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c index c09b167f5..48afc0732 100644 --- a/src/identity-attribute/plugin_identity_attribute_gnuid.c +++ b/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @file identity-attribute/plugin_identity_attribute_gnuid.c | 20 | * @file reclaim-attribute/plugin_reclaim_attribute_gnuid.c |
21 | * @brief identity attribute plugin to provide the API for fundamental | 21 | * @brief identity attribute plugin to provide the API for fundamental |
22 | * attribute types. | 22 | * attribute types. |
23 | * | 23 | * |
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_identity_attribute_plugin.h" | 28 | #include "gnunet_reclaim_attribute_plugin.h" |
29 | #include <inttypes.h> | 29 | #include <inttypes.h> |
30 | 30 | ||
31 | 31 | ||
@@ -47,7 +47,7 @@ gnuid_value_to_string (void *cls, | |||
47 | 47 | ||
48 | switch (type) | 48 | switch (type) |
49 | { | 49 | { |
50 | case GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING: | 50 | case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING: |
51 | return GNUNET_strndup (data, data_size); | 51 | return GNUNET_strndup (data, data_size); |
52 | default: | 52 | default: |
53 | return NULL; | 53 | return NULL; |
@@ -78,7 +78,7 @@ gnuid_string_to_value (void *cls, | |||
78 | switch (type) | 78 | switch (type) |
79 | { | 79 | { |
80 | 80 | ||
81 | case GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING: | 81 | case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING: |
82 | *data = GNUNET_strdup (s); | 82 | *data = GNUNET_strdup (s); |
83 | *data_size = strlen (s); | 83 | *data_size = strlen (s); |
84 | return GNUNET_OK; | 84 | return GNUNET_OK; |
@@ -96,7 +96,7 @@ static struct { | |||
96 | const char *name; | 96 | const char *name; |
97 | uint32_t number; | 97 | uint32_t number; |
98 | } gnuid_name_map[] = { | 98 | } gnuid_name_map[] = { |
99 | { "STRING", GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING }, | 99 | { "STRING", GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING }, |
100 | { NULL, UINT32_MAX } | 100 | { NULL, UINT32_MAX } |
101 | }; | 101 | }; |
102 | 102 | ||
@@ -151,11 +151,11 @@ gnuid_number_to_typename (void *cls, | |||
151 | * @return the exported block API | 151 | * @return the exported block API |
152 | */ | 152 | */ |
153 | void * | 153 | void * |
154 | libgnunet_plugin_identity_attribute_gnuid_init (void *cls) | 154 | libgnunet_plugin_reclaim_attribute_gnuid_init (void *cls) |
155 | { | 155 | { |
156 | struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions *api; | 156 | struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions *api; |
157 | 157 | ||
158 | api = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions); | 158 | api = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions); |
159 | api->value_to_string = &gnuid_value_to_string; | 159 | api->value_to_string = &gnuid_value_to_string; |
160 | api->string_to_value = &gnuid_string_to_value; | 160 | api->string_to_value = &gnuid_string_to_value; |
161 | api->typename_to_number = &gnuid_typename_to_number; | 161 | api->typename_to_number = &gnuid_typename_to_number; |
@@ -171,12 +171,12 @@ libgnunet_plugin_identity_attribute_gnuid_init (void *cls) | |||
171 | * @return NULL | 171 | * @return NULL |
172 | */ | 172 | */ |
173 | void * | 173 | void * |
174 | libgnunet_plugin_identity_attribute_gnuid_done (void *cls) | 174 | libgnunet_plugin_reclaim_attribute_gnuid_done (void *cls) |
175 | { | 175 | { |
176 | struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions *api = cls; | 176 | struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions *api = cls; |
177 | 177 | ||
178 | GNUNET_free (api); | 178 | GNUNET_free (api); |
179 | return NULL; | 179 | return NULL; |
180 | } | 180 | } |
181 | 181 | ||
182 | /* end of plugin_identity_attribute_type_gnuid.c */ | 182 | /* end of plugin_reclaim_attribute_type_gnuid.c */ |
diff --git a/src/identity-attribute/identity_attribute.c b/src/reclaim-attribute/reclaim_attribute.c index 7d47c46a7..74d668ea8 100644 --- a/src/identity-attribute/identity_attribute.c +++ b/src/reclaim-attribute/reclaim_attribute.c | |||
@@ -17,14 +17,14 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @file identity-attribute/identity_attribute.c | 20 | * @file reclaim-attribute/reclaim_attribute.c |
21 | * @brief helper library to manage identity attributes | 21 | * @brief helper library to manage identity attributes |
22 | * @author Martin Schanzenbach | 22 | * @author Martin Schanzenbach |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_util_lib.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "identity_attribute.h" | 26 | #include "reclaim_attribute.h" |
27 | #include "gnunet_identity_attribute_plugin.h" | 27 | #include "gnunet_reclaim_attribute_plugin.h" |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * Handle for a plugin | 30 | * Handle for a plugin |
@@ -39,7 +39,7 @@ struct Plugin | |||
39 | /** | 39 | /** |
40 | * Plugin API | 40 | * Plugin API |
41 | */ | 41 | */ |
42 | struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions *api; | 42 | struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions *api; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /** | 45 | /** |
@@ -65,7 +65,7 @@ add_plugin (void* cls, | |||
65 | const char *library_name, | 65 | const char *library_name, |
66 | void *lib_ret) | 66 | void *lib_ret) |
67 | { | 67 | { |
68 | struct GNUNET_IDENTITY_ATTRIBUTE_PluginFunctions *api = lib_ret; | 68 | struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions *api = lib_ret; |
69 | struct Plugin *plugin; | 69 | struct Plugin *plugin; |
70 | 70 | ||
71 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 71 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -86,7 +86,7 @@ init() | |||
86 | if (GNUNET_YES == initialized) | 86 | if (GNUNET_YES == initialized) |
87 | return; | 87 | return; |
88 | initialized = GNUNET_YES; | 88 | initialized = GNUNET_YES; |
89 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_identity_attribute_", NULL, | 89 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_reclaim_attribute_", NULL, |
90 | &add_plugin, NULL); | 90 | &add_plugin, NULL); |
91 | } | 91 | } |
92 | 92 | ||
@@ -97,7 +97,7 @@ init() | |||
97 | * @return corresponding number, UINT32_MAX on error | 97 | * @return corresponding number, UINT32_MAX on error |
98 | */ | 98 | */ |
99 | uint32_t | 99 | uint32_t |
100 | GNUNET_IDENTITY_ATTRIBUTE_typename_to_number (const char *typename) | 100 | GNUNET_RECLAIM_ATTRIBUTE_typename_to_number (const char *typename) |
101 | { | 101 | { |
102 | unsigned int i; | 102 | unsigned int i; |
103 | struct Plugin *plugin; | 103 | struct Plugin *plugin; |
@@ -121,7 +121,7 @@ GNUNET_IDENTITY_ATTRIBUTE_typename_to_number (const char *typename) | |||
121 | * @return corresponding typestring, NULL on error | 121 | * @return corresponding typestring, NULL on error |
122 | */ | 122 | */ |
123 | const char* | 123 | const char* |
124 | GNUNET_IDENTITY_ATTRIBUTE_number_to_typename (uint32_t type) | 124 | GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (uint32_t type) |
125 | { | 125 | { |
126 | unsigned int i; | 126 | unsigned int i; |
127 | struct Plugin *plugin; | 127 | struct Plugin *plugin; |
@@ -149,7 +149,7 @@ GNUNET_IDENTITY_ATTRIBUTE_number_to_typename (uint32_t type) | |||
149 | * @return #GNUNET_OK on success | 149 | * @return #GNUNET_OK on success |
150 | */ | 150 | */ |
151 | int | 151 | int |
152 | GNUNET_IDENTITY_ATTRIBUTE_string_to_value (uint32_t type, | 152 | GNUNET_RECLAIM_ATTRIBUTE_string_to_value (uint32_t type, |
153 | const char *s, | 153 | const char *s, |
154 | void **data, | 154 | void **data, |
155 | size_t *data_size) | 155 | size_t *data_size) |
@@ -180,7 +180,7 @@ GNUNET_IDENTITY_ATTRIBUTE_string_to_value (uint32_t type, | |||
180 | * @return NULL on error, otherwise human-readable representation of the claim | 180 | * @return NULL on error, otherwise human-readable representation of the claim |
181 | */ | 181 | */ |
182 | char * | 182 | char * |
183 | GNUNET_IDENTITY_ATTRIBUTE_value_to_string (uint32_t type, | 183 | GNUNET_RECLAIM_ATTRIBUTE_value_to_string (uint32_t type, |
184 | const void* data, | 184 | const void* data, |
185 | size_t data_size) | 185 | size_t data_size) |
186 | { | 186 | { |
@@ -210,16 +210,16 @@ GNUNET_IDENTITY_ATTRIBUTE_value_to_string (uint32_t type, | |||
210 | * @param data_size the attribute value size | 210 | * @param data_size the attribute value size |
211 | * @return the new attribute | 211 | * @return the new attribute |
212 | */ | 212 | */ |
213 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim * | 213 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * |
214 | GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, | 214 | GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char* attr_name, |
215 | uint32_t type, | 215 | uint32_t type, |
216 | const void* data, | 216 | const void* data, |
217 | size_t data_size) | 217 | size_t data_size) |
218 | { | 218 | { |
219 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr; | 219 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr; |
220 | char *write_ptr; | 220 | char *write_ptr; |
221 | 221 | ||
222 | attr = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_ATTRIBUTE_Claim) + | 222 | attr = GNUNET_malloc (sizeof (struct GNUNET_RECLAIM_ATTRIBUTE_Claim) + |
223 | strlen (attr_name) + 1 + | 223 | strlen (attr_name) + 1 + |
224 | data_size); | 224 | data_size); |
225 | attr->type = type; | 225 | attr->type = type; |
@@ -249,15 +249,15 @@ GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, | |||
249 | * @return | 249 | * @return |
250 | */ | 250 | */ |
251 | void | 251 | void |
252 | GNUNET_IDENTITY_ATTRIBUTE_list_add (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *claim_list, | 252 | GNUNET_RECLAIM_ATTRIBUTE_list_add (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *claim_list, |
253 | const char* attr_name, | 253 | const char* attr_name, |
254 | uint32_t type, | 254 | uint32_t type, |
255 | const void* data, | 255 | const void* data, |
256 | size_t data_size) | 256 | size_t data_size) |
257 | { | 257 | { |
258 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 258 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
259 | le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | 259 | le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
260 | le->claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (attr_name, | 260 | le->claim = GNUNET_RECLAIM_ATTRIBUTE_claim_new (attr_name, |
261 | type, | 261 | type, |
262 | data, | 262 | data, |
263 | data_size); | 263 | data_size); |
@@ -267,20 +267,20 @@ GNUNET_IDENTITY_ATTRIBUTE_list_add (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList * | |||
267 | } | 267 | } |
268 | 268 | ||
269 | size_t | 269 | size_t |
270 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 270 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
271 | { | 271 | { |
272 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 272 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
273 | size_t len = 0; | 273 | size_t len = 0; |
274 | for (le = attrs->list_head; NULL != le; le = le->next) | 274 | for (le = attrs->list_head; NULL != le; le = le->next) |
275 | len += GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (le->claim); | 275 | len += GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (le->claim); |
276 | return len; | 276 | return len; |
277 | } | 277 | } |
278 | 278 | ||
279 | size_t | 279 | size_t |
280 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 280 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
281 | char *result) | 281 | char *result) |
282 | { | 282 | { |
283 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 283 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
284 | size_t len; | 284 | size_t len; |
285 | size_t total_len; | 285 | size_t total_len; |
286 | char* write_ptr; | 286 | char* write_ptr; |
@@ -289,7 +289,7 @@ GNUNET_IDENTITY_ATTRIBUTE_list_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE | |||
289 | total_len = 0; | 289 | total_len = 0; |
290 | for (le = attrs->list_head; NULL != le; le = le->next) | 290 | for (le = attrs->list_head; NULL != le; le = le->next) |
291 | { | 291 | { |
292 | len = GNUNET_IDENTITY_ATTRIBUTE_serialize (le->claim, | 292 | len = GNUNET_RECLAIM_ATTRIBUTE_serialize (le->claim, |
293 | write_ptr); | 293 | write_ptr); |
294 | total_len += len; | 294 | total_len += len; |
295 | write_ptr += len; | 295 | write_ptr += len; |
@@ -297,49 +297,49 @@ GNUNET_IDENTITY_ATTRIBUTE_list_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE | |||
297 | return total_len; | 297 | return total_len; |
298 | } | 298 | } |
299 | 299 | ||
300 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList * | 300 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * |
301 | GNUNET_IDENTITY_ATTRIBUTE_list_deserialize (const char* data, | 301 | GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char* data, |
302 | size_t data_size) | 302 | size_t data_size) |
303 | { | 303 | { |
304 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs; | 304 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
305 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 305 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
306 | size_t attr_len; | 306 | size_t attr_len; |
307 | const char* read_ptr; | 307 | const char* read_ptr; |
308 | 308 | ||
309 | if (data_size < sizeof (struct Attribute)) | 309 | if (data_size < sizeof (struct Attribute)) |
310 | return NULL; | 310 | return NULL; |
311 | 311 | ||
312 | attrs = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 312 | attrs = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
313 | read_ptr = data; | 313 | read_ptr = data; |
314 | while (((data + data_size) - read_ptr) >= sizeof (struct Attribute)) | 314 | while (((data + data_size) - read_ptr) >= sizeof (struct Attribute)) |
315 | { | 315 | { |
316 | 316 | ||
317 | le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | 317 | le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
318 | le->claim = GNUNET_IDENTITY_ATTRIBUTE_deserialize (read_ptr, | 318 | le->claim = GNUNET_RECLAIM_ATTRIBUTE_deserialize (read_ptr, |
319 | data_size - (read_ptr - data)); | 319 | data_size - (read_ptr - data)); |
320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
321 | "Deserialized attribute %s\n", le->claim->name); | 321 | "Deserialized attribute %s\n", le->claim->name); |
322 | GNUNET_CONTAINER_DLL_insert (attrs->list_head, | 322 | GNUNET_CONTAINER_DLL_insert (attrs->list_head, |
323 | attrs->list_tail, | 323 | attrs->list_tail, |
324 | le); | 324 | le); |
325 | attr_len = GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (le->claim); | 325 | attr_len = GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (le->claim); |
326 | read_ptr += attr_len; | 326 | read_ptr += attr_len; |
327 | } | 327 | } |
328 | return attrs; | 328 | return attrs; |
329 | } | 329 | } |
330 | 330 | ||
331 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList* | 331 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList* |
332 | GNUNET_IDENTITY_ATTRIBUTE_list_dup (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 332 | GNUNET_RECLAIM_ATTRIBUTE_list_dup (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
333 | { | 333 | { |
334 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 334 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
335 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *result_le; | 335 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *result_le; |
336 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *result; | 336 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *result; |
337 | 337 | ||
338 | result = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 338 | result = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
339 | for (le = attrs->list_head; NULL != le; le = le->next) | 339 | for (le = attrs->list_head; NULL != le; le = le->next) |
340 | { | 340 | { |
341 | result_le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | 341 | result_le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
342 | result_le->claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (le->claim->name, | 342 | result_le->claim = GNUNET_RECLAIM_ATTRIBUTE_claim_new (le->claim->name, |
343 | le->claim->type, | 343 | le->claim->type, |
344 | le->claim->data, | 344 | le->claim->data, |
345 | le->claim->data_size); | 345 | le->claim->data_size); |
@@ -352,10 +352,10 @@ GNUNET_IDENTITY_ATTRIBUTE_list_dup (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim | |||
352 | 352 | ||
353 | 353 | ||
354 | void | 354 | void |
355 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 355 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
356 | { | 356 | { |
357 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 357 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
358 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *tmp_le; | 358 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *tmp_le; |
359 | 359 | ||
360 | for (le = attrs->list_head; NULL != le;) | 360 | for (le = attrs->list_head; NULL != le;) |
361 | { | 361 | { |
@@ -369,7 +369,7 @@ GNUNET_IDENTITY_ATTRIBUTE_list_destroy (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimLi | |||
369 | } | 369 | } |
370 | 370 | ||
371 | size_t | 371 | size_t |
372 | GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 372 | GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
373 | { | 373 | { |
374 | return sizeof (struct Attribute) | 374 | return sizeof (struct Attribute) |
375 | + strlen (attr->name) | 375 | + strlen (attr->name) |
@@ -377,7 +377,7 @@ GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (const struct GNUNET_IDENTITY_ATTRI | |||
377 | } | 377 | } |
378 | 378 | ||
379 | size_t | 379 | size_t |
380 | GNUNET_IDENTITY_ATTRIBUTE_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr, | 380 | GNUNET_RECLAIM_ATTRIBUTE_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
381 | char *result) | 381 | char *result) |
382 | { | 382 | { |
383 | size_t data_len_ser; | 383 | size_t data_len_ser; |
@@ -403,11 +403,11 @@ GNUNET_IDENTITY_ATTRIBUTE_serialize (const struct GNUNET_IDENTITY_ATTRIBUTE_Clai | |||
403 | return sizeof (struct Attribute) + strlen (attr->name) + attr->data_size; | 403 | return sizeof (struct Attribute) + strlen (attr->name) + attr->data_size; |
404 | } | 404 | } |
405 | 405 | ||
406 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim * | 406 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * |
407 | GNUNET_IDENTITY_ATTRIBUTE_deserialize (const char* data, | 407 | GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char* data, |
408 | size_t data_size) | 408 | size_t data_size) |
409 | { | 409 | { |
410 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr; | 410 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr; |
411 | struct Attribute *attr_ser; | 411 | struct Attribute *attr_ser; |
412 | size_t data_len; | 412 | size_t data_len; |
413 | size_t name_len; | 413 | size_t name_len; |
@@ -419,7 +419,7 @@ GNUNET_IDENTITY_ATTRIBUTE_deserialize (const char* data, | |||
419 | attr_ser = (struct Attribute*)data; | 419 | attr_ser = (struct Attribute*)data; |
420 | data_len = ntohs (attr_ser->data_size); | 420 | data_len = ntohs (attr_ser->data_size); |
421 | name_len = ntohs (attr_ser->name_len); | 421 | name_len = ntohs (attr_ser->name_len); |
422 | attr = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_ATTRIBUTE_Claim) | 422 | attr = GNUNET_malloc (sizeof (struct GNUNET_RECLAIM_ATTRIBUTE_Claim) |
423 | + data_len + name_len + 1); | 423 | + data_len + name_len + 1); |
424 | attr->type = ntohs (attr_ser->attribute_type); | 424 | attr->type = ntohs (attr_ser->attribute_type); |
425 | attr->version = ntohl (attr_ser->attribute_version); | 425 | attr->version = ntohl (attr_ser->attribute_version); |
@@ -441,4 +441,4 @@ GNUNET_IDENTITY_ATTRIBUTE_deserialize (const char* data, | |||
441 | 441 | ||
442 | } | 442 | } |
443 | 443 | ||
444 | /* end of identity_attribute.c */ | 444 | /* end of reclaim_attribute.c */ |
diff --git a/src/identity-attribute/identity_attribute.h b/src/reclaim-attribute/reclaim_attribute.h index 2346dcde1..746d32980 100644 --- a/src/identity-attribute/identity_attribute.h +++ b/src/reclaim-attribute/reclaim_attribute.h | |||
@@ -17,14 +17,14 @@ | |||
17 | */ | 17 | */ |
18 | /** | 18 | /** |
19 | * @author Martin Schanzenbach | 19 | * @author Martin Schanzenbach |
20 | * @file identity-attribute/identity_attribute.h | 20 | * @file reclaim-attribute/reclaim_attribute.h |
21 | * @brief GNUnet Identity attributes | 21 | * @brief GNUnet reclaim identity attributes |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | #ifndef IDENTITY_ATTRIBUTE_H | 24 | #ifndef RECLAIM_ATTRIBUTE_H |
25 | #define IDENTITY_ATTRIBUTE_H | 25 | #define RECLAIM_ATTRIBUTE_H |
26 | 26 | ||
27 | #include "gnunet_identity_provider_service.h" | 27 | #include "gnunet_reclaim_service.h" |
28 | 28 | ||
29 | struct Attribute | 29 | struct Attribute |
30 | { | 30 | { |
diff --git a/src/identity-provider/.gitignore b/src/reclaim/.gitignore index ef77fccdc..ef77fccdc 100644 --- a/src/identity-provider/.gitignore +++ b/src/reclaim/.gitignore | |||
diff --git a/src/identity-provider/Makefile.am b/src/reclaim/Makefile.am index 2eb699542..c13c68763 100644 --- a/src/identity-provider/Makefile.am +++ b/src/reclaim/Makefile.am | |||
@@ -13,12 +13,12 @@ if USE_COVERAGE | |||
13 | endif | 13 | endif |
14 | 14 | ||
15 | if HAVE_SQLITE | 15 | if HAVE_SQLITE |
16 | SQLITE_PLUGIN = libgnunet_plugin_identity_provider_sqlite.la | 16 | SQLITE_PLUGIN = libgnunet_plugin_reclaim_sqlite.la |
17 | endif | 17 | endif |
18 | 18 | ||
19 | EXTRA_DIST = \ | 19 | EXTRA_DIST = \ |
20 | test_idp_defaults.conf \ | 20 | test_reclaim_defaults.conf \ |
21 | test_idp.conf \ | 21 | test_reclaim.conf \ |
22 | $(check_SCRIPTS) | 22 | $(check_SCRIPTS) |
23 | 23 | ||
24 | pkgcfgdir= $(pkgdatadir)/config.d/ | 24 | pkgcfgdir= $(pkgdatadir)/config.d/ |
@@ -26,46 +26,46 @@ pkgcfgdir= $(pkgdatadir)/config.d/ | |||
26 | libexecdir= $(pkglibdir)/libexec/ | 26 | libexecdir= $(pkglibdir)/libexec/ |
27 | 27 | ||
28 | pkgcfg_DATA = \ | 28 | pkgcfg_DATA = \ |
29 | identity-provider.conf | 29 | reclaim.conf |
30 | 30 | ||
31 | lib_LTLIBRARIES = \ | 31 | lib_LTLIBRARIES = \ |
32 | libgnunetidentityprovider.la | 32 | libgnunetidentityprovider.la |
33 | plugin_LTLIBRARIES = \ | 33 | plugin_LTLIBRARIES = \ |
34 | libgnunet_plugin_rest_identity_provider.la \ | 34 | libgnunet_plugin_rest_reclaim.la \ |
35 | libgnunet_plugin_rest_openid_connect.la \ | 35 | libgnunet_plugin_rest_openid_connect.la \ |
36 | libgnunet_plugin_gnsrecord_identity_provider.la \ | 36 | libgnunet_plugin_gnsrecord_reclaim.la \ |
37 | $(SQLITE_PLUGIN) | 37 | $(SQLITE_PLUGIN) |
38 | 38 | ||
39 | bin_PROGRAMS = \ | 39 | bin_PROGRAMS = \ |
40 | gnunet-idp | 40 | gnunet-reclaim |
41 | 41 | ||
42 | libexec_PROGRAMS = \ | 42 | libexec_PROGRAMS = \ |
43 | gnunet-service-identity-provider | 43 | gnunet-service-reclaim |
44 | 44 | ||
45 | libgnunet_plugin_gnsrecord_identity_provider_la_SOURCES = \ | 45 | libgnunet_plugin_gnsrecord_reclaim_la_SOURCES = \ |
46 | plugin_gnsrecord_identity_provider.c | 46 | plugin_gnsrecord_reclaim.c |
47 | libgnunet_plugin_gnsrecord_identity_provider_la_LIBADD = \ | 47 | libgnunet_plugin_gnsrecord_reclaim_la_LIBADD = \ |
48 | $(top_builddir)/src/util/libgnunetutil.la \ | 48 | $(top_builddir)/src/util/libgnunetutil.la \ |
49 | $(LTLIBINTL) | 49 | $(LTLIBINTL) |
50 | libgnunet_plugin_gnsrecord_identity_provider_la_LDFLAGS = \ | 50 | libgnunet_plugin_gnsrecord_reclaim_la_LDFLAGS = \ |
51 | $(GN_PLUGIN_LDFLAGS) | 51 | $(GN_PLUGIN_LDFLAGS) |
52 | 52 | ||
53 | libgnunet_plugin_identity_provider_sqlite_la_SOURCES = \ | 53 | libgnunet_plugin_reclaim_sqlite_la_SOURCES = \ |
54 | plugin_identity_provider_sqlite.c | 54 | plugin_reclaim_sqlite.c |
55 | libgnunet_plugin_identity_provider_sqlite_la_LIBADD = \ | 55 | libgnunet_plugin_reclaim_sqlite_la_LIBADD = \ |
56 | libgnunetidentityprovider.la \ | 56 | libgnunetidentityprovider.la \ |
57 | $(top_builddir)/src/sq/libgnunetsq.la \ | 57 | $(top_builddir)/src/sq/libgnunetsq.la \ |
58 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 58 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
59 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \ | 59 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \ |
60 | $(LTLIBINTL) | 60 | $(LTLIBINTL) |
61 | libgnunet_plugin_identity_provider_sqlite_la_LDFLAGS = \ | 61 | libgnunet_plugin_reclaim_sqlite_la_LDFLAGS = \ |
62 | $(GN_PLUGIN_LDFLAGS) | 62 | $(GN_PLUGIN_LDFLAGS) |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | gnunet_service_identity_provider_SOURCES = \ | 66 | gnunet_service_reclaim_SOURCES = \ |
67 | gnunet-service-identity-provider.c | 67 | gnunet-service-reclaim.c |
68 | gnunet_service_identity_provider_LDADD = \ | 68 | gnunet_service_reclaim_LDADD = \ |
69 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 69 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ |
70 | $(top_builddir)/src/util/libgnunetutil.la \ | 70 | $(top_builddir)/src/util/libgnunetutil.la \ |
71 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 71 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
@@ -73,14 +73,14 @@ gnunet_service_identity_provider_LDADD = \ | |||
73 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 73 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
74 | $(top_builddir)/src/abe/libgnunetabe.la \ | 74 | $(top_builddir)/src/abe/libgnunetabe.la \ |
75 | $(top_builddir)/src/credential/libgnunetcredential.la \ | 75 | $(top_builddir)/src/credential/libgnunetcredential.la \ |
76 | $(top_builddir)/src/identity-attribute/libgnunetidentityattribute.la \ | 76 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ |
77 | libgnunetidentityprovider.la \ | 77 | libgnunetidentityprovider.la \ |
78 | $(top_builddir)/src/gns/libgnunetgns.la \ | 78 | $(top_builddir)/src/gns/libgnunetgns.la \ |
79 | $(GN_LIBINTL) | 79 | $(GN_LIBINTL) |
80 | 80 | ||
81 | libgnunetidentityprovider_la_SOURCES = \ | 81 | libgnunetidentityprovider_la_SOURCES = \ |
82 | identity_provider_api.c \ | 82 | reclaim_api.c \ |
83 | identity_provider.h | 83 | reclaim.h |
84 | libgnunetidentityprovider_la_LIBADD = \ | 84 | libgnunetidentityprovider_la_LIBADD = \ |
85 | $(top_builddir)/src/util/libgnunetutil.la \ | 85 | $(top_builddir)/src/util/libgnunetutil.la \ |
86 | $(GN_LIBINTL) $(XLIB) | 86 | $(GN_LIBINTL) $(XLIB) |
@@ -88,19 +88,19 @@ libgnunetidentityprovider_la_LDFLAGS = \ | |||
88 | $(GN_LIB_LDFLAGS) $(WINFLAGS) \ | 88 | $(GN_LIB_LDFLAGS) $(WINFLAGS) \ |
89 | -version-info 0:0:0 | 89 | -version-info 0:0:0 |
90 | 90 | ||
91 | libgnunet_plugin_rest_identity_provider_la_SOURCES = \ | 91 | libgnunet_plugin_rest_reclaim_la_SOURCES = \ |
92 | plugin_rest_identity_provider.c \ | 92 | plugin_rest_reclaim.c \ |
93 | jwt.c | 93 | jwt.c |
94 | libgnunet_plugin_rest_identity_provider_la_LIBADD = \ | 94 | libgnunet_plugin_rest_reclaim_la_LIBADD = \ |
95 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 95 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
96 | libgnunetidentityprovider.la \ | 96 | libgnunetidentityprovider.la \ |
97 | $(top_builddir)/src/rest/libgnunetrest.la \ | 97 | $(top_builddir)/src/rest/libgnunetrest.la \ |
98 | $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ | 98 | $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ |
99 | $(top_builddir)/src/identity-attribute/libgnunetidentityattribute.la \ | 99 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ |
100 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 100 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
101 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 101 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ |
102 | $(LTLIBINTL) -ljansson -lmicrohttpd | 102 | $(LTLIBINTL) -ljansson -lmicrohttpd |
103 | libgnunet_plugin_rest_identity_provider_la_LDFLAGS = \ | 103 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ |
104 | $(GN_PLUGIN_LDFLAGS) | 104 | $(GN_PLUGIN_LDFLAGS) |
105 | 105 | ||
106 | libgnunet_plugin_rest_openid_connect_la_SOURCES = \ | 106 | libgnunet_plugin_rest_openid_connect_la_SOURCES = \ |
@@ -111,28 +111,28 @@ libgnunet_plugin_rest_openid_connect_la_LIBADD = \ | |||
111 | libgnunetidentityprovider.la \ | 111 | libgnunetidentityprovider.la \ |
112 | $(top_builddir)/src/rest/libgnunetrest.la \ | 112 | $(top_builddir)/src/rest/libgnunetrest.la \ |
113 | $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ | 113 | $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ |
114 | $(top_builddir)/src/identity-attribute/libgnunetidentityattribute.la \ | 114 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ |
115 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 115 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
116 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 116 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ |
117 | $(LTLIBINTL) -ljansson -lmicrohttpd | 117 | $(LTLIBINTL) -ljansson -lmicrohttpd |
118 | libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \ | 118 | libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \ |
119 | $(GN_PLUGIN_LDFLAGS) | 119 | $(GN_PLUGIN_LDFLAGS) |
120 | 120 | ||
121 | gnunet_idp_SOURCES = \ | 121 | gnunet_reclaim_SOURCES = \ |
122 | gnunet-idp.c | 122 | gnunet-reclaim.c |
123 | gnunet_idp_LDADD = \ | 123 | gnunet_reclaim_LDADD = \ |
124 | $(top_builddir)/src/util/libgnunetutil.la \ | 124 | $(top_builddir)/src/util/libgnunetutil.la \ |
125 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 125 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
126 | libgnunetidentityprovider.la \ | 126 | libgnunetidentityprovider.la \ |
127 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 127 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
128 | $(top_builddir)/src/identity-attribute/libgnunetidentityattribute.la \ | 128 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ |
129 | $(GN_LIBINTL) | 129 | $(GN_LIBINTL) |
130 | 130 | ||
131 | check_SCRIPTS = \ | 131 | check_SCRIPTS = \ |
132 | test_idp_attribute.sh \ | 132 | test_reclaim_attribute.sh \ |
133 | test_idp_issue.sh \ | 133 | test_reclaim_issue.sh \ |
134 | test_idp_consume.sh \ | 134 | test_reclaim_consume.sh \ |
135 | test_idp_revoke.sh | 135 | test_reclaim_revoke.sh |
136 | 136 | ||
137 | if ENABLE_TEST_RUN | 137 | if ENABLE_TEST_RUN |
138 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; | 138 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; |
diff --git a/src/identity-provider/gnunet-idp.c b/src/reclaim/gnunet-reclaim.c index 79e4f8d27..9947eac6d 100644 --- a/src/identity-provider/gnunet-idp.c +++ b/src/reclaim/gnunet-reclaim.c | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | /** | 18 | /** |
19 | * @author Martin Schanzenbach | 19 | * @author Martin Schanzenbach |
20 | * @file src/identity-provider/gnunet-idp.c | 20 | * @file src/reclaim/gnunet-reclaim.c |
21 | * @brief Identity Provider utility | 21 | * @brief Identity Provider utility |
22 | * | 22 | * |
23 | */ | 23 | */ |
@@ -25,7 +25,7 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_util_lib.h" | 26 | #include "gnunet_util_lib.h" |
27 | #include "gnunet_namestore_service.h" | 27 | #include "gnunet_namestore_service.h" |
28 | #include "gnunet_identity_provider_service.h" | 28 | #include "gnunet_reclaim_service.h" |
29 | #include "gnunet_identity_service.h" | 29 | #include "gnunet_identity_service.h" |
30 | #include "gnunet_signatures.h" | 30 | #include "gnunet_signatures.h" |
31 | 31 | ||
@@ -85,19 +85,19 @@ static char* ego_name; | |||
85 | static struct GNUNET_IDENTITY_Handle *identity_handle; | 85 | static struct GNUNET_IDENTITY_Handle *identity_handle; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * IdP handle | 88 | * reclaim handle |
89 | */ | 89 | */ |
90 | static struct GNUNET_IDENTITY_PROVIDER_Handle *idp_handle; | 90 | static struct GNUNET_RECLAIM_Handle *reclaim_handle; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * IdP operation | 93 | * reclaim operation |
94 | */ | 94 | */ |
95 | static struct GNUNET_IDENTITY_PROVIDER_Operation *idp_op; | 95 | static struct GNUNET_RECLAIM_Operation *reclaim_op; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Attribute iterator | 98 | * Attribute iterator |
99 | */ | 99 | */ |
100 | static struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *attr_iterator; | 100 | static struct GNUNET_RECLAIM_AttributeIterator *attr_iterator; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Master ABE key | 103 | * Master ABE key |
@@ -117,12 +117,12 @@ static struct GNUNET_CRYPTO_EcdsaPublicKey rp_key; | |||
117 | /** | 117 | /** |
118 | * Ticket to consume | 118 | * Ticket to consume |
119 | */ | 119 | */ |
120 | static struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 120 | static struct GNUNET_RECLAIM_Ticket ticket; |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * Attribute list | 123 | * Attribute list |
124 | */ | 124 | */ |
125 | static struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attr_list; | 125 | static struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attr_list; |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * Attribute expiration interval | 128 | * Attribute expiration interval |
@@ -139,12 +139,12 @@ do_cleanup(void *cls) | |||
139 | { | 139 | { |
140 | if (NULL != timeout) | 140 | if (NULL != timeout) |
141 | GNUNET_SCHEDULER_cancel (timeout); | 141 | GNUNET_SCHEDULER_cancel (timeout); |
142 | if (NULL != idp_op) | 142 | if (NULL != reclaim_op) |
143 | GNUNET_IDENTITY_PROVIDER_cancel (idp_op); | 143 | GNUNET_RECLAIM_cancel (reclaim_op); |
144 | if (NULL != attr_iterator) | 144 | if (NULL != attr_iterator) |
145 | GNUNET_IDENTITY_PROVIDER_get_attributes_stop (attr_iterator); | 145 | GNUNET_RECLAIM_get_attributes_stop (attr_iterator); |
146 | if (NULL != idp_handle) | 146 | if (NULL != reclaim_handle) |
147 | GNUNET_IDENTITY_PROVIDER_disconnect (idp_handle); | 147 | GNUNET_RECLAIM_disconnect (reclaim_handle); |
148 | if (NULL != identity_handle) | 148 | if (NULL != identity_handle) |
149 | GNUNET_IDENTITY_disconnect (identity_handle); | 149 | GNUNET_IDENTITY_disconnect (identity_handle); |
150 | if (NULL != abe_key) | 150 | if (NULL != abe_key) |
@@ -155,13 +155,13 @@ do_cleanup(void *cls) | |||
155 | 155 | ||
156 | static void | 156 | static void |
157 | ticket_issue_cb (void* cls, | 157 | ticket_issue_cb (void* cls, |
158 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket) | 158 | const struct GNUNET_RECLAIM_Ticket *ticket) |
159 | { | 159 | { |
160 | char* ticket_str; | 160 | char* ticket_str; |
161 | idp_op = NULL; | 161 | reclaim_op = NULL; |
162 | if (NULL != ticket) { | 162 | if (NULL != ticket) { |
163 | ticket_str = GNUNET_STRINGS_data_to_string_alloc (ticket, | 163 | ticket_str = GNUNET_STRINGS_data_to_string_alloc (ticket, |
164 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket)); | 164 | sizeof (struct GNUNET_RECLAIM_Ticket)); |
165 | printf("%s\n", | 165 | printf("%s\n", |
166 | ticket_str); | 166 | ticket_str); |
167 | GNUNET_free (ticket_str); | 167 | GNUNET_free (ticket_str); |
@@ -174,7 +174,7 @@ store_attr_cont (void *cls, | |||
174 | int32_t success, | 174 | int32_t success, |
175 | const char*emsg) | 175 | const char*emsg) |
176 | { | 176 | { |
177 | idp_op = NULL; | 177 | reclaim_op = NULL; |
178 | if (GNUNET_SYSERR == success) { | 178 | if (GNUNET_SYSERR == success) { |
179 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 179 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
180 | "%s\n", emsg); | 180 | "%s\n", emsg); |
@@ -185,12 +185,12 @@ store_attr_cont (void *cls, | |||
185 | static void | 185 | static void |
186 | process_attrs (void *cls, | 186 | process_attrs (void *cls, |
187 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 187 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
188 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 188 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
189 | { | 189 | { |
190 | char *value_str; | 190 | char *value_str; |
191 | if (NULL == identity) | 191 | if (NULL == identity) |
192 | { | 192 | { |
193 | idp_op = NULL; | 193 | reclaim_op = NULL; |
194 | GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); | 194 | GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); |
195 | return; | 195 | return; |
196 | } | 196 | } |
@@ -199,9 +199,9 @@ process_attrs (void *cls, | |||
199 | ret = 1; | 199 | ret = 1; |
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | value_str = GNUNET_IDENTITY_ATTRIBUTE_value_to_string (attr->type, | 202 | value_str = GNUNET_RECLAIM_ATTRIBUTE_value_to_string (attr->type, |
203 | attr->data, | 203 | attr->data, |
204 | attr->data_size); | 204 | attr->data_size); |
205 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 205 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
206 | "%s: %s\n", attr->name, value_str); | 206 | "%s: %s\n", attr->name, value_str); |
207 | } | 207 | } |
@@ -229,7 +229,7 @@ timeout_task (void *cls) | |||
229 | static void | 229 | static void |
230 | process_rvk (void *cls, int success, const char* msg) | 230 | process_rvk (void *cls, int success, const char* msg) |
231 | { | 231 | { |
232 | idp_op = NULL; | 232 | reclaim_op = NULL; |
233 | if (GNUNET_OK != success) | 233 | if (GNUNET_OK != success) |
234 | { | 234 | { |
235 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 235 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
@@ -242,7 +242,7 @@ process_rvk (void *cls, int success, const char* msg) | |||
242 | static void | 242 | static void |
243 | iter_finished (void *cls) | 243 | iter_finished (void *cls) |
244 | { | 244 | { |
245 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *claim; | 245 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *claim; |
246 | char *data; | 246 | char *data; |
247 | size_t data_size; | 247 | size_t data_size; |
248 | int type; | 248 | int type; |
@@ -256,21 +256,21 @@ iter_finished (void *cls) | |||
256 | 256 | ||
257 | if (issue_attrs) | 257 | if (issue_attrs) |
258 | { | 258 | { |
259 | idp_op = GNUNET_IDENTITY_PROVIDER_ticket_issue (idp_handle, | 259 | reclaim_op = GNUNET_RECLAIM_ticket_issue (reclaim_handle, |
260 | pkey, | 260 | pkey, |
261 | &rp_key, | 261 | &rp_key, |
262 | attr_list, | 262 | attr_list, |
263 | &ticket_issue_cb, | 263 | &ticket_issue_cb, |
264 | NULL); | 264 | NULL); |
265 | return; | 265 | return; |
266 | } | 266 | } |
267 | if (consume_ticket) | 267 | if (consume_ticket) |
268 | { | 268 | { |
269 | idp_op = GNUNET_IDENTITY_PROVIDER_ticket_consume (idp_handle, | 269 | reclaim_op = GNUNET_RECLAIM_ticket_consume (reclaim_handle, |
270 | pkey, | 270 | pkey, |
271 | &ticket, | 271 | &ticket, |
272 | &process_attrs, | 272 | &process_attrs, |
273 | NULL); | 273 | NULL); |
274 | timeout = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 10), | 274 | timeout = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 10), |
275 | &timeout_task, | 275 | &timeout_task, |
276 | NULL); | 276 | NULL); |
@@ -278,34 +278,34 @@ iter_finished (void *cls) | |||
278 | } | 278 | } |
279 | if (revoke_ticket) | 279 | if (revoke_ticket) |
280 | { | 280 | { |
281 | idp_op = GNUNET_IDENTITY_PROVIDER_ticket_revoke (idp_handle, | 281 | reclaim_op = GNUNET_RECLAIM_ticket_revoke (reclaim_handle, |
282 | pkey, | 282 | pkey, |
283 | &ticket, | 283 | &ticket, |
284 | &process_rvk, | 284 | &process_rvk, |
285 | NULL); | 285 | NULL); |
286 | return; | 286 | return; |
287 | } | 287 | } |
288 | if (attr_name) | 288 | if (attr_name) |
289 | { | 289 | { |
290 | if (NULL == type_str) | 290 | if (NULL == type_str) |
291 | type = GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING; | 291 | type = GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING; |
292 | else | 292 | else |
293 | type = GNUNET_IDENTITY_ATTRIBUTE_typename_to_number (type_str); | 293 | type = GNUNET_RECLAIM_ATTRIBUTE_typename_to_number (type_str); |
294 | 294 | ||
295 | GNUNET_assert (GNUNET_SYSERR != GNUNET_IDENTITY_ATTRIBUTE_string_to_value (type, | 295 | GNUNET_assert (GNUNET_SYSERR != GNUNET_RECLAIM_ATTRIBUTE_string_to_value (type, |
296 | attr_value, | 296 | attr_value, |
297 | (void**)&data, | 297 | (void**)&data, |
298 | &data_size)); | 298 | &data_size)); |
299 | claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (attr_name, | 299 | claim = GNUNET_RECLAIM_ATTRIBUTE_claim_new (attr_name, |
300 | type, | 300 | type, |
301 | data, | 301 | data, |
302 | data_size); | 302 | data_size); |
303 | idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (idp_handle, | 303 | reclaim_op = GNUNET_RECLAIM_attribute_store (reclaim_handle, |
304 | pkey, | 304 | pkey, |
305 | claim, | 305 | claim, |
306 | &exp_interval, | 306 | &exp_interval, |
307 | &store_attr_cont, | 307 | &store_attr_cont, |
308 | NULL); | 308 | NULL); |
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); | 311 | GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); |
@@ -314,9 +314,9 @@ iter_finished (void *cls) | |||
314 | static void | 314 | static void |
315 | iter_cb (void *cls, | 315 | iter_cb (void *cls, |
316 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 316 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
317 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 317 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
318 | { | 318 | { |
319 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 319 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
320 | char *attrs_tmp; | 320 | char *attrs_tmp; |
321 | char *attr_str; | 321 | char *attr_str; |
322 | 322 | ||
@@ -329,11 +329,11 @@ iter_cb (void *cls, | |||
329 | attr_str = strtok (NULL, ","); | 329 | attr_str = strtok (NULL, ","); |
330 | continue; | 330 | continue; |
331 | } | 331 | } |
332 | le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | 332 | le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
333 | le->claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (attr->name, | 333 | le->claim = GNUNET_RECLAIM_ATTRIBUTE_claim_new (attr->name, |
334 | attr->type, | 334 | attr->type, |
335 | attr->data, | 335 | attr->data, |
336 | attr->data_size); | 336 | attr->data_size); |
337 | GNUNET_CONTAINER_DLL_insert (attr_list->list_head, | 337 | GNUNET_CONTAINER_DLL_insert (attr_list->list_head, |
338 | attr_list->list_tail, | 338 | attr_list->list_tail, |
339 | le); | 339 | le); |
@@ -344,7 +344,7 @@ iter_cb (void *cls, | |||
344 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 344 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
345 | "%s: %s\n", attr->name, (char*)attr->data); | 345 | "%s: %s\n", attr->name, (char*)attr->data); |
346 | } | 346 | } |
347 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (attr_iterator); | 347 | GNUNET_RECLAIM_get_attributes_next (attr_iterator); |
348 | } | 348 | } |
349 | 349 | ||
350 | static void | 350 | static void |
@@ -365,24 +365,24 @@ ego_iter_finished (void *cls) | |||
365 | GNUNET_STRINGS_string_to_data (consume_ticket, | 365 | GNUNET_STRINGS_string_to_data (consume_ticket, |
366 | strlen (consume_ticket), | 366 | strlen (consume_ticket), |
367 | &ticket, | 367 | &ticket, |
368 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket)); | 368 | sizeof (struct GNUNET_RECLAIM_Ticket)); |
369 | if (NULL != revoke_ticket) | 369 | if (NULL != revoke_ticket) |
370 | GNUNET_STRINGS_string_to_data (revoke_ticket, | 370 | GNUNET_STRINGS_string_to_data (revoke_ticket, |
371 | strlen (revoke_ticket), | 371 | strlen (revoke_ticket), |
372 | &ticket, | 372 | &ticket, |
373 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket)); | 373 | sizeof (struct GNUNET_RECLAIM_Ticket)); |
374 | 374 | ||
375 | 375 | ||
376 | attr_list = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 376 | attr_list = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
377 | 377 | ||
378 | attr_iterator = GNUNET_IDENTITY_PROVIDER_get_attributes_start (idp_handle, | 378 | attr_iterator = GNUNET_RECLAIM_get_attributes_start (reclaim_handle, |
379 | pkey, | 379 | pkey, |
380 | &iter_error, | 380 | &iter_error, |
381 | NULL, | 381 | NULL, |
382 | &iter_cb, | 382 | &iter_cb, |
383 | NULL, | 383 | NULL, |
384 | &iter_finished, | 384 | &iter_finished, |
385 | NULL); | 385 | NULL); |
386 | 386 | ||
387 | 387 | ||
388 | } | 388 | } |
@@ -439,7 +439,7 @@ run (void *cls, | |||
439 | return; | 439 | return; |
440 | } | 440 | } |
441 | 441 | ||
442 | idp_handle = GNUNET_IDENTITY_PROVIDER_connect (c); | 442 | reclaim_handle = GNUNET_RECLAIM_connect (c); |
443 | //Get Ego | 443 | //Get Ego |
444 | identity_handle = GNUNET_IDENTITY_connect (c, | 444 | identity_handle = GNUNET_IDENTITY_connect (c, |
445 | &ego_cb, | 445 | &ego_cb, |
diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/reclaim/gnunet-service-reclaim.c index 4563fdfa1..bf8780a92 100644 --- a/src/identity-provider/gnunet-service-identity-provider.c +++ b/src/reclaim/gnunet-service-reclaim.c | |||
@@ -17,8 +17,8 @@ | |||
17 | */ | 17 | */ |
18 | /** | 18 | /** |
19 | * @author Martin Schanzenbach | 19 | * @author Martin Schanzenbach |
20 | * @file src/identity-provider/gnunet-service-identity-provider.c | 20 | * @file src/reclaim/gnunet-service-reclaim.c |
21 | * @brief Identity Token Service | 21 | * @brief reclaim Service |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
@@ -32,10 +32,10 @@ | |||
32 | #include "gnunet_credential_service.h" | 32 | #include "gnunet_credential_service.h" |
33 | #include "gnunet_statistics_service.h" | 33 | #include "gnunet_statistics_service.h" |
34 | #include "gnunet_gns_service.h" | 34 | #include "gnunet_gns_service.h" |
35 | #include "gnunet_identity_provider_plugin.h" | 35 | #include "gnunet_reclaim_plugin.h" |
36 | #include "gnunet_identity_attribute_lib.h" | 36 | #include "gnunet_reclaim_attribute_lib.h" |
37 | #include "gnunet_signatures.h" | 37 | #include "gnunet_signatures.h" |
38 | #include "identity_provider.h" | 38 | #include "reclaim.h" |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * First pass state | 41 | * First pass state |
@@ -65,7 +65,7 @@ static struct GNUNET_IDENTITY_Handle *identity_handle; | |||
65 | /** | 65 | /** |
66 | * Database handle | 66 | * Database handle |
67 | */ | 67 | */ |
68 | static struct GNUNET_IDENTITY_PROVIDER_PluginFunctions *TKT_database; | 68 | static struct GNUNET_RECLAIM_PluginFunctions *TKT_database; |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * Name of DB plugin | 71 | * Name of DB plugin |
@@ -396,7 +396,7 @@ struct AttributeStoreHandle | |||
396 | /** | 396 | /** |
397 | * The attribute to store | 397 | * The attribute to store |
398 | */ | 398 | */ |
399 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *claim; | 399 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *claim; |
400 | 400 | ||
401 | /** | 401 | /** |
402 | * The attribute expiration interval | 402 | * The attribute expiration interval |
@@ -433,7 +433,7 @@ struct ConsumeTicketHandle | |||
433 | /** | 433 | /** |
434 | * Ticket | 434 | * Ticket |
435 | */ | 435 | */ |
436 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 436 | struct GNUNET_RECLAIM_Ticket ticket; |
437 | 437 | ||
438 | /** | 438 | /** |
439 | * LookupRequest | 439 | * LookupRequest |
@@ -473,7 +473,7 @@ struct ConsumeTicketHandle | |||
473 | /** | 473 | /** |
474 | * Attributes | 474 | * Attributes |
475 | */ | 475 | */ |
476 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs; | 476 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
477 | 477 | ||
478 | /** | 478 | /** |
479 | * Lookup time | 479 | * Lookup time |
@@ -535,12 +535,12 @@ struct TicketRevocationHandle | |||
535 | /** | 535 | /** |
536 | * Attributes to reissue | 536 | * Attributes to reissue |
537 | */ | 537 | */ |
538 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs; | 538 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
539 | 539 | ||
540 | /** | 540 | /** |
541 | * Attributes to revoke | 541 | * Attributes to revoke |
542 | */ | 542 | */ |
543 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *rvk_attrs; | 543 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *rvk_attrs; |
544 | 544 | ||
545 | /** | 545 | /** |
546 | * Issuer Key | 546 | * Issuer Key |
@@ -550,7 +550,7 @@ struct TicketRevocationHandle | |||
550 | /** | 550 | /** |
551 | * Ticket to issue | 551 | * Ticket to issue |
552 | */ | 552 | */ |
553 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 553 | struct GNUNET_RECLAIM_Ticket ticket; |
554 | 554 | ||
555 | /** | 555 | /** |
556 | * QueueEntry | 556 | * QueueEntry |
@@ -603,7 +603,7 @@ struct TicketIssueHandle | |||
603 | /** | 603 | /** |
604 | * Attributes to issue | 604 | * Attributes to issue |
605 | */ | 605 | */ |
606 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs; | 606 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
607 | 607 | ||
608 | /** | 608 | /** |
609 | * Issuer Key | 609 | * Issuer Key |
@@ -613,7 +613,7 @@ struct TicketIssueHandle | |||
613 | /** | 613 | /** |
614 | * Ticket to issue | 614 | * Ticket to issue |
615 | */ | 615 | */ |
616 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 616 | struct GNUNET_RECLAIM_Ticket ticket; |
617 | 617 | ||
618 | /** | 618 | /** |
619 | * QueueEntry | 619 | * QueueEntry |
@@ -861,7 +861,7 @@ static void | |||
861 | cleanup_ticket_issue_handle (struct TicketIssueHandle *handle) | 861 | cleanup_ticket_issue_handle (struct TicketIssueHandle *handle) |
862 | { | 862 | { |
863 | if (NULL != handle->attrs) | 863 | if (NULL != handle->attrs) |
864 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (handle->attrs); | 864 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (handle->attrs); |
865 | if (NULL != handle->ns_qe) | 865 | if (NULL != handle->ns_qe) |
866 | GNUNET_NAMESTORE_cancel (handle->ns_qe); | 866 | GNUNET_NAMESTORE_cancel (handle->ns_qe); |
867 | GNUNET_free (handle); | 867 | GNUNET_free (handle); |
@@ -871,12 +871,12 @@ cleanup_ticket_issue_handle (struct TicketIssueHandle *handle) | |||
871 | static void | 871 | static void |
872 | send_ticket_result (struct IdpClient *client, | 872 | send_ticket_result (struct IdpClient *client, |
873 | uint32_t r_id, | 873 | uint32_t r_id, |
874 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 874 | const struct GNUNET_RECLAIM_Ticket *ticket, |
875 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 875 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
876 | { | 876 | { |
877 | struct TicketResultMessage *irm; | 877 | struct TicketResultMessage *irm; |
878 | struct GNUNET_MQ_Envelope *env; | 878 | struct GNUNET_MQ_Envelope *env; |
879 | struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket_buf; | 879 | struct GNUNET_RECLAIM_Ticket *ticket_buf; |
880 | 880 | ||
881 | /* store ticket in DB */ | 881 | /* store ticket in DB */ |
882 | if (GNUNET_OK != TKT_database->store_ticket (TKT_database->cls, | 882 | if (GNUNET_OK != TKT_database->store_ticket (TKT_database->cls, |
@@ -889,9 +889,9 @@ send_ticket_result (struct IdpClient *client, | |||
889 | } | 889 | } |
890 | 890 | ||
891 | env = GNUNET_MQ_msg_extra (irm, | 891 | env = GNUNET_MQ_msg_extra (irm, |
892 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket), | 892 | sizeof (struct GNUNET_RECLAIM_Ticket), |
893 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT); | 893 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT); |
894 | ticket_buf = (struct GNUNET_IDENTITY_PROVIDER_Ticket *)&irm[1]; | 894 | ticket_buf = (struct GNUNET_RECLAIM_Ticket *)&irm[1]; |
895 | *ticket_buf = *ticket; | 895 | *ticket_buf = *ticket; |
896 | irm->id = htonl (r_id); | 896 | irm->id = htonl (r_id); |
897 | GNUNET_MQ_send (client->mq, | 897 | GNUNET_MQ_send (client->mq, |
@@ -927,14 +927,14 @@ store_ticket_issue_cont (void *cls, | |||
927 | 927 | ||
928 | 928 | ||
929 | int | 929 | int |
930 | serialize_abe_keyinfo2 (const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 930 | serialize_abe_keyinfo2 (const struct GNUNET_RECLAIM_Ticket *ticket, |
931 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 931 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
932 | const struct GNUNET_ABE_AbeKey *rp_key, | 932 | const struct GNUNET_ABE_AbeKey *rp_key, |
933 | struct GNUNET_CRYPTO_EcdhePrivateKey **ecdh_privkey, | 933 | struct GNUNET_CRYPTO_EcdhePrivateKey **ecdh_privkey, |
934 | char **result) | 934 | char **result) |
935 | { | 935 | { |
936 | struct GNUNET_CRYPTO_EcdhePublicKey ecdh_pubkey; | 936 | struct GNUNET_CRYPTO_EcdhePublicKey ecdh_pubkey; |
937 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 937 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
938 | char *enc_keyinfo; | 938 | char *enc_keyinfo; |
939 | char *serialized_key; | 939 | char *serialized_key; |
940 | char *buf; | 940 | char *buf; |
@@ -1009,7 +1009,7 @@ issue_ticket_after_abe_bootstrap (void *cls, | |||
1009 | struct GNUNET_ABE_AbeMasterKey *abe_key) | 1009 | struct GNUNET_ABE_AbeMasterKey *abe_key) |
1010 | { | 1010 | { |
1011 | struct TicketIssueHandle *ih = cls; | 1011 | struct TicketIssueHandle *ih = cls; |
1012 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 1012 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
1013 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; | 1013 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; |
1014 | struct GNUNET_GNSRECORD_Data code_record[1]; | 1014 | struct GNUNET_GNSRECORD_Data code_record[1]; |
1015 | struct GNUNET_ABE_AbeKey *rp_key; | 1015 | struct GNUNET_ABE_AbeKey *rp_key; |
@@ -1101,7 +1101,7 @@ handle_issue_ticket_message (void *cls, | |||
1101 | 1101 | ||
1102 | ih = GNUNET_new (struct TicketIssueHandle); | 1102 | ih = GNUNET_new (struct TicketIssueHandle); |
1103 | attrs_len = ntohs (im->attr_len); | 1103 | attrs_len = ntohs (im->attr_len); |
1104 | ih->attrs = GNUNET_IDENTITY_ATTRIBUTE_list_deserialize ((char*)&im[1], attrs_len); | 1104 | ih->attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char*)&im[1], attrs_len); |
1105 | ih->r_id = ntohl (im->id); | 1105 | ih->r_id = ntohl (im->id); |
1106 | ih->client = idp; | 1106 | ih->client = idp; |
1107 | ih->identity = im->identity; | 1107 | ih->identity = im->identity; |
@@ -1132,9 +1132,9 @@ static void | |||
1132 | cleanup_revoke_ticket_handle (struct TicketRevocationHandle *rh) | 1132 | cleanup_revoke_ticket_handle (struct TicketRevocationHandle *rh) |
1133 | { | 1133 | { |
1134 | if (NULL != rh->attrs) | 1134 | if (NULL != rh->attrs) |
1135 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (rh->attrs); | 1135 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (rh->attrs); |
1136 | if (NULL != rh->rvk_attrs) | 1136 | if (NULL != rh->rvk_attrs) |
1137 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (rh->rvk_attrs); | 1137 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (rh->rvk_attrs); |
1138 | if (NULL != rh->abe_key) | 1138 | if (NULL != rh->abe_key) |
1139 | GNUNET_ABE_cpabe_delete_master_key (rh->abe_key); | 1139 | GNUNET_ABE_cpabe_delete_master_key (rh->abe_key); |
1140 | if (NULL != rh->ns_qe) | 1140 | if (NULL != rh->ns_qe) |
@@ -1162,7 +1162,7 @@ send_revocation_finished (struct TicketRevocationHandle *rh, | |||
1162 | &rh->ticket)); | 1162 | &rh->ticket)); |
1163 | 1163 | ||
1164 | env = GNUNET_MQ_msg (trm, | 1164 | env = GNUNET_MQ_msg (trm, |
1165 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT); | 1165 | GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT); |
1166 | trm->id = htonl (rh->r_id); | 1166 | trm->id = htonl (rh->r_id); |
1167 | trm->success = htonl (success); | 1167 | trm->success = htonl (success); |
1168 | GNUNET_MQ_send (rh->client->mq, | 1168 | GNUNET_MQ_send (rh->client->mq, |
@@ -1182,8 +1182,8 @@ send_revocation_finished (struct TicketRevocationHandle *rh, | |||
1182 | */ | 1182 | */ |
1183 | static void | 1183 | static void |
1184 | ticket_reissue_proc (void *cls, | 1184 | ticket_reissue_proc (void *cls, |
1185 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 1185 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1186 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs); | 1186 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
1187 | 1187 | ||
1188 | static void | 1188 | static void |
1189 | revocation_reissue_tickets (struct TicketRevocationHandle *rh); | 1189 | revocation_reissue_tickets (struct TicketRevocationHandle *rh); |
@@ -1226,12 +1226,12 @@ reissue_ticket_cont (void *cls, | |||
1226 | */ | 1226 | */ |
1227 | static void | 1227 | static void |
1228 | ticket_reissue_proc (void *cls, | 1228 | ticket_reissue_proc (void *cls, |
1229 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 1229 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1230 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 1230 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
1231 | { | 1231 | { |
1232 | struct TicketRevocationHandle *rh = cls; | 1232 | struct TicketRevocationHandle *rh = cls; |
1233 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 1233 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
1234 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le_rollover; | 1234 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le_rollover; |
1235 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; | 1235 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; |
1236 | struct GNUNET_GNSRECORD_Data code_record[1]; | 1236 | struct GNUNET_GNSRECORD_Data code_record[1]; |
1237 | struct GNUNET_ABE_AbeKey *rp_key; | 1237 | struct GNUNET_ABE_AbeKey *rp_key; |
@@ -1437,9 +1437,9 @@ check_attr_cb (void *cls, | |||
1437 | return; | 1437 | return; |
1438 | } | 1438 | } |
1439 | 1439 | ||
1440 | buf_size = GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (rh->attrs->list_head->claim); | 1440 | buf_size = GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (rh->attrs->list_head->claim); |
1441 | buf = GNUNET_malloc (buf_size); | 1441 | buf = GNUNET_malloc (buf_size); |
1442 | GNUNET_IDENTITY_ATTRIBUTE_serialize (rh->attrs->list_head->claim, | 1442 | GNUNET_RECLAIM_ATTRIBUTE_serialize (rh->attrs->list_head->claim, |
1443 | buf); | 1443 | buf); |
1444 | rh->attrs->list_head->claim->version++; | 1444 | rh->attrs->list_head->claim->version++; |
1445 | GNUNET_asprintf (&policy, "%s_%lu", | 1445 | GNUNET_asprintf (&policy, "%s_%lu", |
@@ -1527,7 +1527,7 @@ attr_reenc_cont (void *cls, | |||
1527 | const char *emsg) | 1527 | const char *emsg) |
1528 | { | 1528 | { |
1529 | struct TicketRevocationHandle *rh = cls; | 1529 | struct TicketRevocationHandle *rh = cls; |
1530 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 1530 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
1531 | 1531 | ||
1532 | rh->ns_qe = NULL; | 1532 | rh->ns_qe = NULL; |
1533 | if (GNUNET_SYSERR == success) | 1533 | if (GNUNET_SYSERR == success) |
@@ -1561,12 +1561,12 @@ attr_reenc_cont (void *cls, | |||
1561 | 1561 | ||
1562 | static void | 1562 | static void |
1563 | process_attributes_to_update (void *cls, | 1563 | process_attributes_to_update (void *cls, |
1564 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 1564 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1565 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 1565 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
1566 | { | 1566 | { |
1567 | struct TicketRevocationHandle *rh = cls; | 1567 | struct TicketRevocationHandle *rh = cls; |
1568 | 1568 | ||
1569 | rh->attrs = GNUNET_IDENTITY_ATTRIBUTE_list_dup (attrs); | 1569 | rh->attrs = GNUNET_RECLAIM_ATTRIBUTE_list_dup (attrs); |
1570 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1570 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1571 | "Revocation Phase I: Collecting attributes\n"); | 1571 | "Revocation Phase I: Collecting attributes\n"); |
1572 | /* Reencrypt all attributes with new key */ | 1572 | /* Reencrypt all attributes with new key */ |
@@ -1621,11 +1621,11 @@ handle_revoke_ticket_message (void *cls, | |||
1621 | { | 1621 | { |
1622 | struct TicketRevocationHandle *rh; | 1622 | struct TicketRevocationHandle *rh; |
1623 | struct IdpClient *idp = cls; | 1623 | struct IdpClient *idp = cls; |
1624 | struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket; | 1624 | struct GNUNET_RECLAIM_Ticket *ticket; |
1625 | 1625 | ||
1626 | rh = GNUNET_new (struct TicketRevocationHandle); | 1626 | rh = GNUNET_new (struct TicketRevocationHandle); |
1627 | ticket = (struct GNUNET_IDENTITY_PROVIDER_Ticket*)&rm[1]; | 1627 | ticket = (struct GNUNET_RECLAIM_Ticket*)&rm[1]; |
1628 | rh->rvk_attrs = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 1628 | rh->rvk_attrs = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
1629 | rh->ticket = *ticket; | 1629 | rh->ticket = *ticket; |
1630 | rh->r_id = ntohl (rm->id); | 1630 | rh->r_id = ntohl (rm->id); |
1631 | rh->client = idp; | 1631 | rh->client = idp; |
@@ -1667,7 +1667,7 @@ cleanup_consume_ticket_handle (struct ConsumeTicketHandle *handle) | |||
1667 | GNUNET_ABE_cpabe_delete_key (handle->key, | 1667 | GNUNET_ABE_cpabe_delete_key (handle->key, |
1668 | GNUNET_YES); | 1668 | GNUNET_YES); |
1669 | if (NULL != handle->attrs) | 1669 | if (NULL != handle->attrs) |
1670 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (handle->attrs); | 1670 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (handle->attrs); |
1671 | GNUNET_free (handle); | 1671 | GNUNET_free (handle); |
1672 | } | 1672 | } |
1673 | 1673 | ||
@@ -1698,7 +1698,7 @@ process_parallel_lookup2 (void *cls, uint32_t rd_count, | |||
1698 | struct ConsumeTicketHandle *handle = parallel_lookup->handle; | 1698 | struct ConsumeTicketHandle *handle = parallel_lookup->handle; |
1699 | struct ConsumeTicketResultMessage *crm; | 1699 | struct ConsumeTicketResultMessage *crm; |
1700 | struct GNUNET_MQ_Envelope *env; | 1700 | struct GNUNET_MQ_Envelope *env; |
1701 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *attr_le; | 1701 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *attr_le; |
1702 | struct GNUNET_TIME_Absolute decrypt_duration; | 1702 | struct GNUNET_TIME_Absolute decrypt_duration; |
1703 | char *data; | 1703 | char *data; |
1704 | char *data_tmp; | 1704 | char *data_tmp; |
@@ -1741,8 +1741,8 @@ process_parallel_lookup2 (void *cls, uint32_t rd_count, | |||
1741 | 1, | 1741 | 1, |
1742 | GNUNET_YES); | 1742 | GNUNET_YES); |
1743 | 1743 | ||
1744 | attr_le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | 1744 | attr_le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
1745 | attr_le->claim = GNUNET_IDENTITY_ATTRIBUTE_deserialize (data, | 1745 | attr_le->claim = GNUNET_RECLAIM_ATTRIBUTE_deserialize (data, |
1746 | attr_len); | 1746 | attr_len); |
1747 | attr_le->claim->version = ntohl(*(uint32_t*)rd->data); | 1747 | attr_le->claim->version = ntohl(*(uint32_t*)rd->data); |
1748 | GNUNET_CONTAINER_DLL_insert (handle->attrs->list_head, | 1748 | GNUNET_CONTAINER_DLL_insert (handle->attrs->list_head, |
@@ -1766,15 +1766,15 @@ process_parallel_lookup2 (void *cls, uint32_t rd_count, | |||
1766 | } | 1766 | } |
1767 | 1767 | ||
1768 | GNUNET_SCHEDULER_cancel (handle->kill_task); | 1768 | GNUNET_SCHEDULER_cancel (handle->kill_task); |
1769 | attrs_len = GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (handle->attrs); | 1769 | attrs_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (handle->attrs); |
1770 | env = GNUNET_MQ_msg_extra (crm, | 1770 | env = GNUNET_MQ_msg_extra (crm, |
1771 | attrs_len, | 1771 | attrs_len, |
1772 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT); | 1772 | GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT); |
1773 | crm->id = htonl (handle->r_id); | 1773 | crm->id = htonl (handle->r_id); |
1774 | crm->attrs_len = htons (attrs_len); | 1774 | crm->attrs_len = htons (attrs_len); |
1775 | crm->identity = handle->ticket.identity; | 1775 | crm->identity = handle->ticket.identity; |
1776 | data_tmp = (char *) &crm[1]; | 1776 | data_tmp = (char *) &crm[1]; |
1777 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize (handle->attrs, | 1777 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (handle->attrs, |
1778 | data_tmp); | 1778 | data_tmp); |
1779 | GNUNET_MQ_send (handle->client->mq, env); | 1779 | GNUNET_MQ_send (handle->client->mq, env); |
1780 | GNUNET_CONTAINER_DLL_remove (handle->client->consume_op_head, | 1780 | GNUNET_CONTAINER_DLL_remove (handle->client->consume_op_head, |
@@ -1805,7 +1805,7 @@ abort_parallel_lookups2 (void *cls) | |||
1805 | lu = tmp; | 1805 | lu = tmp; |
1806 | } | 1806 | } |
1807 | env = GNUNET_MQ_msg (arm, | 1807 | env = GNUNET_MQ_msg (arm, |
1808 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT); | 1808 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); |
1809 | arm->id = htonl (handle->r_id); | 1809 | arm->id = htonl (handle->r_id); |
1810 | arm->attr_len = htons (0); | 1810 | arm->attr_len = htons (0); |
1811 | GNUNET_MQ_send (handle->client->mq, env); | 1811 | GNUNET_MQ_send (handle->client->mq, env); |
@@ -1918,10 +1918,10 @@ handle_consume_ticket_message (void *cls, | |||
1918 | ch->r_id = ntohl (cm->id); | 1918 | ch->r_id = ntohl (cm->id); |
1919 | ch->client = idp; | 1919 | ch->client = idp; |
1920 | ch->identity = cm->identity; | 1920 | ch->identity = cm->identity; |
1921 | ch->attrs = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 1921 | ch->attrs = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
1922 | GNUNET_CRYPTO_ecdsa_key_get_public (&ch->identity, | 1922 | GNUNET_CRYPTO_ecdsa_key_get_public (&ch->identity, |
1923 | &ch->identity_pub); | 1923 | &ch->identity_pub); |
1924 | ch->ticket = *((struct GNUNET_IDENTITY_PROVIDER_Ticket*)&cm[1]); | 1924 | ch->ticket = *((struct GNUNET_RECLAIM_Ticket*)&cm[1]); |
1925 | rnd_label = GNUNET_STRINGS_data_to_string_alloc (&ch->ticket.rnd, | 1925 | rnd_label = GNUNET_STRINGS_data_to_string_alloc (&ch->ticket.rnd, |
1926 | sizeof (uint64_t)); | 1926 | sizeof (uint64_t)); |
1927 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1927 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1986,7 +1986,7 @@ attr_store_cont (void *cls, | |||
1986 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1986 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1987 | "Sending ATTRIBUTE_STORE_RESPONSE message\n"); | 1987 | "Sending ATTRIBUTE_STORE_RESPONSE message\n"); |
1988 | env = GNUNET_MQ_msg (acr_msg, | 1988 | env = GNUNET_MQ_msg (acr_msg, |
1989 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE); | 1989 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE_RESPONSE); |
1990 | acr_msg->id = htonl (as_handle->r_id); | 1990 | acr_msg->id = htonl (as_handle->r_id); |
1991 | acr_msg->op_result = htonl (GNUNET_OK); | 1991 | acr_msg->op_result = htonl (GNUNET_OK); |
1992 | GNUNET_MQ_send (as_handle->client->mq, | 1992 | GNUNET_MQ_send (as_handle->client->mq, |
@@ -2009,10 +2009,10 @@ attr_store_task (void *cls) | |||
2009 | 2009 | ||
2010 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2010 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2011 | "Storing attribute\n"); | 2011 | "Storing attribute\n"); |
2012 | buf_size = GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (as_handle->claim); | 2012 | buf_size = GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (as_handle->claim); |
2013 | buf = GNUNET_malloc (buf_size); | 2013 | buf = GNUNET_malloc (buf_size); |
2014 | 2014 | ||
2015 | GNUNET_IDENTITY_ATTRIBUTE_serialize (as_handle->claim, | 2015 | GNUNET_RECLAIM_ATTRIBUTE_serialize (as_handle->claim, |
2016 | buf); | 2016 | buf); |
2017 | 2017 | ||
2018 | GNUNET_asprintf (&policy, | 2018 | GNUNET_asprintf (&policy, |
@@ -2111,7 +2111,7 @@ handle_attribute_store_message (void *cls, | |||
2111 | data_len = ntohs (sam->attr_len); | 2111 | data_len = ntohs (sam->attr_len); |
2112 | 2112 | ||
2113 | as_handle = GNUNET_new (struct AttributeStoreHandle); | 2113 | as_handle = GNUNET_new (struct AttributeStoreHandle); |
2114 | as_handle->claim = GNUNET_IDENTITY_ATTRIBUTE_deserialize ((char*)&sam[1], | 2114 | as_handle->claim = GNUNET_RECLAIM_ATTRIBUTE_deserialize ((char*)&sam[1], |
2115 | data_len); | 2115 | data_len); |
2116 | 2116 | ||
2117 | as_handle->r_id = ntohl (sam->id); | 2117 | as_handle->r_id = ntohl (sam->id); |
@@ -2158,7 +2158,7 @@ attr_iter_finished (void *cls) | |||
2158 | struct AttributeResultMessage *arm; | 2158 | struct AttributeResultMessage *arm; |
2159 | 2159 | ||
2160 | env = GNUNET_MQ_msg (arm, | 2160 | env = GNUNET_MQ_msg (arm, |
2161 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT); | 2161 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); |
2162 | arm->id = htonl (ai->request_id); | 2162 | arm->id = htonl (ai->request_id); |
2163 | arm->attr_len = htons (0); | 2163 | arm->attr_len = htons (0); |
2164 | GNUNET_MQ_send (ai->client->mq, env); | 2164 | GNUNET_MQ_send (ai->client->mq, env); |
@@ -2224,7 +2224,7 @@ attr_iter_cb (void *cls, | |||
2224 | "Found attribute: %s\n", label); | 2224 | "Found attribute: %s\n", label); |
2225 | env = GNUNET_MQ_msg_extra (arm, | 2225 | env = GNUNET_MQ_msg_extra (arm, |
2226 | msg_extra_len, | 2226 | msg_extra_len, |
2227 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT); | 2227 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); |
2228 | arm->id = htonl (ai->request_id); | 2228 | arm->id = htonl (ai->request_id); |
2229 | arm->attr_len = htons (msg_extra_len); | 2229 | arm->attr_len = htons (msg_extra_len); |
2230 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, | 2230 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, |
@@ -2406,8 +2406,8 @@ cleanup_ticket_iter_handle (struct TicketIteration *ti) | |||
2406 | */ | 2406 | */ |
2407 | static void | 2407 | static void |
2408 | ticket_iterate_proc (void *cls, | 2408 | ticket_iterate_proc (void *cls, |
2409 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 2409 | const struct GNUNET_RECLAIM_Ticket *ticket, |
2410 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 2410 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
2411 | { | 2411 | { |
2412 | struct TicketIterationProcResult *proc = cls; | 2412 | struct TicketIterationProcResult *proc = cls; |
2413 | 2413 | ||
@@ -2467,7 +2467,7 @@ run_ticket_iteration_round (struct TicketIteration *ti) | |||
2467 | } | 2467 | } |
2468 | /* send empty response to indicate end of list */ | 2468 | /* send empty response to indicate end of list */ |
2469 | env = GNUNET_MQ_msg (trm, | 2469 | env = GNUNET_MQ_msg (trm, |
2470 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT); | 2470 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT); |
2471 | trm->id = htonl (ti->r_id); | 2471 | trm->id = htonl (ti->r_id); |
2472 | GNUNET_MQ_send (ti->client->mq, | 2472 | GNUNET_MQ_send (ti->client->mq, |
2473 | env); | 2473 | env); |
@@ -2572,7 +2572,7 @@ run (void *cls, | |||
2572 | char *database; | 2572 | char *database; |
2573 | cfg = c; | 2573 | cfg = c; |
2574 | 2574 | ||
2575 | stats = GNUNET_STATISTICS_create ("identity-provider", cfg); | 2575 | stats = GNUNET_STATISTICS_create ("reclaim", cfg); |
2576 | 2576 | ||
2577 | //Connect to identity and namestore services | 2577 | //Connect to identity and namestore services |
2578 | ns_handle = GNUNET_NAMESTORE_connect (cfg); | 2578 | ns_handle = GNUNET_NAMESTORE_connect (cfg); |
@@ -2597,13 +2597,13 @@ run (void *cls, | |||
2597 | /* Loading DB plugin */ | 2597 | /* Loading DB plugin */ |
2598 | if (GNUNET_OK != | 2598 | if (GNUNET_OK != |
2599 | GNUNET_CONFIGURATION_get_value_string (cfg, | 2599 | GNUNET_CONFIGURATION_get_value_string (cfg, |
2600 | "identity-provider", | 2600 | "reclaim", |
2601 | "database", | 2601 | "database", |
2602 | &database)) | 2602 | &database)) |
2603 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2603 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
2604 | "No database backend configured\n"); | 2604 | "No database backend configured\n"); |
2605 | GNUNET_asprintf (&db_lib_name, | 2605 | GNUNET_asprintf (&db_lib_name, |
2606 | "libgnunet_plugin_identity_provider_%s", | 2606 | "libgnunet_plugin_reclaim_%s", |
2607 | database); | 2607 | database); |
2608 | TKT_database = GNUNET_PLUGIN_load (db_lib_name, | 2608 | TKT_database = GNUNET_PLUGIN_load (db_lib_name, |
2609 | (void *) cfg); | 2609 | (void *) cfg); |
@@ -2619,7 +2619,7 @@ run (void *cls, | |||
2619 | 2619 | ||
2620 | if (GNUNET_OK == | 2620 | if (GNUNET_OK == |
2621 | GNUNET_CONFIGURATION_get_value_time (cfg, | 2621 | GNUNET_CONFIGURATION_get_value_time (cfg, |
2622 | "identity-provider", | 2622 | "reclaim", |
2623 | "TOKEN_EXPIRATION_INTERVAL", | 2623 | "TOKEN_EXPIRATION_INTERVAL", |
2624 | &token_expiration_interval)) | 2624 | &token_expiration_interval)) |
2625 | { | 2625 | { |
@@ -2736,51 +2736,51 @@ client_connect_cb (void *cls, | |||
2736 | * Define "main" method using service macro. | 2736 | * Define "main" method using service macro. |
2737 | */ | 2737 | */ |
2738 | GNUNET_SERVICE_MAIN | 2738 | GNUNET_SERVICE_MAIN |
2739 | ("identity-provider", | 2739 | ("reclaim", |
2740 | GNUNET_SERVICE_OPTION_NONE, | 2740 | GNUNET_SERVICE_OPTION_NONE, |
2741 | &run, | 2741 | &run, |
2742 | &client_connect_cb, | 2742 | &client_connect_cb, |
2743 | &client_disconnect_cb, | 2743 | &client_disconnect_cb, |
2744 | NULL, | 2744 | NULL, |
2745 | GNUNET_MQ_hd_var_size (attribute_store_message, | 2745 | GNUNET_MQ_hd_var_size (attribute_store_message, |
2746 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE, | 2746 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE, |
2747 | struct AttributeStoreMessage, | 2747 | struct AttributeStoreMessage, |
2748 | NULL), | 2748 | NULL), |
2749 | GNUNET_MQ_hd_fixed_size (iteration_start, | 2749 | GNUNET_MQ_hd_fixed_size (iteration_start, |
2750 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START, | 2750 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_START, |
2751 | struct AttributeIterationStartMessage, | 2751 | struct AttributeIterationStartMessage, |
2752 | NULL), | 2752 | NULL), |
2753 | GNUNET_MQ_hd_fixed_size (iteration_next, | 2753 | GNUNET_MQ_hd_fixed_size (iteration_next, |
2754 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT, | 2754 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT, |
2755 | struct AttributeIterationNextMessage, | 2755 | struct AttributeIterationNextMessage, |
2756 | NULL), | 2756 | NULL), |
2757 | GNUNET_MQ_hd_fixed_size (iteration_stop, | 2757 | GNUNET_MQ_hd_fixed_size (iteration_stop, |
2758 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP, | 2758 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP, |
2759 | struct AttributeIterationStopMessage, | 2759 | struct AttributeIterationStopMessage, |
2760 | NULL), | 2760 | NULL), |
2761 | GNUNET_MQ_hd_var_size (issue_ticket_message, | 2761 | GNUNET_MQ_hd_var_size (issue_ticket_message, |
2762 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_TICKET, | 2762 | GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET, |
2763 | struct IssueTicketMessage, | 2763 | struct IssueTicketMessage, |
2764 | NULL), | 2764 | NULL), |
2765 | GNUNET_MQ_hd_var_size (consume_ticket_message, | 2765 | GNUNET_MQ_hd_var_size (consume_ticket_message, |
2766 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET, | 2766 | GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET, |
2767 | struct ConsumeTicketMessage, | 2767 | struct ConsumeTicketMessage, |
2768 | NULL), | 2768 | NULL), |
2769 | GNUNET_MQ_hd_fixed_size (ticket_iteration_start, | 2769 | GNUNET_MQ_hd_fixed_size (ticket_iteration_start, |
2770 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START, | 2770 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START, |
2771 | struct TicketIterationStartMessage, | 2771 | struct TicketIterationStartMessage, |
2772 | NULL), | 2772 | NULL), |
2773 | GNUNET_MQ_hd_fixed_size (ticket_iteration_next, | 2773 | GNUNET_MQ_hd_fixed_size (ticket_iteration_next, |
2774 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT, | 2774 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT, |
2775 | struct TicketIterationNextMessage, | 2775 | struct TicketIterationNextMessage, |
2776 | NULL), | 2776 | NULL), |
2777 | GNUNET_MQ_hd_fixed_size (ticket_iteration_stop, | 2777 | GNUNET_MQ_hd_fixed_size (ticket_iteration_stop, |
2778 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP, | 2778 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP, |
2779 | struct TicketIterationStopMessage, | 2779 | struct TicketIterationStopMessage, |
2780 | NULL), | 2780 | NULL), |
2781 | GNUNET_MQ_hd_var_size (revoke_ticket_message, | 2781 | GNUNET_MQ_hd_var_size (revoke_ticket_message, |
2782 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET, | 2782 | GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET, |
2783 | struct RevokeTicketMessage, | 2783 | struct RevokeTicketMessage, |
2784 | NULL), | 2784 | NULL), |
2785 | GNUNET_MQ_handler_end()); | 2785 | GNUNET_MQ_handler_end()); |
2786 | /* end of gnunet-service-identity-provider.c */ | 2786 | /* end of gnunet-service-reclaim.c */ |
diff --git a/src/identity-provider/jwt.c b/src/reclaim/jwt.c index 7ac4f0025..45b5d73f6 100644 --- a/src/identity-provider/jwt.c +++ b/src/reclaim/jwt.c | |||
@@ -17,14 +17,14 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @file identity-provider/jwt.c | 20 | * @file reclaim/jwt.c |
21 | * @brief helper library for JSON-Web-Tokens | 21 | * @brief helper library for JSON-Web-Tokens |
22 | * @author Martin Schanzenbach | 22 | * @author Martin Schanzenbach |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_util_lib.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_signatures.h" | 26 | #include "gnunet_signatures.h" |
27 | #include "gnunet_identity_attribute_lib.h" | 27 | #include "gnunet_reclaim_attribute_lib.h" |
28 | #include <jansson.h> | 28 | #include <jansson.h> |
29 | 29 | ||
30 | 30 | ||
@@ -65,10 +65,10 @@ create_jwt_header(void) | |||
65 | char* | 65 | char* |
66 | jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | 66 | jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, |
67 | const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, | 67 | const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, |
68 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 68 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
69 | const struct GNUNET_CRYPTO_AuthKey *priv_key) | 69 | const struct GNUNET_CRYPTO_AuthKey *priv_key) |
70 | { | 70 | { |
71 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 71 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
72 | struct GNUNET_HashCode signature; | 72 | struct GNUNET_HashCode signature; |
73 | char* audience; | 73 | char* audience; |
74 | char* subject; | 74 | char* subject; |
@@ -107,7 +107,7 @@ jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
107 | "aud", json_string (audience)); | 107 | "aud", json_string (audience)); |
108 | for (le = attrs->list_head; NULL != le; le = le->next) | 108 | for (le = attrs->list_head; NULL != le; le = le->next) |
109 | { | 109 | { |
110 | attr_val_str = GNUNET_IDENTITY_ATTRIBUTE_value_to_string (le->claim->type, | 110 | attr_val_str = GNUNET_RECLAIM_ATTRIBUTE_value_to_string (le->claim->type, |
111 | le->claim->data, | 111 | le->claim->data, |
112 | le->claim->data_size); | 112 | le->claim->data_size); |
113 | json_object_set_new (body, | 113 | json_object_set_new (body, |
diff --git a/src/identity-provider/jwt.h b/src/reclaim/jwt.h index 80b6caa33..4b0b01be3 100644 --- a/src/identity-provider/jwt.h +++ b/src/reclaim/jwt.h | |||
@@ -4,7 +4,7 @@ | |||
4 | char* | 4 | char* |
5 | jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | 5 | jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, |
6 | const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, | 6 | const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, |
7 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 7 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
8 | const struct GNUNET_CRYPTO_AuthKey *priv_key); | 8 | const struct GNUNET_CRYPTO_AuthKey *priv_key); |
9 | 9 | ||
10 | #endif | 10 | #endif |
diff --git a/src/identity-provider/plugin_gnsrecord_identity_provider.c b/src/reclaim/plugin_gnsrecord_reclaim.c index f0dc563dc..0322df752 100644 --- a/src/identity-provider/plugin_gnsrecord_identity_provider.c +++ b/src/reclaim/plugin_gnsrecord_reclaim.c | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @file identity-provider/plugin_gnsrecord_identity_provider.c | 20 | * @file reclaim/plugin_gnsrecord_reclaim.c |
21 | * @brief gnsrecord plugin to provide the API for identity records | 21 | * @brief gnsrecord plugin to provide the API for identity records |
22 | * @author Martin Schanzenbach | 22 | * @author Martin Schanzenbach |
23 | */ | 23 | */ |
@@ -234,7 +234,7 @@ number_to_typename (void *cls, | |||
234 | * @return the exported block API | 234 | * @return the exported block API |
235 | */ | 235 | */ |
236 | void * | 236 | void * |
237 | libgnunet_plugin_gnsrecord_identity_provider_init (void *cls) | 237 | libgnunet_plugin_gnsrecord_reclaim_init (void *cls) |
238 | { | 238 | { |
239 | struct GNUNET_GNSRECORD_PluginFunctions *api; | 239 | struct GNUNET_GNSRECORD_PluginFunctions *api; |
240 | 240 | ||
@@ -254,7 +254,7 @@ libgnunet_plugin_gnsrecord_identity_provider_init (void *cls) | |||
254 | * @return NULL | 254 | * @return NULL |
255 | */ | 255 | */ |
256 | void * | 256 | void * |
257 | libgnunet_plugin_gnsrecord_identity_provider_done (void *cls) | 257 | libgnunet_plugin_gnsrecord_reclaim_done (void *cls) |
258 | { | 258 | { |
259 | struct GNUNET_GNSRECORD_PluginFunctions *api = cls; | 259 | struct GNUNET_GNSRECORD_PluginFunctions *api = cls; |
260 | 260 | ||
diff --git a/src/identity-provider/plugin_identity_provider_sqlite.c b/src/reclaim/plugin_reclaim_sqlite.c index f2a8b7b54..b545a94e8 100644 --- a/src/identity-provider/plugin_identity_provider_sqlite.c +++ b/src/reclaim/plugin_reclaim_sqlite.c | |||
@@ -17,15 +17,15 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @file identity-provider/plugin_identity_provider_sqlite.c | 20 | * @file reclaim/plugin_reclaim_sqlite.c |
21 | * @brief sqlite-based idp backend | 21 | * @brief sqlite-based idp backend |
22 | * @author Martin Schanzenbach | 22 | * @author Martin Schanzenbach |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_identity_provider_service.h" | 26 | #include "gnunet_reclaim_service.h" |
27 | #include "gnunet_identity_provider_plugin.h" | 27 | #include "gnunet_reclaim_plugin.h" |
28 | #include "gnunet_identity_attribute_lib.h" | 28 | #include "gnunet_reclaim_attribute_lib.h" |
29 | #include "gnunet_sq_lib.h" | 29 | #include "gnunet_sq_lib.h" |
30 | #include <sqlite3.h> | 30 | #include <sqlite3.h> |
31 | 31 | ||
@@ -47,9 +47,9 @@ | |||
47 | * a failure of the command 'cmd' on file 'filename' | 47 | * a failure of the command 'cmd' on file 'filename' |
48 | * with the message given by strerror(errno). | 48 | * with the message given by strerror(errno). |
49 | */ | 49 | */ |
50 | #define LOG_SQLITE(db, level, cmd) do { GNUNET_log_from (level, "identity-provider", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) | 50 | #define LOG_SQLITE(db, level, cmd) do { GNUNET_log_from (level, "reclaim", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) |
51 | 51 | ||
52 | #define LOG(kind,...) GNUNET_log_from (kind, "identity-provider-sqlite", __VA_ARGS__) | 52 | #define LOG(kind,...) GNUNET_log_from (kind, "reclaim-sqlite", __VA_ARGS__) |
53 | 53 | ||
54 | 54 | ||
55 | /** | 55 | /** |
@@ -180,12 +180,12 @@ database_setup (struct Plugin *plugin) | |||
180 | 180 | ||
181 | if (GNUNET_OK != | 181 | if (GNUNET_OK != |
182 | GNUNET_CONFIGURATION_get_value_filename (plugin->cfg, | 182 | GNUNET_CONFIGURATION_get_value_filename (plugin->cfg, |
183 | "identity-provider-sqlite", | 183 | "reclaim-sqlite", |
184 | "FILENAME", | 184 | "FILENAME", |
185 | &afsdir)) | 185 | &afsdir)) |
186 | { | 186 | { |
187 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 187 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
188 | "identity-provider-sqlite", | 188 | "reclaim-sqlite", |
189 | "FILENAME"); | 189 | "FILENAME"); |
190 | return GNUNET_SYSERR; | 190 | return GNUNET_SYSERR; |
191 | } | 191 | } |
@@ -370,9 +370,9 @@ database_shutdown (struct Plugin *plugin) | |||
370 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 370 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
371 | */ | 371 | */ |
372 | static int | 372 | static int |
373 | identity_provider_sqlite_store_ticket (void *cls, | 373 | reclaim_sqlite_store_ticket (void *cls, |
374 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 374 | const struct GNUNET_RECLAIM_Ticket *ticket, |
375 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 375 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
376 | { | 376 | { |
377 | struct Plugin *plugin = cls; | 377 | struct Plugin *plugin = cls; |
378 | size_t attrs_len; | 378 | size_t attrs_len; |
@@ -401,9 +401,9 @@ identity_provider_sqlite_store_ticket (void *cls, | |||
401 | GNUNET_SQ_reset (plugin->dbh, | 401 | GNUNET_SQ_reset (plugin->dbh, |
402 | plugin->delete_ticket); | 402 | plugin->delete_ticket); |
403 | 403 | ||
404 | attrs_len = GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (attrs); | 404 | attrs_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs); |
405 | attrs_ser = GNUNET_malloc (attrs_len); | 405 | attrs_ser = GNUNET_malloc (attrs_len); |
406 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize (attrs, | 406 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (attrs, |
407 | attrs_ser); | 407 | attrs_ser); |
408 | struct GNUNET_SQ_QueryParam sparams[] = { | 408 | struct GNUNET_SQ_QueryParam sparams[] = { |
409 | GNUNET_SQ_query_param_auto_from_type (&ticket->identity), | 409 | GNUNET_SQ_query_param_auto_from_type (&ticket->identity), |
@@ -458,8 +458,8 @@ identity_provider_sqlite_store_ticket (void *cls, | |||
458 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 458 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
459 | */ | 459 | */ |
460 | static int | 460 | static int |
461 | identity_provider_sqlite_delete_ticket (void *cls, | 461 | reclaim_sqlite_delete_ticket (void *cls, |
462 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket) | 462 | const struct GNUNET_RECLAIM_Ticket *ticket) |
463 | { | 463 | { |
464 | struct Plugin *plugin = cls; | 464 | struct Plugin *plugin = cls; |
465 | int n; | 465 | int n; |
@@ -521,11 +521,11 @@ identity_provider_sqlite_delete_ticket (void *cls, | |||
521 | static int | 521 | static int |
522 | get_ticket_and_call_iterator (struct Plugin *plugin, | 522 | get_ticket_and_call_iterator (struct Plugin *plugin, |
523 | sqlite3_stmt *stmt, | 523 | sqlite3_stmt *stmt, |
524 | GNUNET_IDENTITY_PROVIDER_TicketIterator iter, | 524 | GNUNET_RECLAIM_TicketIterator iter, |
525 | void *iter_cls) | 525 | void *iter_cls) |
526 | { | 526 | { |
527 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 527 | struct GNUNET_RECLAIM_Ticket ticket; |
528 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs; | 528 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
529 | int ret; | 529 | int ret; |
530 | int sret; | 530 | int sret; |
531 | size_t attrs_len; | 531 | size_t attrs_len; |
@@ -552,13 +552,13 @@ get_ticket_and_call_iterator (struct Plugin *plugin, | |||
552 | } | 552 | } |
553 | else | 553 | else |
554 | { | 554 | { |
555 | attrs = GNUNET_IDENTITY_ATTRIBUTE_list_deserialize (attrs_ser, | 555 | attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (attrs_ser, |
556 | attrs_len); | 556 | attrs_len); |
557 | if (NULL != iter) | 557 | if (NULL != iter) |
558 | iter (iter_cls, | 558 | iter (iter_cls, |
559 | &ticket, | 559 | &ticket, |
560 | attrs); | 560 | attrs); |
561 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (attrs); | 561 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (attrs); |
562 | ret = GNUNET_YES; | 562 | ret = GNUNET_YES; |
563 | } | 563 | } |
564 | GNUNET_SQ_cleanup_result (rs); | 564 | GNUNET_SQ_cleanup_result (rs); |
@@ -586,9 +586,9 @@ get_ticket_and_call_iterator (struct Plugin *plugin, | |||
586 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 586 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
587 | */ | 587 | */ |
588 | static int | 588 | static int |
589 | identity_provider_sqlite_ticket_get_attrs (void *cls, | 589 | reclaim_sqlite_ticket_get_attrs (void *cls, |
590 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 590 | const struct GNUNET_RECLAIM_Ticket *ticket, |
591 | GNUNET_IDENTITY_PROVIDER_TicketIterator iter, | 591 | GNUNET_RECLAIM_TicketIterator iter, |
592 | void *iter_cls) | 592 | void *iter_cls) |
593 | { | 593 | { |
594 | struct Plugin *plugin = cls; | 594 | struct Plugin *plugin = cls; |
@@ -628,11 +628,11 @@ identity_provider_sqlite_ticket_get_attrs (void *cls, | |||
628 | * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error | 628 | * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error |
629 | */ | 629 | */ |
630 | static int | 630 | static int |
631 | identity_provider_sqlite_iterate_tickets (void *cls, | 631 | reclaim_sqlite_iterate_tickets (void *cls, |
632 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 632 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
633 | int audience, | 633 | int audience, |
634 | uint64_t offset, | 634 | uint64_t offset, |
635 | GNUNET_IDENTITY_PROVIDER_TicketIterator iter, | 635 | GNUNET_RECLAIM_TicketIterator iter, |
636 | void *iter_cls) | 636 | void *iter_cls) |
637 | { | 637 | { |
638 | struct Plugin *plugin = cls; | 638 | struct Plugin *plugin = cls; |
@@ -680,15 +680,15 @@ identity_provider_sqlite_iterate_tickets (void *cls, | |||
680 | /** | 680 | /** |
681 | * Entry point for the plugin. | 681 | * Entry point for the plugin. |
682 | * | 682 | * |
683 | * @param cls the "struct GNUNET_IDENTITY_PROVIDER_PluginEnvironment*" | 683 | * @param cls the "struct GNUNET_RECLAIM_PluginEnvironment*" |
684 | * @return NULL on error, otherwise the plugin context | 684 | * @return NULL on error, otherwise the plugin context |
685 | */ | 685 | */ |
686 | void * | 686 | void * |
687 | libgnunet_plugin_identity_provider_sqlite_init (void *cls) | 687 | libgnunet_plugin_reclaim_sqlite_init (void *cls) |
688 | { | 688 | { |
689 | static struct Plugin plugin; | 689 | static struct Plugin plugin; |
690 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 690 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
691 | struct GNUNET_IDENTITY_PROVIDER_PluginFunctions *api; | 691 | struct GNUNET_RECLAIM_PluginFunctions *api; |
692 | 692 | ||
693 | if (NULL != plugin.cfg) | 693 | if (NULL != plugin.cfg) |
694 | return NULL; /* can only initialize once! */ | 694 | return NULL; /* can only initialize once! */ |
@@ -699,12 +699,12 @@ libgnunet_plugin_identity_provider_sqlite_init (void *cls) | |||
699 | database_shutdown (&plugin); | 699 | database_shutdown (&plugin); |
700 | return NULL; | 700 | return NULL; |
701 | } | 701 | } |
702 | api = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_PluginFunctions); | 702 | api = GNUNET_new (struct GNUNET_RECLAIM_PluginFunctions); |
703 | api->cls = &plugin; | 703 | api->cls = &plugin; |
704 | api->store_ticket = &identity_provider_sqlite_store_ticket; | 704 | api->store_ticket = &reclaim_sqlite_store_ticket; |
705 | api->delete_ticket = &identity_provider_sqlite_delete_ticket; | 705 | api->delete_ticket = &reclaim_sqlite_delete_ticket; |
706 | api->iterate_tickets = &identity_provider_sqlite_iterate_tickets; | 706 | api->iterate_tickets = &reclaim_sqlite_iterate_tickets; |
707 | api->get_ticket_attributes = &identity_provider_sqlite_ticket_get_attrs; | 707 | api->get_ticket_attributes = &reclaim_sqlite_ticket_get_attrs; |
708 | LOG (GNUNET_ERROR_TYPE_INFO, | 708 | LOG (GNUNET_ERROR_TYPE_INFO, |
709 | _("Sqlite database running\n")); | 709 | _("Sqlite database running\n")); |
710 | return api; | 710 | return api; |
@@ -718,9 +718,9 @@ libgnunet_plugin_identity_provider_sqlite_init (void *cls) | |||
718 | * @return always NULL | 718 | * @return always NULL |
719 | */ | 719 | */ |
720 | void * | 720 | void * |
721 | libgnunet_plugin_identity_provider_sqlite_done (void *cls) | 721 | libgnunet_plugin_reclaim_sqlite_done (void *cls) |
722 | { | 722 | { |
723 | struct GNUNET_IDENTITY_PROVIDER_PluginFunctions *api = cls; | 723 | struct GNUNET_RECLAIM_PluginFunctions *api = cls; |
724 | struct Plugin *plugin = api->cls; | 724 | struct Plugin *plugin = api->cls; |
725 | 725 | ||
726 | database_shutdown (plugin); | 726 | database_shutdown (plugin); |
@@ -731,4 +731,4 @@ libgnunet_plugin_identity_provider_sqlite_done (void *cls) | |||
731 | return NULL; | 731 | return NULL; |
732 | } | 732 | } |
733 | 733 | ||
734 | /* end of plugin_identity_provider_sqlite.c */ | 734 | /* end of plugin_reclaim_sqlite.c */ |
diff --git a/src/identity-provider/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index cc4b83dae..abb3f59f5 100644 --- a/src/identity-provider/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #include <jansson.h> | 36 | #include <jansson.h> |
37 | #include <inttypes.h> | 37 | #include <inttypes.h> |
38 | #include "gnunet_signatures.h" | 38 | #include "gnunet_signatures.h" |
39 | #include "gnunet_identity_attribute_lib.h" | 39 | #include "gnunet_reclaim_attribute_lib.h" |
40 | #include "gnunet_identity_provider_service.h" | 40 | #include "gnunet_reclaim_service.h" |
41 | #include "jwt.h" | 41 | #include "jwt.h" |
42 | 42 | ||
43 | /** | 43 | /** |
@@ -68,7 +68,7 @@ | |||
68 | /** | 68 | /** |
69 | * Attribute key | 69 | * Attribute key |
70 | */ | 70 | */ |
71 | #define GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE "attribute" | 71 | #define GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE "attribute" |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * Ticket key | 74 | * Ticket key |
@@ -79,7 +79,7 @@ | |||
79 | /** | 79 | /** |
80 | * Value key | 80 | * Value key |
81 | */ | 81 | */ |
82 | #define GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE_VALUE "value" | 82 | #define GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE_VALUE "value" |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * State while collecting all egos | 85 | * State while collecting all egos |
@@ -359,7 +359,7 @@ struct RequestHandle | |||
359 | /** | 359 | /** |
360 | * Attribute claim list | 360 | * Attribute claim list |
361 | */ | 361 | */ |
362 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attr_list; | 362 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attr_list; |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * IDENTITY Operation | 365 | * IDENTITY Operation |
@@ -369,27 +369,27 @@ struct RequestHandle | |||
369 | /** | 369 | /** |
370 | * Identity Provider | 370 | * Identity Provider |
371 | */ | 371 | */ |
372 | struct GNUNET_IDENTITY_PROVIDER_Handle *idp; | 372 | struct GNUNET_RECLAIM_Handle *idp; |
373 | 373 | ||
374 | /** | 374 | /** |
375 | * Idp Operation | 375 | * Idp Operation |
376 | */ | 376 | */ |
377 | struct GNUNET_IDENTITY_PROVIDER_Operation *idp_op; | 377 | struct GNUNET_RECLAIM_Operation *idp_op; |
378 | 378 | ||
379 | /** | 379 | /** |
380 | * Attribute iterator | 380 | * Attribute iterator |
381 | */ | 381 | */ |
382 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *attr_it; | 382 | struct GNUNET_RECLAIM_AttributeIterator *attr_it; |
383 | 383 | ||
384 | /** | 384 | /** |
385 | * Ticket iterator | 385 | * Ticket iterator |
386 | */ | 386 | */ |
387 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *ticket_it; | 387 | struct GNUNET_RECLAIM_TicketIterator *ticket_it; |
388 | 388 | ||
389 | /** | 389 | /** |
390 | * A ticket | 390 | * A ticket |
391 | */ | 391 | */ |
392 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 392 | struct GNUNET_RECLAIM_Ticket ticket; |
393 | 393 | ||
394 | /** | 394 | /** |
395 | * Desired timeout for the lookup (default is no timeout). | 395 | * Desired timeout for the lookup (default is no timeout). |
@@ -450,8 +450,8 @@ struct RequestHandle | |||
450 | static void | 450 | static void |
451 | cleanup_handle (struct RequestHandle *handle) | 451 | cleanup_handle (struct RequestHandle *handle) |
452 | { | 452 | { |
453 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *claim_entry; | 453 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *claim_entry; |
454 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *claim_tmp; | 454 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *claim_tmp; |
455 | struct EgoEntry *ego_entry; | 455 | struct EgoEntry *ego_entry; |
456 | struct EgoEntry *ego_tmp; | 456 | struct EgoEntry *ego_tmp; |
457 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 457 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -463,11 +463,11 @@ cleanup_handle (struct RequestHandle *handle) | |||
463 | if (NULL != handle->identity_handle) | 463 | if (NULL != handle->identity_handle) |
464 | GNUNET_IDENTITY_disconnect (handle->identity_handle); | 464 | GNUNET_IDENTITY_disconnect (handle->identity_handle); |
465 | if (NULL != handle->attr_it) | 465 | if (NULL != handle->attr_it) |
466 | GNUNET_IDENTITY_PROVIDER_get_attributes_stop (handle->attr_it); | 466 | GNUNET_RECLAIM_get_attributes_stop (handle->attr_it); |
467 | if (NULL != handle->ticket_it) | 467 | if (NULL != handle->ticket_it) |
468 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (handle->ticket_it); | 468 | GNUNET_RECLAIM_ticket_iteration_stop (handle->ticket_it); |
469 | if (NULL != handle->idp) | 469 | if (NULL != handle->idp) |
470 | GNUNET_IDENTITY_PROVIDER_disconnect (handle->idp); | 470 | GNUNET_RECLAIM_disconnect (handle->idp); |
471 | if (NULL != handle->url) | 471 | if (NULL != handle->url) |
472 | GNUNET_free (handle->url); | 472 | GNUNET_free (handle->url); |
473 | if (NULL != handle->tld) | 473 | if (NULL != handle->tld) |
@@ -818,7 +818,7 @@ static void get_client_name_result (void *cls, | |||
818 | char *tmp_prefix; | 818 | char *tmp_prefix; |
819 | char *prefix; | 819 | char *prefix; |
820 | ticket_str = GNUNET_STRINGS_data_to_string_alloc (&handle->ticket, | 820 | ticket_str = GNUNET_STRINGS_data_to_string_alloc (&handle->ticket, |
821 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket)); | 821 | sizeof (struct GNUNET_RECLAIM_Ticket)); |
822 | //TODO change if more attributes are needed (see max_age) | 822 | //TODO change if more attributes are needed (see max_age) |
823 | GNUNET_asprintf (&code_json_string, "{\"ticket\":\"%s\"%s%s%s}", | 823 | GNUNET_asprintf (&code_json_string, "{\"ticket\":\"%s\"%s%s%s}", |
824 | ticket_str, | 824 | ticket_str, |
@@ -869,7 +869,7 @@ get_client_name_error (void *cls) | |||
869 | */ | 869 | */ |
870 | static void | 870 | static void |
871 | oidc_ticket_issue_cb (void* cls, | 871 | oidc_ticket_issue_cb (void* cls, |
872 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket) | 872 | const struct GNUNET_RECLAIM_Ticket *ticket) |
873 | { | 873 | { |
874 | struct RequestHandle *handle = cls; | 874 | struct RequestHandle *handle = cls; |
875 | handle->idp_op = NULL; | 875 | handle->idp_op = NULL; |
@@ -902,7 +902,7 @@ oidc_collect_finished_cb (void *cls) | |||
902 | GNUNET_SCHEDULER_add_now (&do_redirect_error, handle); | 902 | GNUNET_SCHEDULER_add_now (&do_redirect_error, handle); |
903 | return; | 903 | return; |
904 | } | 904 | } |
905 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_ticket_issue (handle->idp, | 905 | handle->idp_op = GNUNET_RECLAIM_ticket_issue (handle->idp, |
906 | &handle->priv_key, | 906 | &handle->priv_key, |
907 | &handle->oidc->client_pkey, | 907 | &handle->oidc->client_pkey, |
908 | handle->attr_list, | 908 | handle->attr_list, |
@@ -917,17 +917,17 @@ oidc_collect_finished_cb (void *cls) | |||
917 | static void | 917 | static void |
918 | oidc_attr_collect (void *cls, | 918 | oidc_attr_collect (void *cls, |
919 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 919 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
920 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 920 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
921 | { | 921 | { |
922 | struct RequestHandle *handle = cls; | 922 | struct RequestHandle *handle = cls; |
923 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 923 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
924 | char* scope_variables; | 924 | char* scope_variables; |
925 | char* scope_variable; | 925 | char* scope_variable; |
926 | char delimiter[]=" "; | 926 | char delimiter[]=" "; |
927 | 927 | ||
928 | if ( (NULL == attr->name) || (NULL == attr->data) ) | 928 | if ( (NULL == attr->name) || (NULL == attr->data) ) |
929 | { | 929 | { |
930 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); | 930 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
931 | return; | 931 | return; |
932 | } | 932 | } |
933 | 933 | ||
@@ -943,18 +943,18 @@ oidc_attr_collect (void *cls, | |||
943 | } | 943 | } |
944 | if ( NULL == scope_variable ) | 944 | if ( NULL == scope_variable ) |
945 | { | 945 | { |
946 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); | 946 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
947 | GNUNET_free(scope_variables); | 947 | GNUNET_free(scope_variables); |
948 | return; | 948 | return; |
949 | } | 949 | } |
950 | GNUNET_free(scope_variables); | 950 | GNUNET_free(scope_variables); |
951 | 951 | ||
952 | le = GNUNET_new(struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | 952 | le = GNUNET_new(struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
953 | le->claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (attr->name, attr->type, | 953 | le->claim = GNUNET_RECLAIM_ATTRIBUTE_claim_new (attr->name, attr->type, |
954 | attr->data, attr->data_size); | 954 | attr->data, attr->data_size); |
955 | GNUNET_CONTAINER_DLL_insert(handle->attr_list->list_head, | 955 | GNUNET_CONTAINER_DLL_insert(handle->attr_list->list_head, |
956 | handle->attr_list->list_tail, le); | 956 | handle->attr_list->list_tail, le); |
957 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); | 957 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
958 | } | 958 | } |
959 | 959 | ||
960 | 960 | ||
@@ -1007,10 +1007,10 @@ login_check (void *cls) | |||
1007 | handle->priv_key = *GNUNET_IDENTITY_ego_get_private_key ( | 1007 | handle->priv_key = *GNUNET_IDENTITY_ego_get_private_key ( |
1008 | handle->ego_entry->ego); | 1008 | handle->ego_entry->ego); |
1009 | handle->resp_object = GNUNET_JSONAPI_document_new (); | 1009 | handle->resp_object = GNUNET_JSONAPI_document_new (); |
1010 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 1010 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
1011 | handle->attr_list = GNUNET_new( | 1011 | handle->attr_list = GNUNET_new( |
1012 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 1012 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
1013 | handle->attr_it = GNUNET_IDENTITY_PROVIDER_get_attributes_start ( | 1013 | handle->attr_it = GNUNET_RECLAIM_get_attributes_start ( |
1014 | handle->idp, &handle->priv_key, &oidc_iteration_error, handle, | 1014 | handle->idp, &handle->priv_key, &oidc_iteration_error, handle, |
1015 | &oidc_attr_collect, handle, &oidc_collect_finished_cb, handle); | 1015 | &oidc_attr_collect, handle, &oidc_collect_finished_cb, handle); |
1016 | return; | 1016 | return; |
@@ -1616,12 +1616,12 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1616 | return; | 1616 | return; |
1617 | } | 1617 | } |
1618 | 1618 | ||
1619 | struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket = GNUNET_new(struct GNUNET_IDENTITY_PROVIDER_Ticket); | 1619 | struct GNUNET_RECLAIM_Ticket *ticket = GNUNET_new(struct GNUNET_RECLAIM_Ticket); |
1620 | if ( GNUNET_OK | 1620 | if ( GNUNET_OK |
1621 | != GNUNET_STRINGS_string_to_data (json_string_value(ticket_string), | 1621 | != GNUNET_STRINGS_string_to_data (json_string_value(ticket_string), |
1622 | strlen (json_string_value(ticket_string)), | 1622 | strlen (json_string_value(ticket_string)), |
1623 | ticket, | 1623 | ticket, |
1624 | sizeof(struct GNUNET_IDENTITY_PROVIDER_Ticket))) | 1624 | sizeof(struct GNUNET_RECLAIM_Ticket))) |
1625 | { | 1625 | { |
1626 | GNUNET_free_non_null(user_psw); | 1626 | GNUNET_free_non_null(user_psw); |
1627 | handle->emsg = GNUNET_strdup("invalid_request"); | 1627 | handle->emsg = GNUNET_strdup("invalid_request"); |
@@ -1660,11 +1660,11 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1660 | return; | 1660 | return; |
1661 | } | 1661 | } |
1662 | 1662 | ||
1663 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *cl = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); | 1663 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *cl = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList); |
1664 | //aud REQUIRED public key client_id must be there | 1664 | //aud REQUIRED public key client_id must be there |
1665 | GNUNET_IDENTITY_ATTRIBUTE_list_add(cl, | 1665 | GNUNET_RECLAIM_ATTRIBUTE_list_add(cl, |
1666 | "aud", | 1666 | "aud", |
1667 | GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING, | 1667 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
1668 | client_id, | 1668 | client_id, |
1669 | strlen(client_id)); | 1669 | strlen(client_id)); |
1670 | //exp REQUIRED time expired from config | 1670 | //exp REQUIRED time expired from config |
@@ -1672,34 +1672,34 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1672 | GNUNET_TIME_relative_multiply (GNUNET_TIME_relative_get_second_ (), | 1672 | GNUNET_TIME_relative_multiply (GNUNET_TIME_relative_get_second_ (), |
1673 | expiration_time)); | 1673 | expiration_time)); |
1674 | const char* exp_time_string = GNUNET_STRINGS_absolute_time_to_string(exp_time); | 1674 | const char* exp_time_string = GNUNET_STRINGS_absolute_time_to_string(exp_time); |
1675 | GNUNET_IDENTITY_ATTRIBUTE_list_add (cl, | 1675 | GNUNET_RECLAIM_ATTRIBUTE_list_add (cl, |
1676 | "exp", | 1676 | "exp", |
1677 | GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING, | 1677 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
1678 | exp_time_string, | 1678 | exp_time_string, |
1679 | strlen(exp_time_string)); | 1679 | strlen(exp_time_string)); |
1680 | //iat REQUIRED time now | 1680 | //iat REQUIRED time now |
1681 | struct GNUNET_TIME_Absolute time_now = GNUNET_TIME_absolute_get(); | 1681 | struct GNUNET_TIME_Absolute time_now = GNUNET_TIME_absolute_get(); |
1682 | const char* time_now_string = GNUNET_STRINGS_absolute_time_to_string(time_now); | 1682 | const char* time_now_string = GNUNET_STRINGS_absolute_time_to_string(time_now); |
1683 | GNUNET_IDENTITY_ATTRIBUTE_list_add (cl, | 1683 | GNUNET_RECLAIM_ATTRIBUTE_list_add (cl, |
1684 | "iat", | 1684 | "iat", |
1685 | GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING, | 1685 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
1686 | time_now_string, | 1686 | time_now_string, |
1687 | strlen(time_now_string)); | 1687 | strlen(time_now_string)); |
1688 | //nonce only if nonce is provided | 1688 | //nonce only if nonce is provided |
1689 | if ( NULL != nonce && json_is_string(nonce) ) | 1689 | if ( NULL != nonce && json_is_string(nonce) ) |
1690 | { | 1690 | { |
1691 | GNUNET_IDENTITY_ATTRIBUTE_list_add (cl, | 1691 | GNUNET_RECLAIM_ATTRIBUTE_list_add (cl, |
1692 | "nonce", | 1692 | "nonce", |
1693 | GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING, | 1693 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
1694 | json_string_value(nonce), | 1694 | json_string_value(nonce), |
1695 | strlen(json_string_value(nonce))); | 1695 | strlen(json_string_value(nonce))); |
1696 | } | 1696 | } |
1697 | //auth_time only if max_age is provided | 1697 | //auth_time only if max_age is provided |
1698 | if ( NULL != max_age && json_is_string(max_age) ) | 1698 | if ( NULL != max_age && json_is_string(max_age) ) |
1699 | { | 1699 | { |
1700 | GNUNET_IDENTITY_ATTRIBUTE_list_add (cl, | 1700 | GNUNET_RECLAIM_ATTRIBUTE_list_add (cl, |
1701 | "auth_time", | 1701 | "auth_time", |
1702 | GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING, | 1702 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
1703 | json_string_value(max_age), | 1703 | json_string_value(max_age), |
1704 | strlen(json_string_value(max_age))); | 1704 | strlen(json_string_value(max_age))); |
1705 | } | 1705 | } |
@@ -1781,7 +1781,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1781 | MHD_add_response_header (resp, "Content-Type", "application/json"); | 1781 | MHD_add_response_header (resp, "Content-Type", "application/json"); |
1782 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 1782 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
1783 | 1783 | ||
1784 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy(cl); | 1784 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy(cl); |
1785 | GNUNET_free(access_token_number); | 1785 | GNUNET_free(access_token_number); |
1786 | GNUNET_free(access_token); | 1786 | GNUNET_free(access_token); |
1787 | GNUNET_free(user_psw); | 1787 | GNUNET_free(user_psw); |
@@ -1798,7 +1798,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1798 | static void | 1798 | static void |
1799 | consume_ticket (void *cls, | 1799 | consume_ticket (void *cls, |
1800 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 1800 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
1801 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 1801 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
1802 | { | 1802 | { |
1803 | struct RequestHandle *handle = cls; | 1803 | struct RequestHandle *handle = cls; |
1804 | char *tmp_value; | 1804 | char *tmp_value; |
@@ -1810,7 +1810,7 @@ consume_ticket (void *cls, | |||
1810 | return; | 1810 | return; |
1811 | } | 1811 | } |
1812 | 1812 | ||
1813 | tmp_value = GNUNET_IDENTITY_ATTRIBUTE_value_to_string (attr->type, | 1813 | tmp_value = GNUNET_RECLAIM_ATTRIBUTE_value_to_string (attr->type, |
1814 | attr->data, | 1814 | attr->data, |
1815 | attr->data_size); | 1815 | attr->data_size); |
1816 | 1816 | ||
@@ -1841,7 +1841,7 @@ userinfo_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1841 | struct GNUNET_HashCode cache_key; | 1841 | struct GNUNET_HashCode cache_key; |
1842 | char *authorization, *authorization_type, *authorization_access_token; | 1842 | char *authorization, *authorization_type, *authorization_access_token; |
1843 | char *client_ticket, *client, *ticket_str; | 1843 | char *client_ticket, *client, *ticket_str; |
1844 | struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket; | 1844 | struct GNUNET_RECLAIM_Ticket *ticket; |
1845 | 1845 | ||
1846 | GNUNET_CRYPTO_hash (OIDC_AUTHORIZATION_HEADER_KEY, | 1846 | GNUNET_CRYPTO_hash (OIDC_AUTHORIZATION_HEADER_KEY, |
1847 | strlen (OIDC_AUTHORIZATION_HEADER_KEY), | 1847 | strlen (OIDC_AUTHORIZATION_HEADER_KEY), |
@@ -1939,12 +1939,12 @@ userinfo_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1939 | GNUNET_free(client_ticket); | 1939 | GNUNET_free(client_ticket); |
1940 | return; | 1940 | return; |
1941 | } | 1941 | } |
1942 | ticket = GNUNET_new(struct GNUNET_IDENTITY_PROVIDER_Ticket); | 1942 | ticket = GNUNET_new(struct GNUNET_RECLAIM_Ticket); |
1943 | if ( GNUNET_OK | 1943 | if ( GNUNET_OK |
1944 | != GNUNET_STRINGS_string_to_data (ticket_str, | 1944 | != GNUNET_STRINGS_string_to_data (ticket_str, |
1945 | strlen (ticket_str), | 1945 | strlen (ticket_str), |
1946 | ticket, | 1946 | ticket, |
1947 | sizeof(struct GNUNET_IDENTITY_PROVIDER_Ticket))) | 1947 | sizeof(struct GNUNET_RECLAIM_Ticket))) |
1948 | { | 1948 | { |
1949 | handle->emsg = GNUNET_strdup("invalid_token"); | 1949 | handle->emsg = GNUNET_strdup("invalid_token"); |
1950 | handle->edesc = GNUNET_strdup("The Access Token expired"); | 1950 | handle->edesc = GNUNET_strdup("The Access Token expired"); |
@@ -1956,10 +1956,10 @@ userinfo_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1956 | return; | 1956 | return; |
1957 | } | 1957 | } |
1958 | 1958 | ||
1959 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 1959 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
1960 | handle->oidc->response = json_object(); | 1960 | handle->oidc->response = json_object(); |
1961 | json_object_set_new( handle->oidc->response, "sub", json_string( handle->ego_entry->keystring)); | 1961 | json_object_set_new( handle->oidc->response, "sub", json_string( handle->ego_entry->keystring)); |
1962 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_ticket_consume ( | 1962 | handle->idp_op = GNUNET_RECLAIM_ticket_consume ( |
1963 | handle->idp, | 1963 | handle->idp, |
1964 | GNUNET_IDENTITY_ego_get_private_key (handle->ego_entry->ego), | 1964 | GNUNET_IDENTITY_ego_get_private_key (handle->ego_entry->ego), |
1965 | ticket, | 1965 | ticket, |
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/reclaim/plugin_rest_reclaim.c index f8176a101..b54aed5f3 100644 --- a/src/identity-provider/plugin_rest_identity_provider.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -18,8 +18,8 @@ | |||
18 | /** | 18 | /** |
19 | * @author Martin Schanzenbach | 19 | * @author Martin Schanzenbach |
20 | * @author Philippe Buschmann | 20 | * @author Philippe Buschmann |
21 | * @file identity/plugin_rest_identity.c | 21 | * @file reclaim/plugin_rest_reclaim.c |
22 | * @brief GNUnet Namestore REST plugin | 22 | * @brief GNUnet reclaim REST plugin |
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
@@ -36,18 +36,18 @@ | |||
36 | #include <jansson.h> | 36 | #include <jansson.h> |
37 | #include <inttypes.h> | 37 | #include <inttypes.h> |
38 | #include "gnunet_signatures.h" | 38 | #include "gnunet_signatures.h" |
39 | #include "gnunet_identity_attribute_lib.h" | 39 | #include "gnunet_reclaim_attribute_lib.h" |
40 | #include "gnunet_identity_provider_service.h" | 40 | #include "gnunet_reclaim_service.h" |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * REST root namespace | 43 | * REST root namespace |
44 | */ | 44 | */ |
45 | #define GNUNET_REST_API_NS_IDENTITY_PROVIDER "/idp" | 45 | #define GNUNET_REST_API_NS_RECLAIM "/idp" |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Attribute namespace | 48 | * Attribute namespace |
49 | */ | 49 | */ |
50 | #define GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES "/idp/attributes" | 50 | #define GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES "/idp/attributes" |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Ticket namespace | 53 | * Ticket namespace |
@@ -67,7 +67,7 @@ | |||
67 | /** | 67 | /** |
68 | * Attribute key | 68 | * Attribute key |
69 | */ | 69 | */ |
70 | #define GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE "attribute" | 70 | #define GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE "attribute" |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * Ticket key | 73 | * Ticket key |
@@ -78,7 +78,7 @@ | |||
78 | /** | 78 | /** |
79 | * Value key | 79 | * Value key |
80 | */ | 80 | */ |
81 | #define GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE_VALUE "value" | 81 | #define GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE_VALUE "value" |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * State while collecting all egos | 84 | * State while collecting all egos |
@@ -190,7 +190,7 @@ struct RequestHandle | |||
190 | /** | 190 | /** |
191 | * Attribute claim list | 191 | * Attribute claim list |
192 | */ | 192 | */ |
193 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attr_list; | 193 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attr_list; |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * IDENTITY Operation | 196 | * IDENTITY Operation |
@@ -200,27 +200,27 @@ struct RequestHandle | |||
200 | /** | 200 | /** |
201 | * Identity Provider | 201 | * Identity Provider |
202 | */ | 202 | */ |
203 | struct GNUNET_IDENTITY_PROVIDER_Handle *idp; | 203 | struct GNUNET_RECLAIM_Handle *idp; |
204 | 204 | ||
205 | /** | 205 | /** |
206 | * Idp Operation | 206 | * Idp Operation |
207 | */ | 207 | */ |
208 | struct GNUNET_IDENTITY_PROVIDER_Operation *idp_op; | 208 | struct GNUNET_RECLAIM_Operation *idp_op; |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * Attribute iterator | 211 | * Attribute iterator |
212 | */ | 212 | */ |
213 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *attr_it; | 213 | struct GNUNET_RECLAIM_AttributeIterator *attr_it; |
214 | 214 | ||
215 | /** | 215 | /** |
216 | * Ticket iterator | 216 | * Ticket iterator |
217 | */ | 217 | */ |
218 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *ticket_it; | 218 | struct GNUNET_RECLAIM_TicketIterator *ticket_it; |
219 | 219 | ||
220 | /** | 220 | /** |
221 | * A ticket | 221 | * A ticket |
222 | */ | 222 | */ |
223 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 223 | struct GNUNET_RECLAIM_Ticket ticket; |
224 | 224 | ||
225 | /** | 225 | /** |
226 | * Desired timeout for the lookup (default is no timeout). | 226 | * Desired timeout for the lookup (default is no timeout). |
@@ -271,8 +271,8 @@ struct RequestHandle | |||
271 | static void | 271 | static void |
272 | cleanup_handle (struct RequestHandle *handle) | 272 | cleanup_handle (struct RequestHandle *handle) |
273 | { | 273 | { |
274 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *claim_entry; | 274 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *claim_entry; |
275 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *claim_tmp; | 275 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *claim_tmp; |
276 | struct EgoEntry *ego_entry; | 276 | struct EgoEntry *ego_entry; |
277 | struct EgoEntry *ego_tmp; | 277 | struct EgoEntry *ego_tmp; |
278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -284,11 +284,11 @@ cleanup_handle (struct RequestHandle *handle) | |||
284 | if (NULL != handle->identity_handle) | 284 | if (NULL != handle->identity_handle) |
285 | GNUNET_IDENTITY_disconnect (handle->identity_handle); | 285 | GNUNET_IDENTITY_disconnect (handle->identity_handle); |
286 | if (NULL != handle->attr_it) | 286 | if (NULL != handle->attr_it) |
287 | GNUNET_IDENTITY_PROVIDER_get_attributes_stop (handle->attr_it); | 287 | GNUNET_RECLAIM_get_attributes_stop (handle->attr_it); |
288 | if (NULL != handle->ticket_it) | 288 | if (NULL != handle->ticket_it) |
289 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (handle->ticket_it); | 289 | GNUNET_RECLAIM_ticket_iteration_stop (handle->ticket_it); |
290 | if (NULL != handle->idp) | 290 | if (NULL != handle->idp) |
291 | GNUNET_IDENTITY_PROVIDER_disconnect (handle->idp); | 291 | GNUNET_RECLAIM_disconnect (handle->idp); |
292 | if (NULL != handle->url) | 292 | if (NULL != handle->url) |
293 | GNUNET_free (handle->url); | 293 | GNUNET_free (handle->url); |
294 | if (NULL != handle->emsg) | 294 | if (NULL != handle->emsg) |
@@ -435,7 +435,7 @@ collect_finished_cb (void *cls) | |||
435 | */ | 435 | */ |
436 | static void | 436 | static void |
437 | ticket_collect (void *cls, | 437 | ticket_collect (void *cls, |
438 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket) | 438 | const struct GNUNET_RECLAIM_Ticket *ticket) |
439 | { | 439 | { |
440 | struct GNUNET_JSONAPI_Resource *json_resource; | 440 | struct GNUNET_JSONAPI_Resource *json_resource; |
441 | struct RequestHandle *handle = cls; | 441 | struct RequestHandle *handle = cls; |
@@ -474,7 +474,7 @@ ticket_collect (void *cls, | |||
474 | value); | 474 | value); |
475 | GNUNET_free (tmp); | 475 | GNUNET_free (tmp); |
476 | json_decref (value); | 476 | json_decref (value); |
477 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_next (handle->ticket_it); | 477 | GNUNET_RECLAIM_ticket_iteration_next (handle->ticket_it); |
478 | } | 478 | } |
479 | 479 | ||
480 | 480 | ||
@@ -523,8 +523,8 @@ list_tickets_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
523 | return; | 523 | return; |
524 | } | 524 | } |
525 | priv_key = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); | 525 | priv_key = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); |
526 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 526 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
527 | handle->ticket_it = GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (handle->idp, | 527 | handle->ticket_it = GNUNET_RECLAIM_ticket_iteration_start (handle->idp, |
528 | priv_key, | 528 | priv_key, |
529 | &collect_error_cb, | 529 | &collect_error_cb, |
530 | handle, | 530 | handle, |
@@ -549,7 +549,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
549 | struct RequestHandle *handle = cls; | 549 | struct RequestHandle *handle = cls; |
550 | struct EgoEntry *ego_entry; | 550 | struct EgoEntry *ego_entry; |
551 | struct MHD_Response *resp; | 551 | struct MHD_Response *resp; |
552 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attribute; | 552 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attribute; |
553 | struct GNUNET_JSONAPI_Document *json_obj; | 553 | struct GNUNET_JSONAPI_Document *json_obj; |
554 | struct GNUNET_JSONAPI_Resource *json_res; | 554 | struct GNUNET_JSONAPI_Resource *json_res; |
555 | struct GNUNET_TIME_Relative exp; | 555 | struct GNUNET_TIME_Relative exp; |
@@ -565,14 +565,14 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
565 | 565 | ||
566 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding an attribute for %s.\n", | 566 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding an attribute for %s.\n", |
567 | handle->url); | 567 | handle->url); |
568 | if ( strlen (GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES) >= | 568 | if ( strlen (GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES) >= |
569 | strlen (handle->url)) | 569 | strlen (handle->url)) |
570 | { | 570 | { |
571 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No identity given.\n"); | 571 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No identity given.\n"); |
572 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 572 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
573 | return; | 573 | return; |
574 | } | 574 | } |
575 | identity = handle->url + strlen (GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES) + 1; | 575 | identity = handle->url + strlen (GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES) + 1; |
576 | 576 | ||
577 | for (ego_entry = handle->ego_head; | 577 | for (ego_entry = handle->ego_head; |
578 | NULL != ego_entry; | 578 | NULL != ego_entry; |
@@ -625,7 +625,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
625 | } | 625 | } |
626 | json_res = GNUNET_JSONAPI_document_get_resource (json_obj, 0); | 626 | json_res = GNUNET_JSONAPI_document_get_resource (json_obj, 0); |
627 | if (GNUNET_NO == GNUNET_JSONAPI_resource_check_type (json_res, | 627 | if (GNUNET_NO == GNUNET_JSONAPI_resource_check_type (json_res, |
628 | GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE)) | 628 | GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE)) |
629 | { | 629 | { |
630 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 630 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
631 | "Unsupported JSON data type\n"); | 631 | "Unsupported JSON data type\n"); |
@@ -651,12 +651,12 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
651 | value_json = GNUNET_JSONAPI_resource_read_attr (json_res, | 651 | value_json = GNUNET_JSONAPI_resource_read_attr (json_res, |
652 | "value"); | 652 | "value"); |
653 | value_str = json_string_value (value_json); | 653 | value_str = json_string_value (value_json); |
654 | attribute = GNUNET_IDENTITY_ATTRIBUTE_claim_new (name_str, | 654 | attribute = GNUNET_RECLAIM_ATTRIBUTE_claim_new (name_str, |
655 | GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING, | 655 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
656 | value_str, | 656 | value_str, |
657 | strlen (value_str) + 1); | 657 | strlen (value_str) + 1); |
658 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 658 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
659 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (handle->idp, | 659 | handle->idp_op = GNUNET_RECLAIM_attribute_store (handle->idp, |
660 | identity_priv, | 660 | identity_priv, |
661 | attribute, | 661 | attribute, |
662 | &exp, | 662 | &exp, |
@@ -675,7 +675,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
675 | static void | 675 | static void |
676 | attr_collect (void *cls, | 676 | attr_collect (void *cls, |
677 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 677 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
678 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 678 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
679 | { | 679 | { |
680 | struct GNUNET_JSONAPI_Resource *json_resource; | 680 | struct GNUNET_JSONAPI_Resource *json_resource; |
681 | struct RequestHandle *handle = cls; | 681 | struct RequestHandle *handle = cls; |
@@ -684,17 +684,17 @@ attr_collect (void *cls, | |||
684 | 684 | ||
685 | if ((NULL == attr->name) || (NULL == attr->data)) | 685 | if ((NULL == attr->name) || (NULL == attr->data)) |
686 | { | 686 | { |
687 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); | 687 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
688 | return; | 688 | return; |
689 | } | 689 | } |
690 | 690 | ||
691 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", | 691 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", |
692 | attr->name); | 692 | attr->name); |
693 | json_resource = GNUNET_JSONAPI_resource_new (GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE, | 693 | json_resource = GNUNET_JSONAPI_resource_new (GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE, |
694 | attr->name); | 694 | attr->name); |
695 | GNUNET_JSONAPI_document_resource_add (handle->resp_object, json_resource); | 695 | GNUNET_JSONAPI_document_resource_add (handle->resp_object, json_resource); |
696 | 696 | ||
697 | tmp_value = GNUNET_IDENTITY_ATTRIBUTE_value_to_string (attr->type, | 697 | tmp_value = GNUNET_RECLAIM_ATTRIBUTE_value_to_string (attr->type, |
698 | attr->data, | 698 | attr->data, |
699 | attr->data_size); | 699 | attr->data_size); |
700 | 700 | ||
@@ -705,7 +705,7 @@ attr_collect (void *cls, | |||
705 | value); | 705 | value); |
706 | json_decref (value); | 706 | json_decref (value); |
707 | GNUNET_free(tmp_value); | 707 | GNUNET_free(tmp_value); |
708 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); | 708 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
709 | } | 709 | } |
710 | 710 | ||
711 | 711 | ||
@@ -729,14 +729,14 @@ list_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
729 | 729 | ||
730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Getting attributes for %s.\n", | 730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Getting attributes for %s.\n", |
731 | handle->url); | 731 | handle->url); |
732 | if ( strlen (GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES) >= | 732 | if ( strlen (GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES) >= |
733 | strlen (handle->url)) | 733 | strlen (handle->url)) |
734 | { | 734 | { |
735 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No identity given.\n"); | 735 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No identity given.\n"); |
736 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 736 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
737 | return; | 737 | return; |
738 | } | 738 | } |
739 | identity = handle->url + strlen (GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES) + 1; | 739 | identity = handle->url + strlen (GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES) + 1; |
740 | 740 | ||
741 | for (ego_entry = handle->ego_head; | 741 | for (ego_entry = handle->ego_head; |
742 | NULL != ego_entry; | 742 | NULL != ego_entry; |
@@ -755,8 +755,8 @@ list_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
755 | return; | 755 | return; |
756 | } | 756 | } |
757 | priv_key = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); | 757 | priv_key = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); |
758 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 758 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
759 | handle->attr_it = GNUNET_IDENTITY_PROVIDER_get_attributes_start (handle->idp, | 759 | handle->attr_it = GNUNET_RECLAIM_get_attributes_start (handle->idp, |
760 | priv_key, | 760 | priv_key, |
761 | &collect_error_cb, | 761 | &collect_error_cb, |
762 | handle, | 762 | handle, |
@@ -780,7 +780,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
780 | struct RequestHandle *handle = cls; | 780 | struct RequestHandle *handle = cls; |
781 | struct EgoEntry *ego_entry; | 781 | struct EgoEntry *ego_entry; |
782 | struct MHD_Response *resp; | 782 | struct MHD_Response *resp; |
783 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 783 | struct GNUNET_RECLAIM_Ticket ticket; |
784 | struct GNUNET_JSONAPI_Document *json_obj; | 784 | struct GNUNET_JSONAPI_Document *json_obj; |
785 | struct GNUNET_JSONAPI_Resource *json_res; | 785 | struct GNUNET_JSONAPI_Resource *json_res; |
786 | struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk; | 786 | struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk; |
@@ -884,8 +884,8 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
884 | } | 884 | } |
885 | identity_priv = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); | 885 | identity_priv = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); |
886 | 886 | ||
887 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 887 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
888 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_ticket_revoke (handle->idp, | 888 | handle->idp_op = GNUNET_RECLAIM_ticket_revoke (handle->idp, |
889 | identity_priv, | 889 | identity_priv, |
890 | &ticket, | 890 | &ticket, |
891 | &finished_cont, | 891 | &finished_cont, |
@@ -896,7 +896,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
896 | static void | 896 | static void |
897 | consume_cont (void *cls, | 897 | consume_cont (void *cls, |
898 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 898 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
899 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr) | 899 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
900 | { | 900 | { |
901 | struct RequestHandle *handle = cls; | 901 | struct RequestHandle *handle = cls; |
902 | struct GNUNET_JSONAPI_Resource *json_resource; | 902 | struct GNUNET_JSONAPI_Resource *json_resource; |
@@ -910,7 +910,7 @@ consume_cont (void *cls, | |||
910 | 910 | ||
911 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", | 911 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", |
912 | attr->name); | 912 | attr->name); |
913 | json_resource = GNUNET_JSONAPI_resource_new (GNUNET_REST_JSONAPI_IDENTITY_ATTRIBUTE, | 913 | json_resource = GNUNET_JSONAPI_resource_new (GNUNET_REST_JSONAPI_RECLAIM_ATTRIBUTE, |
914 | attr->name); | 914 | attr->name); |
915 | GNUNET_JSONAPI_document_resource_add (handle->resp_object, json_resource); | 915 | GNUNET_JSONAPI_document_resource_add (handle->resp_object, json_resource); |
916 | 916 | ||
@@ -934,7 +934,7 @@ consume_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
934 | struct RequestHandle *handle = cls; | 934 | struct RequestHandle *handle = cls; |
935 | struct EgoEntry *ego_entry; | 935 | struct EgoEntry *ego_entry; |
936 | struct MHD_Response *resp; | 936 | struct MHD_Response *resp; |
937 | struct GNUNET_IDENTITY_PROVIDER_Ticket ticket; | 937 | struct GNUNET_RECLAIM_Ticket ticket; |
938 | struct GNUNET_JSONAPI_Document *json_obj; | 938 | struct GNUNET_JSONAPI_Document *json_obj; |
939 | struct GNUNET_JSONAPI_Resource *json_res; | 939 | struct GNUNET_JSONAPI_Resource *json_res; |
940 | struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk; | 940 | struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk; |
@@ -1038,8 +1038,8 @@ consume_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1038 | } | 1038 | } |
1039 | identity_priv = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); | 1039 | identity_priv = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); |
1040 | handle->resp_object = GNUNET_JSONAPI_document_new (); | 1040 | handle->resp_object = GNUNET_JSONAPI_document_new (); |
1041 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 1041 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
1042 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_ticket_consume (handle->idp, | 1042 | handle->idp_op = GNUNET_RECLAIM_ticket_consume (handle->idp, |
1043 | identity_priv, | 1043 | identity_priv, |
1044 | &ticket, | 1044 | &ticket, |
1045 | &consume_cont, | 1045 | &consume_cont, |
@@ -1084,12 +1084,12 @@ init_cont (struct RequestHandle *handle) | |||
1084 | { | 1084 | { |
1085 | struct GNUNET_REST_RequestHandlerError err; | 1085 | struct GNUNET_REST_RequestHandlerError err; |
1086 | static const struct GNUNET_REST_RequestHandler handlers[] = { | 1086 | static const struct GNUNET_REST_RequestHandler handlers[] = { |
1087 | {MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES, &list_attribute_cont}, | 1087 | {MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, &list_attribute_cont}, |
1088 | {MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_IDENTITY_ATTRIBUTES, &add_attribute_cont}, | 1088 | {MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, &add_attribute_cont}, |
1089 | {MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_IDENTITY_TICKETS, &list_tickets_cont}, | 1089 | {MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_IDENTITY_TICKETS, &list_tickets_cont}, |
1090 | {MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_IDENTITY_REVOKE, &revoke_ticket_cont}, | 1090 | {MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_IDENTITY_REVOKE, &revoke_ticket_cont}, |
1091 | {MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_IDENTITY_CONSUME, &consume_ticket_cont}, | 1091 | {MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_IDENTITY_CONSUME, &consume_ticket_cont}, |
1092 | {MHD_HTTP_METHOD_OPTIONS, GNUNET_REST_API_NS_IDENTITY_PROVIDER, | 1092 | {MHD_HTTP_METHOD_OPTIONS, GNUNET_REST_API_NS_RECLAIM, |
1093 | &options_cont}, | 1093 | &options_cont}, |
1094 | GNUNET_REST_HANDLER_END | 1094 | GNUNET_REST_HANDLER_END |
1095 | }; | 1095 | }; |
@@ -1202,7 +1202,7 @@ rest_identity_process_request(struct GNUNET_REST_RequestHandle *rest_handle, | |||
1202 | * @return NULL on error, otherwise the plugin context | 1202 | * @return NULL on error, otherwise the plugin context |
1203 | */ | 1203 | */ |
1204 | void * | 1204 | void * |
1205 | libgnunet_plugin_rest_identity_provider_init (void *cls) | 1205 | libgnunet_plugin_rest_reclaim_init (void *cls) |
1206 | { | 1206 | { |
1207 | static struct Plugin plugin; | 1207 | static struct Plugin plugin; |
1208 | struct GNUNET_REST_Plugin *api; | 1208 | struct GNUNET_REST_Plugin *api; |
@@ -1214,7 +1214,7 @@ libgnunet_plugin_rest_identity_provider_init (void *cls) | |||
1214 | plugin.cfg = cfg; | 1214 | plugin.cfg = cfg; |
1215 | api = GNUNET_new (struct GNUNET_REST_Plugin); | 1215 | api = GNUNET_new (struct GNUNET_REST_Plugin); |
1216 | api->cls = &plugin; | 1216 | api->cls = &plugin; |
1217 | api->name = GNUNET_REST_API_NS_IDENTITY_PROVIDER; | 1217 | api->name = GNUNET_REST_API_NS_RECLAIM; |
1218 | api->process_request = &rest_identity_process_request; | 1218 | api->process_request = &rest_identity_process_request; |
1219 | GNUNET_asprintf (&allow_methods, | 1219 | GNUNET_asprintf (&allow_methods, |
1220 | "%s, %s, %s, %s, %s", | 1220 | "%s, %s, %s, %s, %s", |
@@ -1237,7 +1237,7 @@ libgnunet_plugin_rest_identity_provider_init (void *cls) | |||
1237 | * @return always NULL | 1237 | * @return always NULL |
1238 | */ | 1238 | */ |
1239 | void * | 1239 | void * |
1240 | libgnunet_plugin_rest_identity_provider_done (void *cls) | 1240 | libgnunet_plugin_rest_reclaim_done (void *cls) |
1241 | { | 1241 | { |
1242 | struct GNUNET_REST_Plugin *api = cls; | 1242 | struct GNUNET_REST_Plugin *api = cls; |
1243 | struct Plugin *plugin = api->cls; | 1243 | struct Plugin *plugin = api->cls; |
@@ -1250,4 +1250,4 @@ libgnunet_plugin_rest_identity_provider_done (void *cls) | |||
1250 | return NULL; | 1250 | return NULL; |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | /* end of plugin_rest_identity_provider.c */ | 1253 | /* end of plugin_rest_reclaim.c */ |
diff --git a/src/identity-provider/identity-provider.conf b/src/reclaim/reclaim.conf index 99c0a50be..e93899e05 100644 --- a/src/identity-provider/identity-provider.conf +++ b/src/reclaim/reclaim.conf | |||
@@ -1,23 +1,23 @@ | |||
1 | [identity-provider] | 1 | [reclaim] |
2 | START_ON_DEMAND = NO | 2 | START_ON_DEMAND = NO |
3 | RUN_PER_USER = YES | 3 | RUN_PER_USER = YES |
4 | #PORT = 2108 | 4 | #PORT = 2108 |
5 | HOSTNAME = localhost | 5 | HOSTNAME = localhost |
6 | BINARY = gnunet-service-identity-provider | 6 | BINARY = gnunet-service-reclaim |
7 | ACCEPT_FROM = 127.0.0.1; | 7 | ACCEPT_FROM = 127.0.0.1; |
8 | ACCEPT_FROM6 = ::1; | 8 | ACCEPT_FROM6 = ::1; |
9 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-identity-provider.sock | 9 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-reclaim.sock |
10 | UNIX_MATCH_UID = NO | 10 | UNIX_MATCH_UID = NO |
11 | UNIX_MATCH_GID = YES | 11 | UNIX_MATCH_GID = YES |
12 | TOKEN_EXPIRATION_INTERVAL = 30 m | 12 | TOKEN_EXPIRATION_INTERVAL = 30 m |
13 | DATABASE = sqlite | 13 | DATABASE = sqlite |
14 | 14 | ||
15 | [identity-rest-plugin] | 15 | [reclaim-rest-plugin] |
16 | #ADDRESS = https://identity.gnu:8000#/login | 16 | #ADDRESS = https://identity.gnu:8000#/login |
17 | ADDRESS = https://reclaim.ui/#/login | 17 | ADDRESS = https://reclaim.ui/#/login |
18 | PSW = secret | 18 | PSW = secret |
19 | JWT_SECRET = secret | 19 | JWT_SECRET = secret |
20 | EXPIRATION_TIME = 3600 | 20 | EXPIRATION_TIME = 3600 |
21 | 21 | ||
22 | [identity-provider-sqlite] | 22 | [reclaim-sqlite] |
23 | FILENAME = $GNUNET_DATA_HOME/identity-provider/sqlite.db | 23 | FILENAME = $GNUNET_DATA_HOME/reclaim/sqlite.db |
diff --git a/src/identity-provider/identity_provider.h b/src/reclaim/reclaim.h index 6a4b7769f..d2c84686d 100644 --- a/src/identity-provider/identity_provider.h +++ b/src/reclaim/reclaim.h | |||
@@ -18,13 +18,13 @@ | |||
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @author Martin Schanzenbach | 20 | * @author Martin Schanzenbach |
21 | * @file identity-provider/identity_provider.h | 21 | * @file reclaim/reclaim.h |
22 | * | 22 | * |
23 | * @brief Common type definitions for the identity provider | 23 | * @brief Common type definitions for the identity provider |
24 | * service and API. | 24 | * service and API. |
25 | */ | 25 | */ |
26 | #ifndef IDENTITY_PROVIDER_H | 26 | #ifndef RECLAIM_H |
27 | #define IDENTITY_PROVIDER_H | 27 | #define RECLAIM_H |
28 | 28 | ||
29 | #include "gnunet_common.h" | 29 | #include "gnunet_common.h" |
30 | 30 | ||
@@ -152,7 +152,7 @@ struct AttributeIterationStartMessage | |||
152 | struct AttributeIterationNextMessage | 152 | struct AttributeIterationNextMessage |
153 | { | 153 | { |
154 | /** | 154 | /** |
155 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT | 155 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT |
156 | */ | 156 | */ |
157 | struct GNUNET_MessageHeader header; | 157 | struct GNUNET_MessageHeader header; |
158 | 158 | ||
@@ -170,7 +170,7 @@ struct AttributeIterationNextMessage | |||
170 | struct AttributeIterationStopMessage | 170 | struct AttributeIterationStopMessage |
171 | { | 171 | { |
172 | /** | 172 | /** |
173 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP | 173 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP |
174 | */ | 174 | */ |
175 | struct GNUNET_MessageHeader header; | 175 | struct GNUNET_MessageHeader header; |
176 | 176 | ||
@@ -214,7 +214,7 @@ struct TicketIterationStartMessage | |||
214 | struct TicketIterationNextMessage | 214 | struct TicketIterationNextMessage |
215 | { | 215 | { |
216 | /** | 216 | /** |
217 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT | 217 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT |
218 | */ | 218 | */ |
219 | struct GNUNET_MessageHeader header; | 219 | struct GNUNET_MessageHeader header; |
220 | 220 | ||
@@ -232,7 +232,7 @@ struct TicketIterationNextMessage | |||
232 | struct TicketIterationStopMessage | 232 | struct TicketIterationStopMessage |
233 | { | 233 | { |
234 | /** | 234 | /** |
235 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP | 235 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP |
236 | */ | 236 | */ |
237 | struct GNUNET_MessageHeader header; | 237 | struct GNUNET_MessageHeader header; |
238 | 238 | ||
@@ -251,7 +251,7 @@ struct TicketIterationStopMessage | |||
251 | struct IssueTicketMessage | 251 | struct IssueTicketMessage |
252 | { | 252 | { |
253 | /** | 253 | /** |
254 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_TICKET | 254 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET |
255 | */ | 255 | */ |
256 | struct GNUNET_MessageHeader header; | 256 | struct GNUNET_MessageHeader header; |
257 | 257 | ||
@@ -284,7 +284,7 @@ struct IssueTicketMessage | |||
284 | struct RevokeTicketMessage | 284 | struct RevokeTicketMessage |
285 | { | 285 | { |
286 | /** | 286 | /** |
287 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET | 287 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET |
288 | */ | 288 | */ |
289 | struct GNUNET_MessageHeader header; | 289 | struct GNUNET_MessageHeader header; |
290 | 290 | ||
@@ -312,7 +312,7 @@ struct RevokeTicketMessage | |||
312 | struct RevokeTicketResultMessage | 312 | struct RevokeTicketResultMessage |
313 | { | 313 | { |
314 | /** | 314 | /** |
315 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT | 315 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT |
316 | */ | 316 | */ |
317 | struct GNUNET_MessageHeader header; | 317 | struct GNUNET_MessageHeader header; |
318 | 318 | ||
@@ -334,7 +334,7 @@ struct RevokeTicketResultMessage | |||
334 | struct TicketResultMessage | 334 | struct TicketResultMessage |
335 | { | 335 | { |
336 | /** | 336 | /** |
337 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT | 337 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT |
338 | */ | 338 | */ |
339 | struct GNUNET_MessageHeader header; | 339 | struct GNUNET_MessageHeader header; |
340 | 340 | ||
@@ -351,7 +351,7 @@ struct TicketResultMessage | |||
351 | struct ConsumeTicketMessage | 351 | struct ConsumeTicketMessage |
352 | { | 352 | { |
353 | /** | 353 | /** |
354 | * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET | 354 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET |
355 | */ | 355 | */ |
356 | struct GNUNET_MessageHeader header; | 356 | struct GNUNET_MessageHeader header; |
357 | 357 | ||
diff --git a/src/identity-provider/identity_provider_api.c b/src/reclaim/reclaim_api.c index 33efe726f..3f1584ccd 100644 --- a/src/identity-provider/identity_provider_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -17,8 +17,8 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @file identity-provider/identity_provider_api.c | 20 | * @file reclaim/reclaim_api.c |
21 | * @brief api to interact with the identity provider service | 21 | * @brief api to interact with the reclaim service |
22 | * @author Martin Schanzenbach | 22 | * @author Martin Schanzenbach |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
@@ -26,33 +26,33 @@ | |||
26 | #include "gnunet_constants.h" | 26 | #include "gnunet_constants.h" |
27 | #include "gnunet_protocols.h" | 27 | #include "gnunet_protocols.h" |
28 | #include "gnunet_mq_lib.h" | 28 | #include "gnunet_mq_lib.h" |
29 | #include "gnunet_identity_provider_service.h" | 29 | #include "gnunet_reclaim_service.h" |
30 | #include "gnunet_identity_attribute_lib.h" | 30 | #include "gnunet_reclaim_attribute_lib.h" |
31 | #include "identity_provider.h" | 31 | #include "reclaim.h" |
32 | 32 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "identity-api",__VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "reclaim-api",__VA_ARGS__) |
34 | 34 | ||
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Handle for an operation with the service. | 37 | * Handle for an operation with the service. |
38 | */ | 38 | */ |
39 | struct GNUNET_IDENTITY_PROVIDER_Operation | 39 | struct GNUNET_RECLAIM_Operation |
40 | { | 40 | { |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Main handle. | 43 | * Main handle. |
44 | */ | 44 | */ |
45 | struct GNUNET_IDENTITY_PROVIDER_Handle *h; | 45 | struct GNUNET_RECLAIM_Handle *h; |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * We keep operations in a DLL. | 48 | * We keep operations in a DLL. |
49 | */ | 49 | */ |
50 | struct GNUNET_IDENTITY_PROVIDER_Operation *next; | 50 | struct GNUNET_RECLAIM_Operation *next; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * We keep operations in a DLL. | 53 | * We keep operations in a DLL. |
54 | */ | 54 | */ |
55 | struct GNUNET_IDENTITY_PROVIDER_Operation *prev; | 55 | struct GNUNET_RECLAIM_Operation *prev; |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * Message to send to the service. | 58 | * Message to send to the service. |
@@ -63,22 +63,22 @@ struct GNUNET_IDENTITY_PROVIDER_Operation | |||
63 | /** | 63 | /** |
64 | * Continuation to invoke after attribute store call | 64 | * Continuation to invoke after attribute store call |
65 | */ | 65 | */ |
66 | GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus as_cb; | 66 | GNUNET_RECLAIM_ContinuationWithStatus as_cb; |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Attribute result callback | 69 | * Attribute result callback |
70 | */ | 70 | */ |
71 | GNUNET_IDENTITY_PROVIDER_AttributeResult ar_cb; | 71 | GNUNET_RECLAIM_AttributeResult ar_cb; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * Revocation result callback | 74 | * Revocation result callback |
75 | */ | 75 | */ |
76 | GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus rvk_cb; | 76 | GNUNET_RECLAIM_ContinuationWithStatus rvk_cb; |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Ticket result callback | 79 | * Ticket result callback |
80 | */ | 80 | */ |
81 | GNUNET_IDENTITY_PROVIDER_TicketCallback tr_cb; | 81 | GNUNET_RECLAIM_TicketCallback tr_cb; |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * Envelope with the message for this queue entry. | 84 | * Envelope with the message for this queue entry. |
@@ -100,23 +100,23 @@ struct GNUNET_IDENTITY_PROVIDER_Operation | |||
100 | /** | 100 | /** |
101 | * Handle for a ticket iterator operation | 101 | * Handle for a ticket iterator operation |
102 | */ | 102 | */ |
103 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator | 103 | struct GNUNET_RECLAIM_TicketIterator |
104 | { | 104 | { |
105 | 105 | ||
106 | /** | 106 | /** |
107 | * Kept in a DLL. | 107 | * Kept in a DLL. |
108 | */ | 108 | */ |
109 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *next; | 109 | struct GNUNET_RECLAIM_TicketIterator *next; |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Kept in a DLL. | 112 | * Kept in a DLL. |
113 | */ | 113 | */ |
114 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *prev; | 114 | struct GNUNET_RECLAIM_TicketIterator *prev; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Main handle to access the idp. | 117 | * Main handle to access the idp. |
118 | */ | 118 | */ |
119 | struct GNUNET_IDENTITY_PROVIDER_Handle *h; | 119 | struct GNUNET_RECLAIM_Handle *h; |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * Function to call on completion. | 122 | * Function to call on completion. |
@@ -131,7 +131,7 @@ struct GNUNET_IDENTITY_PROVIDER_TicketIterator | |||
131 | /** | 131 | /** |
132 | * The continuation to call with the results | 132 | * The continuation to call with the results |
133 | */ | 133 | */ |
134 | GNUNET_IDENTITY_PROVIDER_TicketCallback tr_cb; | 134 | GNUNET_RECLAIM_TicketCallback tr_cb; |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * Closure for @e tr_cb. | 137 | * Closure for @e tr_cb. |
@@ -165,23 +165,23 @@ struct GNUNET_IDENTITY_PROVIDER_TicketIterator | |||
165 | /** | 165 | /** |
166 | * Handle for a attribute iterator operation | 166 | * Handle for a attribute iterator operation |
167 | */ | 167 | */ |
168 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator | 168 | struct GNUNET_RECLAIM_AttributeIterator |
169 | { | 169 | { |
170 | 170 | ||
171 | /** | 171 | /** |
172 | * Kept in a DLL. | 172 | * Kept in a DLL. |
173 | */ | 173 | */ |
174 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *next; | 174 | struct GNUNET_RECLAIM_AttributeIterator *next; |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * Kept in a DLL. | 177 | * Kept in a DLL. |
178 | */ | 178 | */ |
179 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *prev; | 179 | struct GNUNET_RECLAIM_AttributeIterator *prev; |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Main handle to access the idp. | 182 | * Main handle to access the idp. |
183 | */ | 183 | */ |
184 | struct GNUNET_IDENTITY_PROVIDER_Handle *h; | 184 | struct GNUNET_RECLAIM_Handle *h; |
185 | 185 | ||
186 | /** | 186 | /** |
187 | * Function to call on completion. | 187 | * Function to call on completion. |
@@ -196,7 +196,7 @@ struct GNUNET_IDENTITY_PROVIDER_AttributeIterator | |||
196 | /** | 196 | /** |
197 | * The continuation to call with the results | 197 | * The continuation to call with the results |
198 | */ | 198 | */ |
199 | GNUNET_IDENTITY_PROVIDER_AttributeResult proc; | 199 | GNUNET_RECLAIM_AttributeResult proc; |
200 | 200 | ||
201 | /** | 201 | /** |
202 | * Closure for @e proc. | 202 | * Closure for @e proc. |
@@ -235,7 +235,7 @@ struct GNUNET_IDENTITY_PROVIDER_AttributeIterator | |||
235 | /** | 235 | /** |
236 | * Handle for the service. | 236 | * Handle for the service. |
237 | */ | 237 | */ |
238 | struct GNUNET_IDENTITY_PROVIDER_Handle | 238 | struct GNUNET_RECLAIM_Handle |
239 | { | 239 | { |
240 | /** | 240 | /** |
241 | * Configuration to use. | 241 | * Configuration to use. |
@@ -255,32 +255,32 @@ struct GNUNET_IDENTITY_PROVIDER_Handle | |||
255 | /** | 255 | /** |
256 | * Head of active operations. | 256 | * Head of active operations. |
257 | */ | 257 | */ |
258 | struct GNUNET_IDENTITY_PROVIDER_Operation *op_head; | 258 | struct GNUNET_RECLAIM_Operation *op_head; |
259 | 259 | ||
260 | /** | 260 | /** |
261 | * Tail of active operations. | 261 | * Tail of active operations. |
262 | */ | 262 | */ |
263 | struct GNUNET_IDENTITY_PROVIDER_Operation *op_tail; | 263 | struct GNUNET_RECLAIM_Operation *op_tail; |
264 | 264 | ||
265 | /** | 265 | /** |
266 | * Head of active iterations | 266 | * Head of active iterations |
267 | */ | 267 | */ |
268 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it_head; | 268 | struct GNUNET_RECLAIM_AttributeIterator *it_head; |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Tail of active iterations | 271 | * Tail of active iterations |
272 | */ | 272 | */ |
273 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it_tail; | 273 | struct GNUNET_RECLAIM_AttributeIterator *it_tail; |
274 | 274 | ||
275 | /** | 275 | /** |
276 | * Head of active iterations | 276 | * Head of active iterations |
277 | */ | 277 | */ |
278 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *ticket_it_head; | 278 | struct GNUNET_RECLAIM_TicketIterator *ticket_it_head; |
279 | 279 | ||
280 | /** | 280 | /** |
281 | * Tail of active iterations | 281 | * Tail of active iterations |
282 | */ | 282 | */ |
283 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *ticket_it_tail; | 283 | struct GNUNET_RECLAIM_TicketIterator *ticket_it_tail; |
284 | 284 | ||
285 | 285 | ||
286 | /** | 286 | /** |
@@ -318,10 +318,10 @@ struct GNUNET_IDENTITY_PROVIDER_Handle | |||
318 | /** | 318 | /** |
319 | * Try again to connect to the service. | 319 | * Try again to connect to the service. |
320 | * | 320 | * |
321 | * @param h handle to the identity provider service. | 321 | * @param h handle to the reclaim service. |
322 | */ | 322 | */ |
323 | static void | 323 | static void |
324 | reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h); | 324 | reconnect (struct GNUNET_RECLAIM_Handle *h); |
325 | 325 | ||
326 | /** | 326 | /** |
327 | * Reconnect | 327 | * Reconnect |
@@ -331,7 +331,7 @@ reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h); | |||
331 | static void | 331 | static void |
332 | reconnect_task (void *cls) | 332 | reconnect_task (void *cls) |
333 | { | 333 | { |
334 | struct GNUNET_IDENTITY_PROVIDER_Handle *handle = cls; | 334 | struct GNUNET_RECLAIM_Handle *handle = cls; |
335 | 335 | ||
336 | handle->reconnect_task = NULL; | 336 | handle->reconnect_task = NULL; |
337 | reconnect (handle); | 337 | reconnect (handle); |
@@ -344,7 +344,7 @@ reconnect_task (void *cls) | |||
344 | * @param handle our service | 344 | * @param handle our service |
345 | */ | 345 | */ |
346 | static void | 346 | static void |
347 | force_reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *handle) | 347 | force_reconnect (struct GNUNET_RECLAIM_Handle *handle) |
348 | { | 348 | { |
349 | GNUNET_MQ_destroy (handle->mq); | 349 | GNUNET_MQ_destroy (handle->mq); |
350 | handle->mq = NULL; | 350 | handle->mq = NULL; |
@@ -362,9 +362,9 @@ force_reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *handle) | |||
362 | * @param it entry to free | 362 | * @param it entry to free |
363 | */ | 363 | */ |
364 | static void | 364 | static void |
365 | free_it (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it) | 365 | free_it (struct GNUNET_RECLAIM_AttributeIterator *it) |
366 | { | 366 | { |
367 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = it->h; | 367 | struct GNUNET_RECLAIM_Handle *h = it->h; |
368 | 368 | ||
369 | GNUNET_CONTAINER_DLL_remove (h->it_head, | 369 | GNUNET_CONTAINER_DLL_remove (h->it_head, |
370 | h->it_tail, | 370 | h->it_tail, |
@@ -375,7 +375,7 @@ free_it (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it) | |||
375 | } | 375 | } |
376 | 376 | ||
377 | static void | 377 | static void |
378 | free_op (struct GNUNET_IDENTITY_PROVIDER_Operation* op) | 378 | free_op (struct GNUNET_RECLAIM_Operation* op) |
379 | { | 379 | { |
380 | if (NULL == op) | 380 | if (NULL == op) |
381 | return; | 381 | return; |
@@ -397,7 +397,7 @@ static void | |||
397 | mq_error_handler (void *cls, | 397 | mq_error_handler (void *cls, |
398 | enum GNUNET_MQ_Error error) | 398 | enum GNUNET_MQ_Error error) |
399 | { | 399 | { |
400 | struct GNUNET_IDENTITY_PROVIDER_Handle *handle = cls; | 400 | struct GNUNET_RECLAIM_Handle *handle = cls; |
401 | force_reconnect (handle); | 401 | force_reconnect (handle); |
402 | } | 402 | } |
403 | 403 | ||
@@ -412,8 +412,8 @@ static void | |||
412 | handle_attribute_store_response (void *cls, | 412 | handle_attribute_store_response (void *cls, |
413 | const struct AttributeStoreResultMessage *msg) | 413 | const struct AttributeStoreResultMessage *msg) |
414 | { | 414 | { |
415 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = cls; | 415 | struct GNUNET_RECLAIM_Handle *h = cls; |
416 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 416 | struct GNUNET_RECLAIM_Operation *op; |
417 | uint32_t r_id = ntohl (msg->id); | 417 | uint32_t r_id = ntohl (msg->id); |
418 | int res; | 418 | int res; |
419 | const char *emsg; | 419 | const char *emsg; |
@@ -448,7 +448,7 @@ handle_attribute_store_response (void *cls, | |||
448 | 448 | ||
449 | /** | 449 | /** |
450 | * Handle an incoming message of type | 450 | * Handle an incoming message of type |
451 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT | 451 | * #GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT |
452 | * | 452 | * |
453 | * @param cls | 453 | * @param cls |
454 | * @param msg the message we received | 454 | * @param msg the message we received |
@@ -474,7 +474,7 @@ check_consume_ticket_result (void *cls, | |||
474 | 474 | ||
475 | /** | 475 | /** |
476 | * Handle an incoming message of type | 476 | * Handle an incoming message of type |
477 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT | 477 | * #GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT |
478 | * | 478 | * |
479 | * @param cls | 479 | * @param cls |
480 | * @param msg the message we received | 480 | * @param msg the message we received |
@@ -483,8 +483,8 @@ static void | |||
483 | handle_consume_ticket_result (void *cls, | 483 | handle_consume_ticket_result (void *cls, |
484 | const struct ConsumeTicketResultMessage *msg) | 484 | const struct ConsumeTicketResultMessage *msg) |
485 | { | 485 | { |
486 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = cls; | 486 | struct GNUNET_RECLAIM_Handle *h = cls; |
487 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 487 | struct GNUNET_RECLAIM_Operation *op; |
488 | size_t attrs_len; | 488 | size_t attrs_len; |
489 | uint32_t r_id = ntohl (msg->id); | 489 | uint32_t r_id = ntohl (msg->id); |
490 | 490 | ||
@@ -500,9 +500,9 @@ handle_consume_ticket_result (void *cls, | |||
500 | return; | 500 | return; |
501 | 501 | ||
502 | { | 502 | { |
503 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs; | 503 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
504 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | 504 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
505 | attrs = GNUNET_IDENTITY_ATTRIBUTE_list_deserialize ((char*)&msg[1], | 505 | attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char*)&msg[1], |
506 | attrs_len); | 506 | attrs_len); |
507 | if (NULL != op->ar_cb) | 507 | if (NULL != op->ar_cb) |
508 | { | 508 | { |
@@ -518,7 +518,7 @@ handle_consume_ticket_result (void *cls, | |||
518 | op->ar_cb (op->cls, | 518 | op->ar_cb (op->cls, |
519 | &msg->identity, | 519 | &msg->identity, |
520 | le->claim); | 520 | le->claim); |
521 | GNUNET_IDENTITY_ATTRIBUTE_list_destroy (attrs); | 521 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (attrs); |
522 | } | 522 | } |
523 | } | 523 | } |
524 | if (NULL != op) | 524 | if (NULL != op) |
@@ -539,7 +539,7 @@ handle_consume_ticket_result (void *cls, | |||
539 | 539 | ||
540 | /** | 540 | /** |
541 | * Handle an incoming message of type | 541 | * Handle an incoming message of type |
542 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT | 542 | * #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT |
543 | * | 543 | * |
544 | * @param cls | 544 | * @param cls |
545 | * @param msg the message we received | 545 | * @param msg the message we received |
@@ -565,7 +565,7 @@ check_attribute_result (void *cls, | |||
565 | 565 | ||
566 | /** | 566 | /** |
567 | * Handle an incoming message of type | 567 | * Handle an incoming message of type |
568 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT | 568 | * #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT |
569 | * | 569 | * |
570 | * @param cls | 570 | * @param cls |
571 | * @param msg the message we received | 571 | * @param msg the message we received |
@@ -575,9 +575,9 @@ handle_attribute_result (void *cls, | |||
575 | const struct AttributeResultMessage *msg) | 575 | const struct AttributeResultMessage *msg) |
576 | { | 576 | { |
577 | static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy; | 577 | static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy; |
578 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = cls; | 578 | struct GNUNET_RECLAIM_Handle *h = cls; |
579 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it; | 579 | struct GNUNET_RECLAIM_AttributeIterator *it; |
580 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 580 | struct GNUNET_RECLAIM_Operation *op; |
581 | size_t attr_len; | 581 | size_t attr_len; |
582 | uint32_t r_id = ntohl (msg->id); | 582 | uint32_t r_id = ntohl (msg->id); |
583 | 583 | ||
@@ -627,8 +627,8 @@ handle_attribute_result (void *cls, | |||
627 | } | 627 | } |
628 | 628 | ||
629 | { | 629 | { |
630 | struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr; | 630 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr; |
631 | attr = GNUNET_IDENTITY_ATTRIBUTE_deserialize ((char*)&msg[1], | 631 | attr = GNUNET_RECLAIM_ATTRIBUTE_deserialize ((char*)&msg[1], |
632 | attr_len); | 632 | attr_len); |
633 | if (NULL != it) | 633 | if (NULL != it) |
634 | { | 634 | { |
@@ -652,7 +652,7 @@ handle_attribute_result (void *cls, | |||
652 | 652 | ||
653 | /** | 653 | /** |
654 | * Handle an incoming message of type | 654 | * Handle an incoming message of type |
655 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT | 655 | * #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT |
656 | * | 656 | * |
657 | * @param cls | 657 | * @param cls |
658 | * @param msg the message we received | 658 | * @param msg the message we received |
@@ -677,7 +677,7 @@ check_ticket_result (void *cls, | |||
677 | 677 | ||
678 | /** | 678 | /** |
679 | * Handle an incoming message of type | 679 | * Handle an incoming message of type |
680 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT | 680 | * #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT |
681 | * | 681 | * |
682 | * @param cls | 682 | * @param cls |
683 | * @param msg the message we received | 683 | * @param msg the message we received |
@@ -686,10 +686,10 @@ static void | |||
686 | handle_ticket_result (void *cls, | 686 | handle_ticket_result (void *cls, |
687 | const struct TicketResultMessage *msg) | 687 | const struct TicketResultMessage *msg) |
688 | { | 688 | { |
689 | struct GNUNET_IDENTITY_PROVIDER_Handle *handle = cls; | 689 | struct GNUNET_RECLAIM_Handle *handle = cls; |
690 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 690 | struct GNUNET_RECLAIM_Operation *op; |
691 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it; | 691 | struct GNUNET_RECLAIM_TicketIterator *it; |
692 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket; | 692 | const struct GNUNET_RECLAIM_Ticket *ticket; |
693 | uint32_t r_id = ntohl (msg->id); | 693 | uint32_t r_id = ntohl (msg->id); |
694 | size_t msg_len; | 694 | size_t msg_len; |
695 | 695 | ||
@@ -712,7 +712,7 @@ handle_ticket_result (void *cls, | |||
712 | if (NULL != op->tr_cb) | 712 | if (NULL != op->tr_cb) |
713 | op->tr_cb (op->cls, NULL); | 713 | op->tr_cb (op->cls, NULL); |
714 | } else { | 714 | } else { |
715 | ticket = (struct GNUNET_IDENTITY_PROVIDER_Ticket *)&msg[1]; | 715 | ticket = (struct GNUNET_RECLAIM_Ticket *)&msg[1]; |
716 | if (NULL != op->tr_cb) | 716 | if (NULL != op->tr_cb) |
717 | op->tr_cb (op->cls, ticket); | 717 | op->tr_cb (op->cls, ticket); |
718 | } | 718 | } |
@@ -728,7 +728,7 @@ handle_ticket_result (void *cls, | |||
728 | it->finish_cb (it->finish_cb_cls); | 728 | it->finish_cb (it->finish_cb_cls); |
729 | GNUNET_free (it); | 729 | GNUNET_free (it); |
730 | } else { | 730 | } else { |
731 | ticket = (struct GNUNET_IDENTITY_PROVIDER_Ticket *)&msg[1]; | 731 | ticket = (struct GNUNET_RECLAIM_Ticket *)&msg[1]; |
732 | if (NULL != it->tr_cb) | 732 | if (NULL != it->tr_cb) |
733 | it->tr_cb (it->cls, ticket); | 733 | it->tr_cb (it->cls, ticket); |
734 | } | 734 | } |
@@ -740,7 +740,7 @@ handle_ticket_result (void *cls, | |||
740 | 740 | ||
741 | /** | 741 | /** |
742 | * Handle an incoming message of type | 742 | * Handle an incoming message of type |
743 | * #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT | 743 | * #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT |
744 | * | 744 | * |
745 | * @param cls | 745 | * @param cls |
746 | * @param msg the message we received | 746 | * @param msg the message we received |
@@ -749,8 +749,8 @@ static void | |||
749 | handle_revoke_ticket_result (void *cls, | 749 | handle_revoke_ticket_result (void *cls, |
750 | const struct RevokeTicketResultMessage *msg) | 750 | const struct RevokeTicketResultMessage *msg) |
751 | { | 751 | { |
752 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = cls; | 752 | struct GNUNET_RECLAIM_Handle *h = cls; |
753 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 753 | struct GNUNET_RECLAIM_Operation *op; |
754 | uint32_t r_id = ntohl (msg->id); | 754 | uint32_t r_id = ntohl (msg->id); |
755 | int32_t success; | 755 | int32_t success; |
756 | 756 | ||
@@ -785,42 +785,42 @@ handle_revoke_ticket_result (void *cls, | |||
785 | /** | 785 | /** |
786 | * Try again to connect to the service. | 786 | * Try again to connect to the service. |
787 | * | 787 | * |
788 | * @param h handle to the identity provider service. | 788 | * @param h handle to the reclaim service. |
789 | */ | 789 | */ |
790 | static void | 790 | static void |
791 | reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) | 791 | reconnect (struct GNUNET_RECLAIM_Handle *h) |
792 | { | 792 | { |
793 | struct GNUNET_MQ_MessageHandler handlers[] = { | 793 | struct GNUNET_MQ_MessageHandler handlers[] = { |
794 | GNUNET_MQ_hd_fixed_size (attribute_store_response, | 794 | GNUNET_MQ_hd_fixed_size (attribute_store_response, |
795 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE, | 795 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE_RESPONSE, |
796 | struct AttributeStoreResultMessage, | 796 | struct AttributeStoreResultMessage, |
797 | h), | 797 | h), |
798 | GNUNET_MQ_hd_var_size (attribute_result, | 798 | GNUNET_MQ_hd_var_size (attribute_result, |
799 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT, | 799 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT, |
800 | struct AttributeResultMessage, | 800 | struct AttributeResultMessage, |
801 | h), | 801 | h), |
802 | GNUNET_MQ_hd_var_size (ticket_result, | 802 | GNUNET_MQ_hd_var_size (ticket_result, |
803 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT, | 803 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT, |
804 | struct TicketResultMessage, | 804 | struct TicketResultMessage, |
805 | h), | 805 | h), |
806 | GNUNET_MQ_hd_var_size (consume_ticket_result, | 806 | GNUNET_MQ_hd_var_size (consume_ticket_result, |
807 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT, | 807 | GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT, |
808 | struct ConsumeTicketResultMessage, | 808 | struct ConsumeTicketResultMessage, |
809 | h), | 809 | h), |
810 | GNUNET_MQ_hd_fixed_size (revoke_ticket_result, | 810 | GNUNET_MQ_hd_fixed_size (revoke_ticket_result, |
811 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT, | 811 | GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT, |
812 | struct RevokeTicketResultMessage, | 812 | struct RevokeTicketResultMessage, |
813 | h), | 813 | h), |
814 | GNUNET_MQ_handler_end () | 814 | GNUNET_MQ_handler_end () |
815 | }; | 815 | }; |
816 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 816 | struct GNUNET_RECLAIM_Operation *op; |
817 | 817 | ||
818 | GNUNET_assert (NULL == h->mq); | 818 | GNUNET_assert (NULL == h->mq); |
819 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 819 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
820 | "Connecting to identity provider service.\n"); | 820 | "Connecting to reclaim service.\n"); |
821 | 821 | ||
822 | h->mq = GNUNET_CLIENT_connect (h->cfg, | 822 | h->mq = GNUNET_CLIENT_connect (h->cfg, |
823 | "identity-provider", | 823 | "reclaim", |
824 | handlers, | 824 | handlers, |
825 | &mq_error_handler, | 825 | &mq_error_handler, |
826 | h); | 826 | h); |
@@ -833,17 +833,17 @@ reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) | |||
833 | 833 | ||
834 | 834 | ||
835 | /** | 835 | /** |
836 | * Connect to the identity provider service. | 836 | * Connect to the reclaim service. |
837 | * | 837 | * |
838 | * @param cfg the configuration to use | 838 | * @param cfg the configuration to use |
839 | * @return handle to use | 839 | * @return handle to use |
840 | */ | 840 | */ |
841 | struct GNUNET_IDENTITY_PROVIDER_Handle * | 841 | struct GNUNET_RECLAIM_Handle * |
842 | GNUNET_IDENTITY_PROVIDER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | 842 | GNUNET_RECLAIM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) |
843 | { | 843 | { |
844 | struct GNUNET_IDENTITY_PROVIDER_Handle *h; | 844 | struct GNUNET_RECLAIM_Handle *h; |
845 | 845 | ||
846 | h = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_Handle); | 846 | h = GNUNET_new (struct GNUNET_RECLAIM_Handle); |
847 | h->cfg = cfg; | 847 | h->cfg = cfg; |
848 | reconnect (h); | 848 | reconnect (h); |
849 | if (NULL == h->mq) | 849 | if (NULL == h->mq) |
@@ -864,9 +864,9 @@ GNUNET_IDENTITY_PROVIDER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
864 | * @param op operation to cancel | 864 | * @param op operation to cancel |
865 | */ | 865 | */ |
866 | void | 866 | void |
867 | GNUNET_IDENTITY_PROVIDER_cancel (struct GNUNET_IDENTITY_PROVIDER_Operation *op) | 867 | GNUNET_RECLAIM_cancel (struct GNUNET_RECLAIM_Operation *op) |
868 | { | 868 | { |
869 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = op->h; | 869 | struct GNUNET_RECLAIM_Handle *h = op->h; |
870 | 870 | ||
871 | GNUNET_CONTAINER_DLL_remove (h->op_head, | 871 | GNUNET_CONTAINER_DLL_remove (h->op_head, |
872 | h->op_tail, | 872 | h->op_tail, |
@@ -881,7 +881,7 @@ GNUNET_IDENTITY_PROVIDER_cancel (struct GNUNET_IDENTITY_PROVIDER_Operation *op) | |||
881 | * @param h handle to destroy | 881 | * @param h handle to destroy |
882 | */ | 882 | */ |
883 | void | 883 | void |
884 | GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) | 884 | GNUNET_RECLAIM_disconnect (struct GNUNET_RECLAIM_Handle *h) |
885 | { | 885 | { |
886 | GNUNET_assert (NULL != h); | 886 | GNUNET_assert (NULL != h); |
887 | if (NULL != h->mq) | 887 | if (NULL != h->mq) |
@@ -902,7 +902,7 @@ GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) | |||
902 | * Store an attribute. If the attribute is already present, | 902 | * Store an attribute. If the attribute is already present, |
903 | * it is replaced with the new attribute. | 903 | * it is replaced with the new attribute. |
904 | * | 904 | * |
905 | * @param h handle to the identity provider | 905 | * @param h handle to the reclaim |
906 | * @param pkey private key of the identity | 906 | * @param pkey private key of the identity |
907 | * @param attr the attribute value | 907 | * @param attr the attribute value |
908 | * @param exp_interval the relative expiration interval for the attribute | 908 | * @param exp_interval the relative expiration interval for the attribute |
@@ -910,19 +910,19 @@ GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) | |||
910 | * @param cont_cls closure for @a cont | 910 | * @param cont_cls closure for @a cont |
911 | * @return handle to abort the request | 911 | * @return handle to abort the request |
912 | */ | 912 | */ |
913 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 913 | struct GNUNET_RECLAIM_Operation * |
914 | GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 914 | GNUNET_RECLAIM_attribute_store (struct GNUNET_RECLAIM_Handle *h, |
915 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 915 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, |
916 | const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr, | 916 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
917 | const struct GNUNET_TIME_Relative *exp_interval, | 917 | const struct GNUNET_TIME_Relative *exp_interval, |
918 | GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cont, | 918 | GNUNET_RECLAIM_ContinuationWithStatus cont, |
919 | void *cont_cls) | 919 | void *cont_cls) |
920 | { | 920 | { |
921 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 921 | struct GNUNET_RECLAIM_Operation *op; |
922 | struct AttributeStoreMessage *sam; | 922 | struct AttributeStoreMessage *sam; |
923 | size_t attr_len; | 923 | size_t attr_len; |
924 | 924 | ||
925 | op = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_Operation); | 925 | op = GNUNET_new (struct GNUNET_RECLAIM_Operation); |
926 | op->h = h; | 926 | op->h = h; |
927 | op->as_cb = cont; | 927 | op->as_cb = cont; |
928 | op->cls = cont_cls; | 928 | op->cls = cont_cls; |
@@ -930,15 +930,15 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
930 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, | 930 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, |
931 | h->op_tail, | 931 | h->op_tail, |
932 | op); | 932 | op); |
933 | attr_len = GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (attr); | 933 | attr_len = GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (attr); |
934 | op->env = GNUNET_MQ_msg_extra (sam, | 934 | op->env = GNUNET_MQ_msg_extra (sam, |
935 | attr_len, | 935 | attr_len, |
936 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE); | 936 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE); |
937 | sam->identity = *pkey; | 937 | sam->identity = *pkey; |
938 | sam->id = htonl (op->r_id); | 938 | sam->id = htonl (op->r_id); |
939 | sam->exp = GNUNET_htonll (exp_interval->rel_value_us); | 939 | sam->exp = GNUNET_htonll (exp_interval->rel_value_us); |
940 | 940 | ||
941 | GNUNET_IDENTITY_ATTRIBUTE_serialize (attr, | 941 | GNUNET_RECLAIM_ATTRIBUTE_serialize (attr, |
942 | (char*)&sam[1]); | 942 | (char*)&sam[1]); |
943 | 943 | ||
944 | sam->attr_len = htons (attr_len); | 944 | sam->attr_len = htons (attr_len); |
@@ -952,11 +952,11 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
952 | 952 | ||
953 | /** | 953 | /** |
954 | * List all attributes for a local identity. | 954 | * List all attributes for a local identity. |
955 | * This MUST lock the `struct GNUNET_IDENTITY_PROVIDER_Handle` | 955 | * This MUST lock the `struct GNUNET_RECLAIM_Handle` |
956 | * for any other calls than #GNUNET_IDENTITY_PROVIDER_get_attributes_next() and | 956 | * for any other calls than #GNUNET_RECLAIM_get_attributes_next() and |
957 | * #GNUNET_IDENTITY_PROVIDER_get_attributes_stop. @a proc will be called once | 957 | * #GNUNET_RECLAIM_get_attributes_stop. @a proc will be called once |
958 | * immediately, and then again after | 958 | * immediately, and then again after |
959 | * #GNUNET_IDENTITY_PROVIDER_get_attributes_next() is invoked. | 959 | * #GNUNET_RECLAIM_get_attributes_next() is invoked. |
960 | * | 960 | * |
961 | * On error (disconnect), @a error_cb will be invoked. | 961 | * On error (disconnect), @a error_cb will be invoked. |
962 | * On normal completion, @a finish_cb proc will be | 962 | * On normal completion, @a finish_cb proc will be |
@@ -975,23 +975,23 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
975 | * @param finish_cb_cls closure for @a finish_cb | 975 | * @param finish_cb_cls closure for @a finish_cb |
976 | * @return an iterator handle to use for iteration | 976 | * @return an iterator handle to use for iteration |
977 | */ | 977 | */ |
978 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator * | 978 | struct GNUNET_RECLAIM_AttributeIterator * |
979 | GNUNET_IDENTITY_PROVIDER_get_attributes_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 979 | GNUNET_RECLAIM_get_attributes_start (struct GNUNET_RECLAIM_Handle *h, |
980 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 980 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
981 | GNUNET_SCHEDULER_TaskCallback error_cb, | 981 | GNUNET_SCHEDULER_TaskCallback error_cb, |
982 | void *error_cb_cls, | 982 | void *error_cb_cls, |
983 | GNUNET_IDENTITY_PROVIDER_AttributeResult proc, | 983 | GNUNET_RECLAIM_AttributeResult proc, |
984 | void *proc_cls, | 984 | void *proc_cls, |
985 | GNUNET_SCHEDULER_TaskCallback finish_cb, | 985 | GNUNET_SCHEDULER_TaskCallback finish_cb, |
986 | void *finish_cb_cls) | 986 | void *finish_cb_cls) |
987 | { | 987 | { |
988 | struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it; | 988 | struct GNUNET_RECLAIM_AttributeIterator *it; |
989 | struct GNUNET_MQ_Envelope *env; | 989 | struct GNUNET_MQ_Envelope *env; |
990 | struct AttributeIterationStartMessage *msg; | 990 | struct AttributeIterationStartMessage *msg; |
991 | uint32_t rid; | 991 | uint32_t rid; |
992 | 992 | ||
993 | rid = h->r_id_gen++; | 993 | rid = h->r_id_gen++; |
994 | it = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator); | 994 | it = GNUNET_new (struct GNUNET_RECLAIM_AttributeIterator); |
995 | it->h = h; | 995 | it->h = h; |
996 | it->error_cb = error_cb; | 996 | it->error_cb = error_cb; |
997 | it->error_cb_cls = error_cb_cls; | 997 | it->error_cb_cls = error_cb_cls; |
@@ -1005,7 +1005,7 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_start (struct GNUNET_IDENTITY_PROVIDER_H | |||
1005 | h->it_tail, | 1005 | h->it_tail, |
1006 | it); | 1006 | it); |
1007 | env = GNUNET_MQ_msg (msg, | 1007 | env = GNUNET_MQ_msg (msg, |
1008 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START); | 1008 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_START); |
1009 | msg->id = htonl (rid); | 1009 | msg->id = htonl (rid); |
1010 | msg->identity = *identity; | 1010 | msg->identity = *identity; |
1011 | if (NULL == h->mq) | 1011 | if (NULL == h->mq) |
@@ -1018,20 +1018,20 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_start (struct GNUNET_IDENTITY_PROVIDER_H | |||
1018 | 1018 | ||
1019 | 1019 | ||
1020 | /** | 1020 | /** |
1021 | * Calls the record processor specified in #GNUNET_IDENTITY_PROVIDER_get_attributes_start | 1021 | * Calls the record processor specified in #GNUNET_RECLAIM_get_attributes_start |
1022 | * for the next record. | 1022 | * for the next record. |
1023 | * | 1023 | * |
1024 | * @param it the iterator | 1024 | * @param it the iterator |
1025 | */ | 1025 | */ |
1026 | void | 1026 | void |
1027 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it) | 1027 | GNUNET_RECLAIM_get_attributes_next (struct GNUNET_RECLAIM_AttributeIterator *it) |
1028 | { | 1028 | { |
1029 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = it->h; | 1029 | struct GNUNET_RECLAIM_Handle *h = it->h; |
1030 | struct AttributeIterationNextMessage *msg; | 1030 | struct AttributeIterationNextMessage *msg; |
1031 | struct GNUNET_MQ_Envelope *env; | 1031 | struct GNUNET_MQ_Envelope *env; |
1032 | 1032 | ||
1033 | env = GNUNET_MQ_msg (msg, | 1033 | env = GNUNET_MQ_msg (msg, |
1034 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT); | 1034 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT); |
1035 | msg->id = htonl (it->r_id); | 1035 | msg->id = htonl (it->r_id); |
1036 | GNUNET_MQ_send (h->mq, | 1036 | GNUNET_MQ_send (h->mq, |
1037 | env); | 1037 | env); |
@@ -1041,21 +1041,21 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_next (struct GNUNET_IDENTITY_PROVIDER_At | |||
1041 | /** | 1041 | /** |
1042 | * Stops iteration and releases the idp handle for further calls. Must | 1042 | * Stops iteration and releases the idp handle for further calls. Must |
1043 | * be called on any iteration that has not yet completed prior to calling | 1043 | * be called on any iteration that has not yet completed prior to calling |
1044 | * #GNUNET_IDENTITY_PROVIDER_disconnect. | 1044 | * #GNUNET_RECLAIM_disconnect. |
1045 | * | 1045 | * |
1046 | * @param it the iterator | 1046 | * @param it the iterator |
1047 | */ | 1047 | */ |
1048 | void | 1048 | void |
1049 | GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_AttributeIterator *it) | 1049 | GNUNET_RECLAIM_get_attributes_stop (struct GNUNET_RECLAIM_AttributeIterator *it) |
1050 | { | 1050 | { |
1051 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = it->h; | 1051 | struct GNUNET_RECLAIM_Handle *h = it->h; |
1052 | struct GNUNET_MQ_Envelope *env; | 1052 | struct GNUNET_MQ_Envelope *env; |
1053 | struct AttributeIterationStopMessage *msg; | 1053 | struct AttributeIterationStopMessage *msg; |
1054 | 1054 | ||
1055 | if (NULL != h->mq) | 1055 | if (NULL != h->mq) |
1056 | { | 1056 | { |
1057 | env = GNUNET_MQ_msg (msg, | 1057 | env = GNUNET_MQ_msg (msg, |
1058 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP); | 1058 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP); |
1059 | msg->id = htonl (it->r_id); | 1059 | msg->id = htonl (it->r_id); |
1060 | GNUNET_MQ_send (h->mq, | 1060 | GNUNET_MQ_send (h->mq, |
1061 | env); | 1061 | env); |
@@ -1066,10 +1066,10 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At | |||
1066 | 1066 | ||
1067 | /** TODO | 1067 | /** TODO |
1068 | * Issues a ticket to another identity. The identity may use | 1068 | * Issues a ticket to another identity. The identity may use |
1069 | * @GNUNET_IDENTITY_PROVIDER_authorization_ticket_consume to consume the ticket | 1069 | * @GNUNET_RECLAIM_authorization_ticket_consume to consume the ticket |
1070 | * and retrieve the attributes specified in the AttributeList. | 1070 | * and retrieve the attributes specified in the AttributeList. |
1071 | * | 1071 | * |
1072 | * @param h the identity provider to use | 1072 | * @param h the reclaim to use |
1073 | * @param iss the issuing identity | 1073 | * @param iss the issuing identity |
1074 | * @param rp the subject of the ticket (the relying party) | 1074 | * @param rp the subject of the ticket (the relying party) |
1075 | * @param attrs the attributes that the relying party is given access to | 1075 | * @param attrs the attributes that the relying party is given access to |
@@ -1077,19 +1077,19 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At | |||
1077 | * @param cb_cls the callback closure | 1077 | * @param cb_cls the callback closure |
1078 | * @return handle to abort the operation | 1078 | * @return handle to abort the operation |
1079 | */ | 1079 | */ |
1080 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 1080 | struct GNUNET_RECLAIM_Operation * |
1081 | GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 1081 | GNUNET_RECLAIM_ticket_issue (struct GNUNET_RECLAIM_Handle *h, |
1082 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, | 1082 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, |
1083 | const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, | 1083 | const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, |
1084 | const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, | 1084 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
1085 | GNUNET_IDENTITY_PROVIDER_TicketCallback cb, | 1085 | GNUNET_RECLAIM_TicketCallback cb, |
1086 | void *cb_cls) | 1086 | void *cb_cls) |
1087 | { | 1087 | { |
1088 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 1088 | struct GNUNET_RECLAIM_Operation *op; |
1089 | struct IssueTicketMessage *tim; | 1089 | struct IssueTicketMessage *tim; |
1090 | size_t attr_len; | 1090 | size_t attr_len; |
1091 | 1091 | ||
1092 | op = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_Operation); | 1092 | op = GNUNET_new (struct GNUNET_RECLAIM_Operation); |
1093 | op->h = h; | 1093 | op->h = h; |
1094 | op->tr_cb = cb; | 1094 | op->tr_cb = cb; |
1095 | op->cls = cb_cls; | 1095 | op->cls = cb_cls; |
@@ -1097,15 +1097,15 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h | |||
1097 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, | 1097 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, |
1098 | h->op_tail, | 1098 | h->op_tail, |
1099 | op); | 1099 | op); |
1100 | attr_len = GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (attrs); | 1100 | attr_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs); |
1101 | op->env = GNUNET_MQ_msg_extra (tim, | 1101 | op->env = GNUNET_MQ_msg_extra (tim, |
1102 | attr_len, | 1102 | attr_len, |
1103 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_TICKET); | 1103 | GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET); |
1104 | tim->identity = *iss; | 1104 | tim->identity = *iss; |
1105 | tim->rp = *rp; | 1105 | tim->rp = *rp; |
1106 | tim->id = htonl (op->r_id); | 1106 | tim->id = htonl (op->r_id); |
1107 | 1107 | ||
1108 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize (attrs, | 1108 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (attrs, |
1109 | (char*)&tim[1]); | 1109 | (char*)&tim[1]); |
1110 | 1110 | ||
1111 | tim->attr_len = htons (attr_len); | 1111 | tim->attr_len = htons (attr_len); |
@@ -1119,24 +1119,24 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h | |||
1119 | * Consumes an issued ticket. The ticket is persisted | 1119 | * Consumes an issued ticket. The ticket is persisted |
1120 | * and used to retrieve identity information from the issuer | 1120 | * and used to retrieve identity information from the issuer |
1121 | * | 1121 | * |
1122 | * @param h the identity provider to use | 1122 | * @param h the reclaim to use |
1123 | * @param identity the identity that is the subject of the issued ticket (the relying party) | 1123 | * @param identity the identity that is the subject of the issued ticket (the relying party) |
1124 | * @param ticket the issued ticket to consume | 1124 | * @param ticket the issued ticket to consume |
1125 | * @param cb the callback to call | 1125 | * @param cb the callback to call |
1126 | * @param cb_cls the callback closure | 1126 | * @param cb_cls the callback closure |
1127 | * @return handle to abort the operation | 1127 | * @return handle to abort the operation |
1128 | */ | 1128 | */ |
1129 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 1129 | struct GNUNET_RECLAIM_Operation * |
1130 | GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 1130 | GNUNET_RECLAIM_ticket_consume (struct GNUNET_RECLAIM_Handle *h, |
1131 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 1131 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
1132 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 1132 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1133 | GNUNET_IDENTITY_PROVIDER_AttributeResult cb, | 1133 | GNUNET_RECLAIM_AttributeResult cb, |
1134 | void *cb_cls) | 1134 | void *cb_cls) |
1135 | { | 1135 | { |
1136 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 1136 | struct GNUNET_RECLAIM_Operation *op; |
1137 | struct ConsumeTicketMessage *ctm; | 1137 | struct ConsumeTicketMessage *ctm; |
1138 | 1138 | ||
1139 | op = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_Operation); | 1139 | op = GNUNET_new (struct GNUNET_RECLAIM_Operation); |
1140 | op->h = h; | 1140 | op->h = h; |
1141 | op->ar_cb = cb; | 1141 | op->ar_cb = cb; |
1142 | op->cls = cb_cls; | 1142 | op->cls = cb_cls; |
@@ -1145,14 +1145,14 @@ GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
1145 | h->op_tail, | 1145 | h->op_tail, |
1146 | op); | 1146 | op); |
1147 | op->env = GNUNET_MQ_msg_extra (ctm, | 1147 | op->env = GNUNET_MQ_msg_extra (ctm, |
1148 | sizeof (const struct GNUNET_IDENTITY_PROVIDER_Ticket), | 1148 | sizeof (const struct GNUNET_RECLAIM_Ticket), |
1149 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET); | 1149 | GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET); |
1150 | ctm->identity = *identity; | 1150 | ctm->identity = *identity; |
1151 | ctm->id = htonl (op->r_id); | 1151 | ctm->id = htonl (op->r_id); |
1152 | 1152 | ||
1153 | GNUNET_memcpy ((char*)&ctm[1], | 1153 | GNUNET_memcpy ((char*)&ctm[1], |
1154 | ticket, | 1154 | ticket, |
1155 | sizeof (const struct GNUNET_IDENTITY_PROVIDER_Ticket)); | 1155 | sizeof (const struct GNUNET_RECLAIM_Ticket)); |
1156 | 1156 | ||
1157 | if (NULL != h->mq) | 1157 | if (NULL != h->mq) |
1158 | GNUNET_MQ_send_copy (h->mq, | 1158 | GNUNET_MQ_send_copy (h->mq, |
@@ -1166,7 +1166,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
1166 | * Lists all tickets that have been issued to remote | 1166 | * Lists all tickets that have been issued to remote |
1167 | * identites (relying parties) | 1167 | * identites (relying parties) |
1168 | * | 1168 | * |
1169 | * @param h the identity provider to use | 1169 | * @param h the reclaim to use |
1170 | * @param identity the issuing identity | 1170 | * @param identity the issuing identity |
1171 | * @param error_cb function to call on error (i.e. disconnect), | 1171 | * @param error_cb function to call on error (i.e. disconnect), |
1172 | * the handle is afterwards invalid | 1172 | * the handle is afterwards invalid |
@@ -1179,17 +1179,17 @@ GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle | |||
1179 | * @param finish_cb_cls closure for @a finish_cb | 1179 | * @param finish_cb_cls closure for @a finish_cb |
1180 | * @return an iterator handle to use for iteration | 1180 | * @return an iterator handle to use for iteration |
1181 | */ | 1181 | */ |
1182 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator * | 1182 | struct GNUNET_RECLAIM_TicketIterator * |
1183 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 1183 | GNUNET_RECLAIM_ticket_iteration_start (struct GNUNET_RECLAIM_Handle *h, |
1184 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 1184 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
1185 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1185 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1186 | void *error_cb_cls, | 1186 | void *error_cb_cls, |
1187 | GNUNET_IDENTITY_PROVIDER_TicketCallback proc, | 1187 | GNUNET_RECLAIM_TicketCallback proc, |
1188 | void *proc_cls, | 1188 | void *proc_cls, |
1189 | GNUNET_SCHEDULER_TaskCallback finish_cb, | 1189 | GNUNET_SCHEDULER_TaskCallback finish_cb, |
1190 | void *finish_cb_cls) | 1190 | void *finish_cb_cls) |
1191 | { | 1191 | { |
1192 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it; | 1192 | struct GNUNET_RECLAIM_TicketIterator *it; |
1193 | struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub; | 1193 | struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub; |
1194 | struct GNUNET_MQ_Envelope *env; | 1194 | struct GNUNET_MQ_Envelope *env; |
1195 | struct TicketIterationStartMessage *msg; | 1195 | struct TicketIterationStartMessage *msg; |
@@ -1198,7 +1198,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER | |||
1198 | GNUNET_CRYPTO_ecdsa_key_get_public (identity, | 1198 | GNUNET_CRYPTO_ecdsa_key_get_public (identity, |
1199 | &identity_pub); | 1199 | &identity_pub); |
1200 | rid = h->r_id_gen++; | 1200 | rid = h->r_id_gen++; |
1201 | it = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_TicketIterator); | 1201 | it = GNUNET_new (struct GNUNET_RECLAIM_TicketIterator); |
1202 | it->h = h; | 1202 | it->h = h; |
1203 | it->error_cb = error_cb; | 1203 | it->error_cb = error_cb; |
1204 | it->error_cb_cls = error_cb_cls; | 1204 | it->error_cb_cls = error_cb_cls; |
@@ -1211,7 +1211,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER | |||
1211 | h->ticket_it_tail, | 1211 | h->ticket_it_tail, |
1212 | it); | 1212 | it); |
1213 | env = GNUNET_MQ_msg (msg, | 1213 | env = GNUNET_MQ_msg (msg, |
1214 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START); | 1214 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); |
1215 | msg->id = htonl (rid); | 1215 | msg->id = htonl (rid); |
1216 | msg->identity = identity_pub; | 1216 | msg->identity = identity_pub; |
1217 | msg->is_audience = htonl (GNUNET_NO); | 1217 | msg->is_audience = htonl (GNUNET_NO); |
@@ -1229,7 +1229,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER | |||
1229 | * Lists all tickets that have been issued to remote | 1229 | * Lists all tickets that have been issued to remote |
1230 | * identites (relying parties) | 1230 | * identites (relying parties) |
1231 | * | 1231 | * |
1232 | * @param h the identity provider to use | 1232 | * @param h the reclaim to use |
1233 | * @param identity the issuing identity | 1233 | * @param identity the issuing identity |
1234 | * @param error_cb function to call on error (i.e. disconnect), | 1234 | * @param error_cb function to call on error (i.e. disconnect), |
1235 | * the handle is afterwards invalid | 1235 | * the handle is afterwards invalid |
@@ -1242,23 +1242,23 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER | |||
1242 | * @param finish_cb_cls closure for @a finish_cb | 1242 | * @param finish_cb_cls closure for @a finish_cb |
1243 | * @return an iterator handle to use for iteration | 1243 | * @return an iterator handle to use for iteration |
1244 | */ | 1244 | */ |
1245 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator * | 1245 | struct GNUNET_RECLAIM_TicketIterator * |
1246 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_start_rp (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 1246 | GNUNET_RECLAIM_ticket_iteration_start_rp (struct GNUNET_RECLAIM_Handle *h, |
1247 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 1247 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
1248 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1248 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1249 | void *error_cb_cls, | 1249 | void *error_cb_cls, |
1250 | GNUNET_IDENTITY_PROVIDER_TicketCallback proc, | 1250 | GNUNET_RECLAIM_TicketCallback proc, |
1251 | void *proc_cls, | 1251 | void *proc_cls, |
1252 | GNUNET_SCHEDULER_TaskCallback finish_cb, | 1252 | GNUNET_SCHEDULER_TaskCallback finish_cb, |
1253 | void *finish_cb_cls) | 1253 | void *finish_cb_cls) |
1254 | { | 1254 | { |
1255 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it; | 1255 | struct GNUNET_RECLAIM_TicketIterator *it; |
1256 | struct GNUNET_MQ_Envelope *env; | 1256 | struct GNUNET_MQ_Envelope *env; |
1257 | struct TicketIterationStartMessage *msg; | 1257 | struct TicketIterationStartMessage *msg; |
1258 | uint32_t rid; | 1258 | uint32_t rid; |
1259 | 1259 | ||
1260 | rid = h->r_id_gen++; | 1260 | rid = h->r_id_gen++; |
1261 | it = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_TicketIterator); | 1261 | it = GNUNET_new (struct GNUNET_RECLAIM_TicketIterator); |
1262 | it->h = h; | 1262 | it->h = h; |
1263 | it->error_cb = error_cb; | 1263 | it->error_cb = error_cb; |
1264 | it->error_cb_cls = error_cb_cls; | 1264 | it->error_cb_cls = error_cb_cls; |
@@ -1271,7 +1271,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start_rp (struct GNUNET_IDENTITY_PROVI | |||
1271 | h->ticket_it_tail, | 1271 | h->ticket_it_tail, |
1272 | it); | 1272 | it); |
1273 | env = GNUNET_MQ_msg (msg, | 1273 | env = GNUNET_MQ_msg (msg, |
1274 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START); | 1274 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); |
1275 | msg->id = htonl (rid); | 1275 | msg->id = htonl (rid); |
1276 | msg->identity = *identity; | 1276 | msg->identity = *identity; |
1277 | msg->is_audience = htonl (GNUNET_YES); | 1277 | msg->is_audience = htonl (GNUNET_YES); |
@@ -1286,20 +1286,20 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start_rp (struct GNUNET_IDENTITY_PROVI | |||
1286 | } | 1286 | } |
1287 | 1287 | ||
1288 | /** | 1288 | /** |
1289 | * Calls the record processor specified in #GNUNET_IDENTITY_PROVIDER_ticket_iteration_start | 1289 | * Calls the record processor specified in #GNUNET_RECLAIM_ticket_iteration_start |
1290 | * for the next record. | 1290 | * for the next record. |
1291 | * | 1291 | * |
1292 | * @param it the iterator | 1292 | * @param it the iterator |
1293 | */ | 1293 | */ |
1294 | void | 1294 | void |
1295 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_next (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it) | 1295 | GNUNET_RECLAIM_ticket_iteration_next (struct GNUNET_RECLAIM_TicketIterator *it) |
1296 | { | 1296 | { |
1297 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = it->h; | 1297 | struct GNUNET_RECLAIM_Handle *h = it->h; |
1298 | struct TicketIterationNextMessage *msg; | 1298 | struct TicketIterationNextMessage *msg; |
1299 | struct GNUNET_MQ_Envelope *env; | 1299 | struct GNUNET_MQ_Envelope *env; |
1300 | 1300 | ||
1301 | env = GNUNET_MQ_msg (msg, | 1301 | env = GNUNET_MQ_msg (msg, |
1302 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT); | 1302 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT); |
1303 | msg->id = htonl (it->r_id); | 1303 | msg->id = htonl (it->r_id); |
1304 | GNUNET_MQ_send (h->mq, | 1304 | GNUNET_MQ_send (h->mq, |
1305 | env); | 1305 | env); |
@@ -1309,21 +1309,21 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_next (struct GNUNET_IDENTITY_PROVIDER_ | |||
1309 | /** | 1309 | /** |
1310 | * Stops iteration and releases the idp handle for further calls. Must | 1310 | * Stops iteration and releases the idp handle for further calls. Must |
1311 | * be called on any iteration that has not yet completed prior to calling | 1311 | * be called on any iteration that has not yet completed prior to calling |
1312 | * #GNUNET_IDENTITY_PROVIDER_disconnect. | 1312 | * #GNUNET_RECLAIM_disconnect. |
1313 | * | 1313 | * |
1314 | * @param it the iterator | 1314 | * @param it the iterator |
1315 | */ | 1315 | */ |
1316 | void | 1316 | void |
1317 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it) | 1317 | GNUNET_RECLAIM_ticket_iteration_stop (struct GNUNET_RECLAIM_TicketIterator *it) |
1318 | { | 1318 | { |
1319 | struct GNUNET_IDENTITY_PROVIDER_Handle *h = it->h; | 1319 | struct GNUNET_RECLAIM_Handle *h = it->h; |
1320 | struct GNUNET_MQ_Envelope *env; | 1320 | struct GNUNET_MQ_Envelope *env; |
1321 | struct TicketIterationStopMessage *msg; | 1321 | struct TicketIterationStopMessage *msg; |
1322 | 1322 | ||
1323 | if (NULL != h->mq) | 1323 | if (NULL != h->mq) |
1324 | { | 1324 | { |
1325 | env = GNUNET_MQ_msg (msg, | 1325 | env = GNUNET_MQ_msg (msg, |
1326 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP); | 1326 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP); |
1327 | msg->id = htonl (it->r_id); | 1327 | msg->id = htonl (it->r_id); |
1328 | GNUNET_MQ_send (h->mq, | 1328 | GNUNET_MQ_send (h->mq, |
1329 | env); | 1329 | env); |
@@ -1335,26 +1335,26 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_ | |||
1335 | * Revoked an issued ticket. The relying party will be unable to retrieve | 1335 | * Revoked an issued ticket. The relying party will be unable to retrieve |
1336 | * updated attributes. | 1336 | * updated attributes. |
1337 | * | 1337 | * |
1338 | * @param h the identity provider to use | 1338 | * @param h the reclaim to use |
1339 | * @param identity the issuing identity | 1339 | * @param identity the issuing identity |
1340 | * @param ticket the ticket to revoke | 1340 | * @param ticket the ticket to revoke |
1341 | * @param cb the callback | 1341 | * @param cb the callback |
1342 | * @param cb_cls the callback closure | 1342 | * @param cb_cls the callback closure |
1343 | * @return handle to abort the operation | 1343 | * @return handle to abort the operation |
1344 | */ | 1344 | */ |
1345 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 1345 | struct GNUNET_RECLAIM_Operation * |
1346 | GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | 1346 | GNUNET_RECLAIM_ticket_revoke (struct GNUNET_RECLAIM_Handle *h, |
1347 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 1347 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
1348 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | 1348 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1349 | GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb, | 1349 | GNUNET_RECLAIM_ContinuationWithStatus cb, |
1350 | void *cb_cls) | 1350 | void *cb_cls) |
1351 | { | 1351 | { |
1352 | struct GNUNET_IDENTITY_PROVIDER_Operation *op; | 1352 | struct GNUNET_RECLAIM_Operation *op; |
1353 | struct RevokeTicketMessage *msg; | 1353 | struct RevokeTicketMessage *msg; |
1354 | uint32_t rid; | 1354 | uint32_t rid; |
1355 | 1355 | ||
1356 | rid = h->r_id_gen++; | 1356 | rid = h->r_id_gen++; |
1357 | op = GNUNET_new (struct GNUNET_IDENTITY_PROVIDER_Operation); | 1357 | op = GNUNET_new (struct GNUNET_RECLAIM_Operation); |
1358 | op->h = h; | 1358 | op->h = h; |
1359 | op->rvk_cb = cb; | 1359 | op->rvk_cb = cb; |
1360 | op->cls = cb_cls; | 1360 | op->cls = cb_cls; |
@@ -1363,13 +1363,13 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle * | |||
1363 | h->op_tail, | 1363 | h->op_tail, |
1364 | op); | 1364 | op); |
1365 | op->env = GNUNET_MQ_msg_extra (msg, | 1365 | op->env = GNUNET_MQ_msg_extra (msg, |
1366 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket), | 1366 | sizeof (struct GNUNET_RECLAIM_Ticket), |
1367 | GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET); | 1367 | GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET); |
1368 | msg->id = htonl (rid); | 1368 | msg->id = htonl (rid); |
1369 | msg->identity = *identity; | 1369 | msg->identity = *identity; |
1370 | GNUNET_memcpy (&msg[1], | 1370 | GNUNET_memcpy (&msg[1], |
1371 | ticket, | 1371 | ticket, |
1372 | sizeof (struct GNUNET_IDENTITY_PROVIDER_Ticket)); | 1372 | sizeof (struct GNUNET_RECLAIM_Ticket)); |
1373 | if (NULL != h->mq) { | 1373 | if (NULL != h->mq) { |
1374 | GNUNET_MQ_send (h->mq, | 1374 | GNUNET_MQ_send (h->mq, |
1375 | op->env); | 1375 | op->env); |
@@ -1380,4 +1380,4 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle * | |||
1380 | 1380 | ||
1381 | 1381 | ||
1382 | 1382 | ||
1383 | /* end of identity_provider_api.c */ | 1383 | /* end of reclaim_api.c */ |
diff --git a/src/reclaim/test_reclaim.sh b/src/reclaim/test_reclaim.sh new file mode 100755 index 000000000..311f5382a --- /dev/null +++ b/src/reclaim/test_reclaim.sh | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash | ||
2 | #trap "gnunet-arm -e -c test_reclaim_lookup.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_reclaim.conf | ||
27 | gnunet-identity -C testego -c test_reclaim.conf | ||
28 | valgrind gnunet-reclaim -e testego -a email -V john@doe.gnu -c test_reclaim.conf | ||
29 | gnunet-reclaim -e testego -a name -V John -c test_reclaim.conf | ||
30 | gnunet-reclaim -e testego -D -c test_reclaim.conf | ||
31 | gnunet-arm -e -c test_reclaim.conf | ||
diff --git a/src/reclaim/test_reclaim_attribute.sh b/src/reclaim/test_reclaim_attribute.sh new file mode 100755 index 000000000..39bd715b7 --- /dev/null +++ b/src/reclaim/test_reclaim_attribute.sh | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_reclaim.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_reclaim.conf | ||
27 | #gnunet-arm -i rest -c test_reclaim.conf | ||
28 | gnunet-identity -C testego -c test_reclaim.conf | ||
29 | gnunet-identity -C rpego -c test_reclaim.conf | ||
30 | TEST_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep testego | awk '{print $3}') | ||
31 | gnunet-reclaim -e testego -a email -V john@doe.gnu -c test_reclaim.conf | ||
32 | gnunet-reclaim -e testego -a name -V John -c test_reclaim.conf > /dev/null 2>&1 | ||
33 | if test $? != 0 | ||
34 | then | ||
35 | echo "Failed." | ||
36 | exit 1 | ||
37 | fi | ||
38 | |||
39 | #curl localhost:7776/reclaim/attributes/testego | ||
40 | gnunet-arm -e -c test_reclaim.conf | ||
diff --git a/src/reclaim/test_reclaim_consume.sh b/src/reclaim/test_reclaim_consume.sh new file mode 100755 index 000000000..36c8052d0 --- /dev/null +++ b/src/reclaim/test_reclaim_consume.sh | |||
@@ -0,0 +1,43 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_reclaim.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_reclaim.conf | ||
27 | #gnunet-arm -i rest -c test_reclaim.conf | ||
28 | gnunet-identity -C testego -c test_reclaim.conf | ||
29 | gnunet-identity -C rpego -c test_reclaim.conf | ||
30 | SUBJECT_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep rpego | awk '{print $3}') | ||
31 | TEST_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep testego | awk '{print $3}') | ||
32 | gnunet-reclaim -e testego -a email -V john@doe.gnu -c test_reclaim.conf | ||
33 | gnunet-reclaim -e testego -a name -V John -c test_reclaim.conf | ||
34 | TICKET=$(gnunet-reclaim -e testego -i "email,name" -r $SUBJECT_KEY -c test_reclaim.conf | awk '{print $1}') | ||
35 | gnunet-reclaim -e rpego -C $TICKET -c test_reclaim.conf > /dev/null 2>&1 | ||
36 | |||
37 | if test $? != 0 | ||
38 | then | ||
39 | "Failed." | ||
40 | exit 1 | ||
41 | fi | ||
42 | #curl http://localhost:7776/reclaim/tickets/testego | ||
43 | gnunet-arm -e -c test_reclaim.conf | ||
diff --git a/src/identity-provider/test_idp_defaults.conf b/src/reclaim/test_reclaim_defaults.conf index a9a197dea..a9a197dea 100644 --- a/src/identity-provider/test_idp_defaults.conf +++ b/src/reclaim/test_reclaim_defaults.conf | |||
diff --git a/src/reclaim/test_reclaim_issue.sh b/src/reclaim/test_reclaim_issue.sh new file mode 100755 index 000000000..6a71470e1 --- /dev/null +++ b/src/reclaim/test_reclaim_issue.sh | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_reclaim.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_reclaim.conf | ||
27 | #gnunet-arm -i rest -c test_reclaim.conf | ||
28 | gnunet-identity -C testego -c test_reclaim.conf | ||
29 | gnunet-identity -C rpego -c test_reclaim.conf | ||
30 | SUBJECT_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep rpego | awk '{print $3}') | ||
31 | TEST_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep testego | awk '{print $3}') | ||
32 | gnunet-reclaim -e testego -a email -V john@doe.gnu -c test_reclaim.conf > /dev/null 2>&1 | ||
33 | gnunet-reclaim -e testego -a name -V John -c test_reclaim.conf > /dev/null 2>&1 | ||
34 | #gnunet-reclaim -e testego -D -c test_reclaim.conf | ||
35 | gnunet-reclaim -e testego -i "email,name" -r $SUBJECT_KEY -c test_reclaim.conf > /dev/null 2>&1 | ||
36 | if test $? != 0 | ||
37 | then | ||
38 | echo "Failed." | ||
39 | exit 1 | ||
40 | fi | ||
41 | #curl http://localhost:7776/reclaim/attributes/testego | ||
42 | gnunet-arm -e -c test_reclaim.conf | ||
diff --git a/src/reclaim/test_reclaim_revoke.sh b/src/reclaim/test_reclaim_revoke.sh new file mode 100755 index 000000000..595752fd8 --- /dev/null +++ b/src/reclaim/test_reclaim_revoke.sh | |||
@@ -0,0 +1,65 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_reclaim.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | # (1) PKEY1.user -> PKEY2.resu.user | ||
19 | # (2) PKEY2.resu -> PKEY3 | ||
20 | # (3) PKEY3.user -> PKEY4 | ||
21 | |||
22 | |||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | ||
24 | |||
25 | TEST_ATTR="test" | ||
26 | gnunet-arm -s -c test_reclaim.conf 2&>1 > /dev/null | ||
27 | gnunet-identity -C alice -c test_reclaim.conf | ||
28 | gnunet-identity -C bob -c test_reclaim.conf | ||
29 | gnunet-identity -C eve -c test_reclaim.conf | ||
30 | ALICE_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep alice | awk '{print $3}') | ||
31 | BOB_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep bob | awk '{print $3}') | ||
32 | EVE_KEY=$(gnunet-identity -d -c test_reclaim.conf | grep eve | awk '{print $3}') | ||
33 | |||
34 | gnunet-reclaim -e alice -E 15s -a email -V john@doe.gnu -c test_reclaim.conf | ||
35 | gnunet-reclaim -e alice -E 15s -a name -V John -c test_reclaim.conf | ||
36 | TICKET_BOB=$(gnunet-reclaim -e alice -i "email,name" -r $BOB_KEY -c test_reclaim.conf | awk '{print $1}') | ||
37 | #gnunet-reclaim -e bob -C $TICKET_BOB -c test_reclaim.conf | ||
38 | TICKET_EVE=$(gnunet-reclaim -e alice -i "email" -r $EVE_KEY -c test_reclaim.conf | awk '{print $1}') | ||
39 | |||
40 | #echo "Consuming $TICKET" | ||
41 | #gnunet-reclaim -e eve -C $TICKET_EVE -c test_reclaim.conf | ||
42 | gnunet-reclaim -e alice -R $TICKET_EVE -c test_reclaim.conf | ||
43 | |||
44 | #sleep 6 | ||
45 | |||
46 | gnunet-reclaim -e eve -C $TICKET_EVE -c test_reclaim.conf 2&>1 >/dev/null | ||
47 | if test $? == 0 | ||
48 | then | ||
49 | echo "Eve can still resolve attributes..." | ||
50 | gnunet-arm -e -c test_reclaim.conf | ||
51 | exit 1 | ||
52 | fi | ||
53 | |||
54 | gnunet-arm -e -c test_reclaim.conf | ||
55 | gnunet-arm -s -c test_reclaim.conf 2&>1 > /dev/null | ||
56 | |||
57 | gnunet-reclaim -e bob -C $TICKET_BOB -c test_reclaim.conf 2&>1 >/dev/null | ||
58 | if test $? != 0 | ||
59 | then | ||
60 | echo "Bob cannot resolve attributes..." | ||
61 | gnunet-arm -e -c test_reclaim.conf | ||
62 | exit 1 | ||
63 | fi | ||
64 | |||
65 | gnunet-arm -e -c test_reclaim.conf | ||