diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-18 13:37:38 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-18 13:37:38 +0200 |
commit | 9ef4abad615bea12d13be542b8ae5fbeb2dfee32 (patch) | |
tree | 8875a687e004d331c9ea6a1d511a328c72b88113 /src/reclaim | |
parent | e95236b3ed78cd597c15f34b89385295702b627f (diff) | |
download | gnunet-9ef4abad615bea12d13be542b8ae5fbeb2dfee32.tar.gz gnunet-9ef4abad615bea12d13be542b8ae5fbeb2dfee32.zip |
NEWS: Refactoring components under src/ into lib/, plugin/, cli/ and service/
This also includes a necessary API refactoring of crypto from IDENTITY
to UTIL.
Diffstat (limited to 'src/reclaim')
-rw-r--r-- | src/reclaim/Makefile.am | 40 | ||||
-rw-r--r-- | src/reclaim/did.h | 2 | ||||
-rw-r--r-- | src/reclaim/did_core.c | 10 | ||||
-rw-r--r-- | src/reclaim/did_helper.c | 18 | ||||
-rw-r--r-- | src/reclaim/did_helper.h | 10 | ||||
-rw-r--r-- | src/reclaim/did_misc.c | 8 | ||||
-rw-r--r-- | src/reclaim/gnunet-did.c | 6 | ||||
-rw-r--r-- | src/reclaim/gnunet-reclaim.c | 14 | ||||
-rw-r--r-- | src/reclaim/gnunet-service-reclaim.c | 86 | ||||
-rw-r--r-- | src/reclaim/gnunet-service-reclaim_tickets.c | 46 | ||||
-rw-r--r-- | src/reclaim/gnunet-service-reclaim_tickets.h | 12 | ||||
-rw-r--r-- | src/reclaim/oidc_helper.c | 42 | ||||
-rw-r--r-- | src/reclaim/oidc_helper.h | 14 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_openid_connect.c | 50 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 44 | ||||
-rw-r--r-- | src/reclaim/reclaim_api.c | 94 | ||||
-rw-r--r-- | src/reclaim/test_did_helper.c | 10 |
17 files changed, 253 insertions, 253 deletions
diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am index 4c84a8efc..ac3332ecf 100644 --- a/src/reclaim/Makefile.am +++ b/src/reclaim/Makefile.am | |||
@@ -61,10 +61,10 @@ libgnunet_plugin_rest_reclaim_la_LIBADD = \ | |||
61 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 61 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
62 | libgnunetreclaim.la \ | 62 | libgnunetreclaim.la \ |
63 | $(top_builddir)/src/json/libgnunetjson.la \ | 63 | $(top_builddir)/src/json/libgnunetjson.la \ |
64 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 64 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
65 | $(top_builddir)/src/rest/libgnunetrest.la \ | 65 | $(top_builddir)/src/rest/libgnunetrest.la \ |
66 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 66 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
67 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 67 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ |
68 | $(LTLIBINTL) -ljansson $(MHD_LIBS) | 68 | $(LTLIBINTL) -ljansson $(MHD_LIBS) |
69 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ | 69 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ |
70 | $(GN_PLUGIN_LDFLAGS) | 70 | $(GN_PLUGIN_LDFLAGS) |
@@ -81,8 +81,8 @@ libgnunet_plugin_rest_openid_connect_la_LIBADD = \ | |||
81 | $(top_builddir)/src/rest/libgnunetrest.la \ | 81 | $(top_builddir)/src/rest/libgnunetrest.la \ |
82 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 82 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
83 | $(top_builddir)/src/gns/libgnunetgns.la \ | 83 | $(top_builddir)/src/gns/libgnunetgns.la \ |
84 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 84 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
85 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 85 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ |
86 | $(LTLIBINTL) -ljansson -ljose $(MHD_LIBS) \ | 86 | $(LTLIBINTL) -ljansson -ljose $(MHD_LIBS) \ |
87 | $(LIBGCRYPT_LIBS) | 87 | $(LIBGCRYPT_LIBS) |
88 | libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \ | 88 | libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \ |
@@ -98,7 +98,7 @@ libgnunet_plugin_rest_pabc_la_LIBADD = \ | |||
98 | libgnunetreclaim.la \ | 98 | libgnunetreclaim.la \ |
99 | $(top_builddir)/src/json/libgnunetjson.la \ | 99 | $(top_builddir)/src/json/libgnunetjson.la \ |
100 | $(top_builddir)/src/rest/libgnunetrest.la \ | 100 | $(top_builddir)/src/rest/libgnunetrest.la \ |
101 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 101 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ |
102 | $(LTLIBINTL) -ljansson -lpabc $(MHD_LIBS) | 102 | $(LTLIBINTL) -ljansson -lpabc $(MHD_LIBS) |
103 | libgnunet_plugin_rest_pabc_la_LDFLAGS = \ | 103 | libgnunet_plugin_rest_pabc_la_LDFLAGS = \ |
104 | $(GN_PLUGIN_LDFLAGS) | 104 | $(GN_PLUGIN_LDFLAGS) |
@@ -109,7 +109,7 @@ endif | |||
109 | libgnunet_plugin_gnsrecord_reclaim_la_SOURCES = \ | 109 | libgnunet_plugin_gnsrecord_reclaim_la_SOURCES = \ |
110 | plugin_gnsrecord_reclaim.c | 110 | plugin_gnsrecord_reclaim.c |
111 | libgnunet_plugin_gnsrecord_reclaim_la_LIBADD = \ | 111 | libgnunet_plugin_gnsrecord_reclaim_la_LIBADD = \ |
112 | $(top_builddir)/src/util/libgnunetutil.la \ | 112 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
113 | $(LTLIBINTL) | 113 | $(LTLIBINTL) |
114 | libgnunet_plugin_gnsrecord_reclaim_la_LDFLAGS = \ | 114 | libgnunet_plugin_gnsrecord_reclaim_la_LDFLAGS = \ |
115 | $(GN_PLUGIN_LDFLAGS) | 115 | $(GN_PLUGIN_LDFLAGS) |
@@ -120,9 +120,9 @@ gnunet_service_reclaim_SOURCES = \ | |||
120 | gnunet-service-reclaim_tickets.c \ | 120 | gnunet-service-reclaim_tickets.c \ |
121 | gnunet-service-reclaim_tickets.h | 121 | gnunet-service-reclaim_tickets.h |
122 | gnunet_service_reclaim_LDADD = \ | 122 | gnunet_service_reclaim_LDADD = \ |
123 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 123 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
124 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 124 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
125 | $(top_builddir)/src/util/libgnunetutil.la \ | 125 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
126 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 126 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
127 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 127 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
128 | libgnunetreclaim.la \ | 128 | libgnunetreclaim.la \ |
@@ -137,7 +137,7 @@ libgnunetreclaim_la_SOURCES = \ | |||
137 | reclaim_credential.c \ | 137 | reclaim_credential.c \ |
138 | reclaim_credential.h | 138 | reclaim_credential.h |
139 | libgnunetreclaim_la_LIBADD = \ | 139 | libgnunetreclaim_la_LIBADD = \ |
140 | $(top_builddir)/src/util/libgnunetutil.la \ | 140 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
141 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 141 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
142 | $(GN_LIBINTL) $(XLIB) | 142 | $(GN_LIBINTL) $(XLIB) |
143 | libgnunetreclaim_la_LDFLAGS = \ | 143 | libgnunetreclaim_la_LDFLAGS = \ |
@@ -150,9 +150,9 @@ libgnunetdid_la_SOURCES = \ | |||
150 | did_core.h \ | 150 | did_core.h \ |
151 | did_core.c | 151 | did_core.c |
152 | libgnunetdid_la_LIBADD = \ | 152 | libgnunetdid_la_LIBADD = \ |
153 | $(top_builddir)/src/util/libgnunetutil.la \ | 153 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
154 | $(top_builddir)/src/gns/libgnunetgns.la \ | 154 | $(top_builddir)/src/gns/libgnunetgns.la \ |
155 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 155 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
156 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 156 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
157 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 157 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
158 | -ljansson \ | 158 | -ljansson \ |
@@ -164,7 +164,7 @@ libgnunetdid_la_LDFLAGS = \ | |||
164 | libgnunet_plugin_reclaim_attribute_basic_la_SOURCES = \ | 164 | libgnunet_plugin_reclaim_attribute_basic_la_SOURCES = \ |
165 | plugin_reclaim_attribute_basic.c | 165 | plugin_reclaim_attribute_basic.c |
166 | libgnunet_plugin_reclaim_attribute_basic_la_LIBADD = \ | 166 | libgnunet_plugin_reclaim_attribute_basic_la_LIBADD = \ |
167 | $(top_builddir)/src/util/libgnunetutil.la \ | 167 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
168 | $(LTLIBINTL) | 168 | $(LTLIBINTL) |
169 | libgnunet_plugin_reclaim_attribute_basic_la_LDFLAGS = \ | 169 | libgnunet_plugin_reclaim_attribute_basic_la_LDFLAGS = \ |
170 | $(GN_PLUGIN_LDFLAGS) | 170 | $(GN_PLUGIN_LDFLAGS) |
@@ -175,7 +175,7 @@ libgnunet_plugin_reclaim_credential_pabc_la_SOURCES = \ | |||
175 | pabc_helper.c \ | 175 | pabc_helper.c \ |
176 | pabc_helper.h | 176 | pabc_helper.h |
177 | libgnunet_plugin_reclaim_credential_pabc_la_LIBADD = \ | 177 | libgnunet_plugin_reclaim_credential_pabc_la_LIBADD = \ |
178 | $(top_builddir)/src/util/libgnunetutil.la \ | 178 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
179 | libgnunetreclaim.la \ | 179 | libgnunetreclaim.la \ |
180 | -ljansson\ | 180 | -ljansson\ |
181 | -lpabc \ | 181 | -lpabc \ |
@@ -189,7 +189,7 @@ libgnunet_plugin_reclaim_credential_jwt_la_SOURCES = \ | |||
189 | plugin_reclaim_credential_jwt.c | 189 | plugin_reclaim_credential_jwt.c |
190 | libgnunet_plugin_reclaim_credential_jwt_la_LIBADD = \ | 190 | libgnunet_plugin_reclaim_credential_jwt_la_LIBADD = \ |
191 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 191 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
192 | $(top_builddir)/src/util/libgnunetutil.la \ | 192 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
193 | libgnunetreclaim.la \ | 193 | libgnunetreclaim.la \ |
194 | -ljansson\ | 194 | -ljansson\ |
195 | $(LTLIBINTL) | 195 | $(LTLIBINTL) |
@@ -199,7 +199,7 @@ libgnunet_plugin_reclaim_credential_jwt_la_LDFLAGS = \ | |||
199 | gnunet_reclaim_SOURCES = \ | 199 | gnunet_reclaim_SOURCES = \ |
200 | gnunet-reclaim.c | 200 | gnunet-reclaim.c |
201 | gnunet_reclaim_LDADD = \ | 201 | gnunet_reclaim_LDADD = \ |
202 | $(top_builddir)/src/util/libgnunetutil.la \ | 202 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
203 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 203 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
204 | libgnunetreclaim.la \ | 204 | libgnunetreclaim.la \ |
205 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 205 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
@@ -208,16 +208,16 @@ gnunet_reclaim_LDADD = \ | |||
208 | test_reclaim_attribute_SOURCES = \ | 208 | test_reclaim_attribute_SOURCES = \ |
209 | test_reclaim_attribute.c | 209 | test_reclaim_attribute.c |
210 | test_reclaim_attribute_LDADD = \ | 210 | test_reclaim_attribute_LDADD = \ |
211 | $(top_builddir)/src/util/libgnunetutil.la \ | 211 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
212 | libgnunetreclaim.la \ | 212 | libgnunetreclaim.la \ |
213 | $(GN_LIBINTL) | 213 | $(GN_LIBINTL) |
214 | 214 | ||
215 | gnunet_did_SOURCES = \ | 215 | gnunet_did_SOURCES = \ |
216 | gnunet-did.c | 216 | gnunet-did.c |
217 | gnunet_did_LDADD = \ | 217 | gnunet_did_LDADD = \ |
218 | $(top_builddir)/src/util/libgnunetutil.la \ | 218 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
219 | $(top_builddir)/src/gns/libgnunetgns.la \ | 219 | $(top_builddir)/src/gns/libgnunetgns.la \ |
220 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 220 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
221 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 221 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
222 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 222 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
223 | libgnunetdid.la \ | 223 | libgnunetdid.la \ |
@@ -227,9 +227,9 @@ gnunet_did_LDADD = \ | |||
227 | test_did_helper_SOURCES = \ | 227 | test_did_helper_SOURCES = \ |
228 | test_did_helper.c | 228 | test_did_helper.c |
229 | test_did_helper_LDADD = \ | 229 | test_did_helper_LDADD = \ |
230 | $(top_builddir)/src/util/libgnunetutil.la \ | 230 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
231 | $(top_builddir)/src/gns/libgnunetgns.la \ | 231 | $(top_builddir)/src/gns/libgnunetgns.la \ |
232 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 232 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
233 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 233 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
234 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 234 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
235 | libgnunetdid.la \ | 235 | libgnunetdid.la \ |
diff --git a/src/reclaim/did.h b/src/reclaim/did.h index 42f65db26..ab1b65925 100644 --- a/src/reclaim/did.h +++ b/src/reclaim/did.h | |||
@@ -44,6 +44,6 @@ DID_ego_to_did (struct GNUNET_IDENTITY_Ego *ego); | |||
44 | */ | 44 | */ |
45 | enum GNUNET_GenericReturnValue | 45 | enum GNUNET_GenericReturnValue |
46 | DID_public_key_from_did (const char* did, | 46 | DID_public_key_from_did (const char* did, |
47 | struct GNUNET_IDENTITY_PublicKey *pk); | 47 | struct GNUNET_CRYPTO_PublicKey *pk); |
48 | 48 | ||
49 | #endif | 49 | #endif |
diff --git a/src/reclaim/did_core.c b/src/reclaim/did_core.c index 4f2bd5a87..ce3336b91 100644 --- a/src/reclaim/did_core.c +++ b/src/reclaim/did_core.c | |||
@@ -90,7 +90,7 @@ DID_resolve (const char *did, | |||
90 | DID_resolve_callback *cont, | 90 | DID_resolve_callback *cont, |
91 | void *cls) | 91 | void *cls) |
92 | { | 92 | { |
93 | struct GNUNET_IDENTITY_PublicKey pkey; | 93 | struct GNUNET_CRYPTO_PublicKey pkey; |
94 | 94 | ||
95 | // did, gns_handle and cont must me set | 95 | // did, gns_handle and cont must me set |
96 | if ((did == NULL) || (gns_handle == NULL) || (cont == NULL)) | 96 | if ((did == NULL) || (gns_handle == NULL) || (cont == NULL)) |
@@ -151,13 +151,13 @@ struct DID_create_namestore_lookup_closure | |||
151 | static void | 151 | static void |
152 | DID_create_namestore_lookup_cb (void *cls, | 152 | DID_create_namestore_lookup_cb (void *cls, |
153 | const struct | 153 | const struct |
154 | GNUNET_IDENTITY_PrivateKey *zone, | 154 | GNUNET_CRYPTO_PrivateKey *zone, |
155 | const char *label, | 155 | const char *label, |
156 | unsigned int rd_count, | 156 | unsigned int rd_count, |
157 | const struct GNUNET_GNSRECORD_Data *rd) | 157 | const struct GNUNET_GNSRECORD_Data *rd) |
158 | { | 158 | { |
159 | struct GNUNET_GNSRECORD_Data record_data; | 159 | struct GNUNET_GNSRECORD_Data record_data; |
160 | struct GNUNET_IDENTITY_PublicKey pkey; | 160 | struct GNUNET_CRYPTO_PublicKey pkey; |
161 | 161 | ||
162 | const char *did_document | 162 | const char *did_document |
163 | = ((struct DID_create_namestore_lookup_closure *) cls)->did_document; | 163 | = ((struct DID_create_namestore_lookup_closure *) cls)->did_document; |
@@ -180,7 +180,7 @@ DID_create_namestore_lookup_cb (void *cls, | |||
180 | } | 180 | } |
181 | else { | 181 | else { |
182 | // Get public key | 182 | // Get public key |
183 | GNUNET_IDENTITY_key_get_public (zone, &pkey); | 183 | GNUNET_CRYPTO_key_get_public (zone, &pkey); |
184 | 184 | ||
185 | // If no DID Document is given a default one is created | 185 | // If no DID Document is given a default one is created |
186 | if (did_document != NULL) | 186 | if (did_document != NULL) |
@@ -225,7 +225,7 @@ DID_create (const struct GNUNET_IDENTITY_Ego *ego, | |||
225 | DID_action_callback *cont, | 225 | DID_action_callback *cont, |
226 | void *cls) | 226 | void *cls) |
227 | { | 227 | { |
228 | struct GNUNET_IDENTITY_PublicKey pkey; | 228 | struct GNUNET_CRYPTO_PublicKey pkey; |
229 | 229 | ||
230 | // Ego, namestore_handle and cont must be set | 230 | // Ego, namestore_handle and cont must be set |
231 | if ((ego == NULL) || (namestore_handle == NULL) || (cont == NULL)) | 231 | if ((ego == NULL) || (namestore_handle == NULL) || (cont == NULL)) |
diff --git a/src/reclaim/did_helper.c b/src/reclaim/did_helper.c index 17f3b21b2..3aac027ee 100644 --- a/src/reclaim/did_helper.c +++ b/src/reclaim/did_helper.c | |||
@@ -42,12 +42,12 @@ | |||
42 | * TODO: Check if EdDSA | 42 | * TODO: Check if EdDSA |
43 | */ | 43 | */ |
44 | char* | 44 | char* |
45 | DID_pkey_to_did (struct GNUNET_IDENTITY_PublicKey *pkey) | 45 | DID_pkey_to_did (struct GNUNET_CRYPTO_PublicKey *pkey) |
46 | { | 46 | { |
47 | char *pkey_str; | 47 | char *pkey_str; |
48 | char *did_str; | 48 | char *did_str; |
49 | 49 | ||
50 | pkey_str = GNUNET_IDENTITY_public_key_to_string (pkey); | 50 | pkey_str = GNUNET_CRYPTO_public_key_to_string (pkey); |
51 | GNUNET_asprintf (&did_str, "%s%s", | 51 | GNUNET_asprintf (&did_str, "%s%s", |
52 | GNUNET_DID_METHOD_PREFIX, | 52 | GNUNET_DID_METHOD_PREFIX, |
53 | pkey_str); | 53 | pkey_str); |
@@ -66,7 +66,7 @@ DID_pkey_to_did (struct GNUNET_IDENTITY_PublicKey *pkey) | |||
66 | char* | 66 | char* |
67 | DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) | 67 | DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) |
68 | { | 68 | { |
69 | struct GNUNET_IDENTITY_PublicKey pkey; | 69 | struct GNUNET_CRYPTO_PublicKey pkey; |
70 | 70 | ||
71 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); | 71 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); |
72 | return DID_pkey_to_did (&pkey); | 72 | return DID_pkey_to_did (&pkey); |
@@ -76,7 +76,7 @@ DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) | |||
76 | * @brief Return the public key of a DID | 76 | * @brief Return the public key of a DID |
77 | */ | 77 | */ |
78 | enum GNUNET_GenericReturnValue | 78 | enum GNUNET_GenericReturnValue |
79 | DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) | 79 | DID_did_to_pkey (const char *did, struct GNUNET_CRYPTO_PublicKey *pkey) |
80 | { | 80 | { |
81 | char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */ | 81 | char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */ |
82 | 82 | ||
@@ -84,7 +84,7 @@ DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) | |||
84 | GNUNET_DID_METHOD_PREFIX "%" | 84 | GNUNET_DID_METHOD_PREFIX "%" |
85 | STR (MAX_DID_SPECIFIC_IDENTIFIER_LENGTH) | 85 | STR (MAX_DID_SPECIFIC_IDENTIFIER_LENGTH) |
86 | "s", pkey_str))) || | 86 | "s", pkey_str))) || |
87 | (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (pkey_str, pkey))) | 87 | (GNUNET_OK != GNUNET_CRYPTO_public_key_from_string (pkey_str, pkey))) |
88 | { | 88 | { |
89 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Could not decode given DID: %s\n", | 89 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Could not decode given DID: %s\n", |
90 | did); | 90 | did); |
@@ -97,7 +97,7 @@ DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) | |||
97 | /** | 97 | /** |
98 | * @brief Convert a base 64 encoded public key to a GNUNET key | 98 | * @brief Convert a base 64 encoded public key to a GNUNET key |
99 | */ | 99 | */ |
100 | struct GNUNET_IDENTITY_PublicKey * | 100 | struct GNUNET_CRYPTO_PublicKey * |
101 | GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str) | 101 | GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str) |
102 | { | 102 | { |
103 | return NULL; | 103 | return NULL; |
@@ -108,7 +108,7 @@ GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str) | |||
108 | */ | 108 | */ |
109 | char * | 109 | char * |
110 | DID_key_convert_gnunet_to_multibase_base64 (struct | 110 | DID_key_convert_gnunet_to_multibase_base64 (struct |
111 | GNUNET_IDENTITY_PublicKey * | 111 | GNUNET_CRYPTO_PublicKey * |
112 | pkey) | 112 | pkey) |
113 | { | 113 | { |
114 | struct GNUNET_CRYPTO_EddsaPublicKey pubkey = pkey->eddsa_key; | 114 | struct GNUNET_CRYPTO_EddsaPublicKey pubkey = pkey->eddsa_key; |
@@ -135,7 +135,7 @@ DID_key_convert_gnunet_to_multibase_base64 (struct | |||
135 | * @return void* Return pointer to the DID Document | 135 | * @return void* Return pointer to the DID Document |
136 | */ | 136 | */ |
137 | char * | 137 | char * |
138 | DID_pkey_to_did_document (struct GNUNET_IDENTITY_PublicKey *pkey) | 138 | DID_pkey_to_did_document (struct GNUNET_CRYPTO_PublicKey *pkey) |
139 | { | 139 | { |
140 | 140 | ||
141 | /* FIXME-MSC: This is effectively creating a DID Document default template for | 141 | /* FIXME-MSC: This is effectively creating a DID Document default template for |
@@ -196,7 +196,7 @@ DID_pkey_to_did_document (struct GNUNET_IDENTITY_PublicKey *pkey) | |||
196 | char * | 196 | char * |
197 | DID_identity_to_did_document (struct GNUNET_IDENTITY_Ego *ego) | 197 | DID_identity_to_did_document (struct GNUNET_IDENTITY_Ego *ego) |
198 | { | 198 | { |
199 | struct GNUNET_IDENTITY_PublicKey pkey; | 199 | struct GNUNET_CRYPTO_PublicKey pkey; |
200 | 200 | ||
201 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); | 201 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); |
202 | return DID_pkey_to_did (&pkey); | 202 | return DID_pkey_to_did (&pkey); |
diff --git a/src/reclaim/did_helper.h b/src/reclaim/did_helper.h index fea86af5e..d61992c68 100644 --- a/src/reclaim/did_helper.h +++ b/src/reclaim/did_helper.h | |||
@@ -31,7 +31,7 @@ | |||
31 | * @brief Return a DID for a given GNUNET public key | 31 | * @brief Return a DID for a given GNUNET public key |
32 | */ | 32 | */ |
33 | char * | 33 | char * |
34 | DID_pkey_to_did (struct GNUNET_IDENTITY_PublicKey *pkey); | 34 | DID_pkey_to_did (struct GNUNET_CRYPTO_PublicKey *pkey); |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * @brief Generate a DID for a given gnunet EGO | 37 | * @brief Generate a DID for a given gnunet EGO |
@@ -46,12 +46,12 @@ DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego); | |||
46 | * @brief Return the public key of a DID | 46 | * @brief Return the public key of a DID |
47 | */ | 47 | */ |
48 | enum GNUNET_GenericReturnValue | 48 | enum GNUNET_GenericReturnValue |
49 | DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey); | 49 | DID_did_to_pkey (const char *did, struct GNUNET_CRYPTO_PublicKey *pkey); |
50 | 50 | ||
51 | // /** | 51 | // /** |
52 | // * @brief Convert a base 64 encoded public key to a GNUNET key | 52 | // * @brief Convert a base 64 encoded public key to a GNUNET key |
53 | // */ | 53 | // */ |
54 | // struct GNUNET_IDENTITY_PublicKey * | 54 | // struct GNUNET_CRYPTO_PublicKey * |
55 | // GNUNET_DID_key_convert_multibase_base64_to_gnunet(char *); | 55 | // GNUNET_DID_key_convert_multibase_base64_to_gnunet(char *); |
56 | 56 | ||
57 | /** | 57 | /** |
@@ -59,13 +59,13 @@ DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey); | |||
59 | */ | 59 | */ |
60 | char * | 60 | char * |
61 | DID_key_convert_gnunet_to_multibase_base64 (struct | 61 | DID_key_convert_gnunet_to_multibase_base64 (struct |
62 | GNUNET_IDENTITY_PublicKey *); | 62 | GNUNET_CRYPTO_PublicKey *); |
63 | 63 | ||
64 | /** | 64 | /** |
65 | * @brief Generate the default DID document for a GNUNET public key | 65 | * @brief Generate the default DID document for a GNUNET public key |
66 | */ | 66 | */ |
67 | char * | 67 | char * |
68 | DID_pkey_to_did_document (struct GNUNET_IDENTITY_PublicKey *pkey); | 68 | DID_pkey_to_did_document (struct GNUNET_CRYPTO_PublicKey *pkey); |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * @brief Generate the default DID document for a GNUNET ego | 71 | * @brief Generate the default DID document for a GNUNET ego |
diff --git a/src/reclaim/did_misc.c b/src/reclaim/did_misc.c index 44b72a69f..32b127b2b 100644 --- a/src/reclaim/did_misc.c +++ b/src/reclaim/did_misc.c | |||
@@ -33,14 +33,14 @@ | |||
33 | char* | 33 | char* |
34 | DID_ego_to_did (struct GNUNET_IDENTITY_Ego *ego) | 34 | DID_ego_to_did (struct GNUNET_IDENTITY_Ego *ego) |
35 | { | 35 | { |
36 | struct GNUNET_IDENTITY_PublicKey pkey; // Get Public key | 36 | struct GNUNET_CRYPTO_PublicKey pkey; // Get Public key |
37 | char *pkey_str; | 37 | char *pkey_str; |
38 | char *did_str; | 38 | char *did_str; |
39 | size_t pkey_len; | 39 | size_t pkey_len; |
40 | 40 | ||
41 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); | 41 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); |
42 | 42 | ||
43 | pkey_str = GNUNET_IDENTITY_public_key_to_string (&pkey); | 43 | pkey_str = GNUNET_CRYPTO_public_key_to_string (&pkey); |
44 | GNUNET_asprintf (&did_str, "%s%s", | 44 | GNUNET_asprintf (&did_str, "%s%s", |
45 | GNUNET_RECLAIM_DID_METHOD_PREFIX, | 45 | GNUNET_RECLAIM_DID_METHOD_PREFIX, |
46 | pkey_str); | 46 | pkey_str); |
@@ -51,7 +51,7 @@ DID_ego_to_did (struct GNUNET_IDENTITY_Ego *ego) | |||
51 | 51 | ||
52 | enum GNUNET_GenericReturnValue | 52 | enum GNUNET_GenericReturnValue |
53 | DID_public_key_from_did (const char* did, | 53 | DID_public_key_from_did (const char* did, |
54 | struct GNUNET_IDENTITY_PublicKey *pk) | 54 | struct GNUNET_CRYPTO_PublicKey *pk) |
55 | { | 55 | { |
56 | /* FIXME-MSC: I suggest introducing a | 56 | /* FIXME-MSC: I suggest introducing a |
57 | * #define MAX_DID_LENGTH <something> | 57 | * #define MAX_DID_LENGTH <something> |
@@ -60,7 +60,7 @@ DID_public_key_from_did (const char* did, | |||
60 | char pkey_str[59]; | 60 | char pkey_str[59]; |
61 | 61 | ||
62 | if ((1 != (sscanf (did, GNUNET_RECLAIM_DID_METHOD_PREFIX"%58s", pkey_str))) || | 62 | if ((1 != (sscanf (did, GNUNET_RECLAIM_DID_METHOD_PREFIX"%58s", pkey_str))) || |
63 | (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (pkey_str, pk))) | 63 | (GNUNET_OK != GNUNET_CRYPTO_public_key_from_string (pkey_str, pk))) |
64 | { | 64 | { |
65 | return GNUNET_SYSERR; | 65 | return GNUNET_SYSERR; |
66 | } | 66 | } |
diff --git a/src/reclaim/gnunet-did.c b/src/reclaim/gnunet-did.c index 1f91e0ee2..e88a3671e 100644 --- a/src/reclaim/gnunet-did.c +++ b/src/reclaim/gnunet-did.c | |||
@@ -263,7 +263,7 @@ remove_did_document_namestore_cb (void *cls, enum GNUNET_ErrorCode ec) | |||
263 | static void | 263 | static void |
264 | remove_did_document_ego_lookup_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | 264 | remove_did_document_ego_lookup_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) |
265 | { | 265 | { |
266 | const struct GNUNET_IDENTITY_PrivateKey *skey = | 266 | const struct GNUNET_CRYPTO_PrivateKey *skey = |
267 | GNUNET_IDENTITY_ego_get_private_key (ego); | 267 | GNUNET_IDENTITY_ego_get_private_key (ego); |
268 | 268 | ||
269 | GNUNET_NAMESTORE_records_store (namestore_handle, | 269 | GNUNET_NAMESTORE_records_store (namestore_handle, |
@@ -335,7 +335,7 @@ create_did_cb (enum GNUNET_GenericReturnValue status, void *cls) | |||
335 | */ | 335 | */ |
336 | static void | 336 | static void |
337 | create_did_ego_create_cb (void *cls, | 337 | create_did_ego_create_cb (void *cls, |
338 | const struct GNUNET_IDENTITY_PrivateKey *pk, | 338 | const struct GNUNET_CRYPTO_PrivateKey *pk, |
339 | enum GNUNET_ErrorCode ec) | 339 | enum GNUNET_ErrorCode ec) |
340 | { | 340 | { |
341 | if (GNUNET_EC_NONE != ec) | 341 | if (GNUNET_EC_NONE != ec) |
@@ -366,7 +366,7 @@ create_did_ego_lockup_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
366 | GNUNET_IDENTITY_create (identity_handle, | 366 | GNUNET_IDENTITY_create (identity_handle, |
367 | egoname, | 367 | egoname, |
368 | NULL, | 368 | NULL, |
369 | GNUNET_IDENTITY_TYPE_EDDSA, | 369 | GNUNET_PUBLIC_KEY_TYPE_EDDSA, |
370 | &create_did_ego_create_cb, | 370 | &create_did_ego_create_cb, |
371 | egoname); | 371 | egoname); |
372 | } | 372 | } |
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c index cb8703495..efb2c2902 100644 --- a/src/reclaim/gnunet-reclaim.c +++ b/src/reclaim/gnunet-reclaim.c | |||
@@ -152,12 +152,12 @@ static struct GNUNET_RECLAIM_TicketIterator *ticket_iterator; | |||
152 | /** | 152 | /** |
153 | * ego private key | 153 | * ego private key |
154 | */ | 154 | */ |
155 | static const struct GNUNET_IDENTITY_PrivateKey *pkey; | 155 | static const struct GNUNET_CRYPTO_PrivateKey *pkey; |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * rp public key | 158 | * rp public key |
159 | */ | 159 | */ |
160 | static struct GNUNET_IDENTITY_PublicKey rp_key; | 160 | static struct GNUNET_CRYPTO_PublicKey rp_key; |
161 | 161 | ||
162 | /** | 162 | /** |
163 | * Ticket to consume | 163 | * Ticket to consume |
@@ -264,7 +264,7 @@ store_cont (void *cls, int32_t success, const char *emsg) | |||
264 | 264 | ||
265 | static void | 265 | static void |
266 | process_attrs (void *cls, | 266 | process_attrs (void *cls, |
267 | const struct GNUNET_IDENTITY_PublicKey *identity, | 267 | const struct GNUNET_CRYPTO_PublicKey *identity, |
268 | const struct GNUNET_RECLAIM_Attribute *attr, | 268 | const struct GNUNET_RECLAIM_Attribute *attr, |
269 | const struct GNUNET_RECLAIM_Presentation *presentation) | 269 | const struct GNUNET_RECLAIM_Presentation *presentation) |
270 | { | 270 | { |
@@ -349,7 +349,7 @@ ticket_iter (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket) | |||
349 | aud = | 349 | aud = |
350 | GNUNET_STRINGS_data_to_string_alloc (&ticket->audience, | 350 | GNUNET_STRINGS_data_to_string_alloc (&ticket->audience, |
351 | sizeof(struct | 351 | sizeof(struct |
352 | GNUNET_IDENTITY_PublicKey)); | 352 | GNUNET_CRYPTO_PublicKey)); |
353 | ref = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, sizeof(ticket->rnd)); | 353 | ref = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, sizeof(ticket->rnd)); |
354 | tkt = | 354 | tkt = |
355 | GNUNET_STRINGS_data_to_string_alloc (ticket, | 355 | GNUNET_STRINGS_data_to_string_alloc (ticket, |
@@ -514,7 +514,7 @@ iter_finished (void *cls) | |||
514 | 514 | ||
515 | static void | 515 | static void |
516 | iter_cb (void *cls, | 516 | iter_cb (void *cls, |
517 | const struct GNUNET_IDENTITY_PublicKey *identity, | 517 | const struct GNUNET_CRYPTO_PublicKey *identity, |
518 | const struct GNUNET_RECLAIM_Attribute *attr) | 518 | const struct GNUNET_RECLAIM_Attribute *attr) |
519 | { | 519 | { |
520 | struct GNUNET_RECLAIM_AttributeListEntry *le; | 520 | struct GNUNET_RECLAIM_AttributeListEntry *le; |
@@ -657,7 +657,7 @@ cred_iter_finished (void *cls) | |||
657 | 657 | ||
658 | static void | 658 | static void |
659 | cred_iter_cb (void *cls, | 659 | cred_iter_cb (void *cls, |
660 | const struct GNUNET_IDENTITY_PublicKey *identity, | 660 | const struct GNUNET_CRYPTO_PublicKey *identity, |
661 | const struct GNUNET_RECLAIM_Credential *cred) | 661 | const struct GNUNET_RECLAIM_Credential *cred) |
662 | { | 662 | { |
663 | char *cred_str; | 663 | char *cred_str; |
@@ -738,7 +738,7 @@ start_process () | |||
738 | 738 | ||
739 | if ((NULL != rp) && | 739 | if ((NULL != rp) && |
740 | (GNUNET_OK != | 740 | (GNUNET_OK != |
741 | GNUNET_IDENTITY_public_key_from_string (rp, &rp_key)) ) | 741 | GNUNET_CRYPTO_public_key_from_string (rp, &rp_key)) ) |
742 | { | 742 | { |
743 | fprintf (stderr, "%s is not a public key!\n", rp); | 743 | fprintf (stderr, "%s is not a public key!\n", rp); |
744 | cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); | 744 | cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); |
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c index 8b468fc8e..47a86a3e8 100644 --- a/src/reclaim/gnunet-service-reclaim.c +++ b/src/reclaim/gnunet-service-reclaim.c | |||
@@ -110,7 +110,7 @@ struct Iterator | |||
110 | /** | 110 | /** |
111 | * Key of the zone we are iterating over. | 111 | * Key of the zone we are iterating over. |
112 | */ | 112 | */ |
113 | struct GNUNET_IDENTITY_PrivateKey identity; | 113 | struct GNUNET_CRYPTO_PrivateKey identity; |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * Namestore iterator | 116 | * Namestore iterator |
@@ -266,7 +266,7 @@ struct AttributeDeleteHandle | |||
266 | /** | 266 | /** |
267 | * Identity | 267 | * Identity |
268 | */ | 268 | */ |
269 | struct GNUNET_IDENTITY_PrivateKey identity; | 269 | struct GNUNET_CRYPTO_PrivateKey identity; |
270 | 270 | ||
271 | 271 | ||
272 | /** | 272 | /** |
@@ -344,12 +344,12 @@ struct AttributeStoreHandle | |||
344 | /** | 344 | /** |
345 | * Identity | 345 | * Identity |
346 | */ | 346 | */ |
347 | struct GNUNET_IDENTITY_PrivateKey identity; | 347 | struct GNUNET_CRYPTO_PrivateKey identity; |
348 | 348 | ||
349 | /** | 349 | /** |
350 | * Identity pubkey | 350 | * Identity pubkey |
351 | */ | 351 | */ |
352 | struct GNUNET_IDENTITY_PublicKey identity_pkey; | 352 | struct GNUNET_CRYPTO_PublicKey identity_pkey; |
353 | 353 | ||
354 | /** | 354 | /** |
355 | * QueueEntry | 355 | * QueueEntry |
@@ -771,8 +771,8 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im) | |||
771 | struct IdpClient *idp = cls; | 771 | struct IdpClient *idp = cls; |
772 | struct GNUNET_RECLAIM_AttributeList *attrs; | 772 | struct GNUNET_RECLAIM_AttributeList *attrs; |
773 | struct GNUNET_RECLAIM_AttributeListEntry *le; | 773 | struct GNUNET_RECLAIM_AttributeListEntry *le; |
774 | struct GNUNET_IDENTITY_PrivateKey identity; | 774 | struct GNUNET_CRYPTO_PrivateKey identity; |
775 | struct GNUNET_IDENTITY_PublicKey rp; | 775 | struct GNUNET_CRYPTO_PublicKey rp; |
776 | size_t attrs_len; | 776 | size_t attrs_len; |
777 | size_t key_len; | 777 | size_t key_len; |
778 | size_t pkey_len; | 778 | size_t pkey_len; |
@@ -783,7 +783,7 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im) | |||
783 | key_len = ntohs (im->key_len); | 783 | key_len = ntohs (im->key_len); |
784 | buf = (char *) &im[1]; | 784 | buf = (char *) &im[1]; |
785 | if ((GNUNET_SYSERR == | 785 | if ((GNUNET_SYSERR == |
786 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 786 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
787 | &identity, &read)) || | 787 | &identity, &read)) || |
788 | (read != key_len)) | 788 | (read != key_len)) |
789 | { | 789 | { |
@@ -795,7 +795,7 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im) | |||
795 | buf += read; | 795 | buf += read; |
796 | pkey_len = ntohs (im->pkey_len); | 796 | pkey_len = ntohs (im->pkey_len); |
797 | if ((GNUNET_SYSERR == | 797 | if ((GNUNET_SYSERR == |
798 | GNUNET_IDENTITY_read_public_key_from_buffer (buf, pkey_len, | 798 | GNUNET_CRYPTO_read_public_key_from_buffer (buf, pkey_len, |
799 | &rp, &read)) || | 799 | &rp, &read)) || |
800 | (read != pkey_len)) | 800 | (read != pkey_len)) |
801 | { | 801 | { |
@@ -890,7 +890,7 @@ handle_revoke_ticket_message (void *cls, const struct RevokeTicketMessage *rm) | |||
890 | { | 890 | { |
891 | struct TicketRevocationOperation *rop; | 891 | struct TicketRevocationOperation *rop; |
892 | struct IdpClient *idp = cls; | 892 | struct IdpClient *idp = cls; |
893 | struct GNUNET_IDENTITY_PrivateKey identity; | 893 | struct GNUNET_CRYPTO_PrivateKey identity; |
894 | struct GNUNET_RECLAIM_Ticket ticket; | 894 | struct GNUNET_RECLAIM_Ticket ticket; |
895 | size_t key_len; | 895 | size_t key_len; |
896 | size_t tkt_len; | 896 | size_t tkt_len; |
@@ -901,7 +901,7 @@ handle_revoke_ticket_message (void *cls, const struct RevokeTicketMessage *rm) | |||
901 | key_len = ntohs (rm->key_len); | 901 | key_len = ntohs (rm->key_len); |
902 | buf = (char *) &rm[1]; | 902 | buf = (char *) &rm[1]; |
903 | if ((GNUNET_SYSERR == | 903 | if ((GNUNET_SYSERR == |
904 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 904 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
905 | &identity, &read)) || | 905 | &identity, &read)) || |
906 | (read != key_len)) | 906 | (read != key_len)) |
907 | { | 907 | { |
@@ -943,7 +943,7 @@ handle_revoke_ticket_message (void *cls, const struct RevokeTicketMessage *rm) | |||
943 | */ | 943 | */ |
944 | static void | 944 | static void |
945 | consume_result_cb (void *cls, | 945 | consume_result_cb (void *cls, |
946 | const struct GNUNET_IDENTITY_PublicKey *identity, | 946 | const struct GNUNET_CRYPTO_PublicKey *identity, |
947 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 947 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
948 | const struct GNUNET_RECLAIM_PresentationList *presentations, | 948 | const struct GNUNET_RECLAIM_PresentationList *presentations, |
949 | int32_t success, | 949 | int32_t success, |
@@ -965,7 +965,7 @@ consume_result_cb (void *cls, | |||
965 | attrs_len = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs); | 965 | attrs_len = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs); |
966 | pres_len = GNUNET_RECLAIM_presentation_list_serialize_get_size ( | 966 | pres_len = GNUNET_RECLAIM_presentation_list_serialize_get_size ( |
967 | presentations); | 967 | presentations); |
968 | key_len = GNUNET_IDENTITY_public_key_get_length (identity); | 968 | key_len = GNUNET_CRYPTO_public_key_get_length (identity); |
969 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 969 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
970 | "Sending CONSUME_TICKET_RESULT message\n"); | 970 | "Sending CONSUME_TICKET_RESULT message\n"); |
971 | env = GNUNET_MQ_msg_extra (crm, | 971 | env = GNUNET_MQ_msg_extra (crm, |
@@ -977,7 +977,7 @@ consume_result_cb (void *cls, | |||
977 | crm->key_len = htons (key_len); | 977 | crm->key_len = htons (key_len); |
978 | crm->result = htons (success); | 978 | crm->result = htons (success); |
979 | data_tmp = (char *) &crm[1]; | 979 | data_tmp = (char *) &crm[1]; |
980 | written = GNUNET_IDENTITY_write_public_key_to_buffer (identity, | 980 | written = GNUNET_CRYPTO_write_public_key_to_buffer (identity, |
981 | data_tmp, | 981 | data_tmp, |
982 | key_len); | 982 | key_len); |
983 | GNUNET_assert (0 <= written); | 983 | GNUNET_assert (0 <= written); |
@@ -1025,7 +1025,7 @@ handle_consume_ticket_message (void *cls, const struct ConsumeTicketMessage *cm) | |||
1025 | { | 1025 | { |
1026 | struct ConsumeTicketOperation *cop; | 1026 | struct ConsumeTicketOperation *cop; |
1027 | struct IdpClient *idp = cls; | 1027 | struct IdpClient *idp = cls; |
1028 | struct GNUNET_IDENTITY_PrivateKey identity; | 1028 | struct GNUNET_CRYPTO_PrivateKey identity; |
1029 | struct GNUNET_RECLAIM_Ticket ticket; | 1029 | struct GNUNET_RECLAIM_Ticket ticket; |
1030 | size_t key_len; | 1030 | size_t key_len; |
1031 | size_t tkt_len; | 1031 | size_t tkt_len; |
@@ -1036,7 +1036,7 @@ handle_consume_ticket_message (void *cls, const struct ConsumeTicketMessage *cm) | |||
1036 | key_len = ntohs (cm->key_len); | 1036 | key_len = ntohs (cm->key_len); |
1037 | buf = (char *) &cm[1]; | 1037 | buf = (char *) &cm[1]; |
1038 | if ((GNUNET_SYSERR == | 1038 | if ((GNUNET_SYSERR == |
1039 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 1039 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
1040 | &identity, &read)) || | 1040 | &identity, &read)) || |
1041 | (read != key_len)) | 1041 | (read != key_len)) |
1042 | { | 1042 | { |
@@ -1188,7 +1188,7 @@ handle_attribute_store_message (void *cls, | |||
1188 | { | 1188 | { |
1189 | struct AttributeStoreHandle *ash; | 1189 | struct AttributeStoreHandle *ash; |
1190 | struct IdpClient *idp = cls; | 1190 | struct IdpClient *idp = cls; |
1191 | struct GNUNET_IDENTITY_PrivateKey identity; | 1191 | struct GNUNET_CRYPTO_PrivateKey identity; |
1192 | size_t data_len; | 1192 | size_t data_len; |
1193 | size_t key_len; | 1193 | size_t key_len; |
1194 | size_t read; | 1194 | size_t read; |
@@ -1200,7 +1200,7 @@ handle_attribute_store_message (void *cls, | |||
1200 | key_len = ntohs (sam->key_len); | 1200 | key_len = ntohs (sam->key_len); |
1201 | buf = (char *) &sam[1]; | 1201 | buf = (char *) &sam[1]; |
1202 | if ((GNUNET_SYSERR == | 1202 | if ((GNUNET_SYSERR == |
1203 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 1203 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
1204 | &identity, &read)) || | 1204 | &identity, &read)) || |
1205 | (read != key_len)) | 1205 | (read != key_len)) |
1206 | { | 1206 | { |
@@ -1218,7 +1218,7 @@ handle_attribute_store_message (void *cls, | |||
1218 | ash->r_id = ntohl (sam->id); | 1218 | ash->r_id = ntohl (sam->id); |
1219 | ash->identity = identity; | 1219 | ash->identity = identity; |
1220 | ash->exp.rel_value_us = GNUNET_ntohll (sam->exp); | 1220 | ash->exp.rel_value_us = GNUNET_ntohll (sam->exp); |
1221 | GNUNET_IDENTITY_key_get_public (&identity, &ash->identity_pkey); | 1221 | GNUNET_CRYPTO_key_get_public (&identity, &ash->identity_pkey); |
1222 | 1222 | ||
1223 | GNUNET_SERVICE_client_continue (idp->client); | 1223 | GNUNET_SERVICE_client_continue (idp->client); |
1224 | ash->client = idp; | 1224 | ash->client = idp; |
@@ -1293,7 +1293,7 @@ cred_error (void *cls) | |||
1293 | */ | 1293 | */ |
1294 | static void | 1294 | static void |
1295 | cred_add_cb (void *cls, | 1295 | cred_add_cb (void *cls, |
1296 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1296 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1297 | const char *label, | 1297 | const char *label, |
1298 | unsigned int rd_count, | 1298 | unsigned int rd_count, |
1299 | const struct GNUNET_GNSRECORD_Data *rd) | 1299 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1389,7 +1389,7 @@ handle_credential_store_message (void *cls, | |||
1389 | { | 1389 | { |
1390 | struct AttributeStoreHandle *ash; | 1390 | struct AttributeStoreHandle *ash; |
1391 | struct IdpClient *idp = cls; | 1391 | struct IdpClient *idp = cls; |
1392 | struct GNUNET_IDENTITY_PrivateKey identity; | 1392 | struct GNUNET_CRYPTO_PrivateKey identity; |
1393 | size_t data_len; | 1393 | size_t data_len; |
1394 | size_t key_len; | 1394 | size_t key_len; |
1395 | size_t read; | 1395 | size_t read; |
@@ -1401,7 +1401,7 @@ handle_credential_store_message (void *cls, | |||
1401 | key_len = ntohs (sam->key_len); | 1401 | key_len = ntohs (sam->key_len); |
1402 | buf = (char *) &sam[1]; | 1402 | buf = (char *) &sam[1]; |
1403 | if ((GNUNET_SYSERR == | 1403 | if ((GNUNET_SYSERR == |
1404 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 1404 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
1405 | &identity, &read)) || | 1405 | &identity, &read)) || |
1406 | (read != key_len)) | 1406 | (read != key_len)) |
1407 | { | 1407 | { |
@@ -1418,7 +1418,7 @@ handle_credential_store_message (void *cls, | |||
1418 | ash->r_id = ntohl (sam->id); | 1418 | ash->r_id = ntohl (sam->id); |
1419 | ash->identity = identity; | 1419 | ash->identity = identity; |
1420 | ash->exp.rel_value_us = GNUNET_ntohll (sam->exp); | 1420 | ash->exp.rel_value_us = GNUNET_ntohll (sam->exp); |
1421 | GNUNET_IDENTITY_key_get_public (&identity, &ash->identity_pkey); | 1421 | GNUNET_CRYPTO_key_get_public (&identity, &ash->identity_pkey); |
1422 | 1422 | ||
1423 | GNUNET_SERVICE_client_continue (idp->client); | 1423 | GNUNET_SERVICE_client_continue (idp->client); |
1424 | ash->client = idp; | 1424 | ash->client = idp; |
@@ -1463,7 +1463,7 @@ send_delete_response (struct AttributeDeleteHandle *adh, int32_t success) | |||
1463 | */ | 1463 | */ |
1464 | static void | 1464 | static void |
1465 | consistency_iter (void *cls, | 1465 | consistency_iter (void *cls, |
1466 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1466 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1467 | const char *label, | 1467 | const char *label, |
1468 | unsigned int rd_count, | 1468 | unsigned int rd_count, |
1469 | const struct GNUNET_GNSRECORD_Data *rd) | 1469 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1860,7 +1860,7 @@ handle_attribute_delete_message (void *cls, | |||
1860 | { | 1860 | { |
1861 | struct AttributeDeleteHandle *adh; | 1861 | struct AttributeDeleteHandle *adh; |
1862 | struct IdpClient *idp = cls; | 1862 | struct IdpClient *idp = cls; |
1863 | struct GNUNET_IDENTITY_PrivateKey identity; | 1863 | struct GNUNET_CRYPTO_PrivateKey identity; |
1864 | size_t data_len; | 1864 | size_t data_len; |
1865 | size_t key_len; | 1865 | size_t key_len; |
1866 | size_t read; | 1866 | size_t read; |
@@ -1872,7 +1872,7 @@ handle_attribute_delete_message (void *cls, | |||
1872 | key_len = ntohs (dam->key_len); | 1872 | key_len = ntohs (dam->key_len); |
1873 | buf = (char *) &dam[1]; | 1873 | buf = (char *) &dam[1]; |
1874 | if ((GNUNET_SYSERR == | 1874 | if ((GNUNET_SYSERR == |
1875 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 1875 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
1876 | &identity, &read)) || | 1876 | &identity, &read)) || |
1877 | (read != key_len)) | 1877 | (read != key_len)) |
1878 | { | 1878 | { |
@@ -1967,7 +1967,7 @@ handle_credential_delete_message (void *cls, | |||
1967 | { | 1967 | { |
1968 | struct AttributeDeleteHandle *adh; | 1968 | struct AttributeDeleteHandle *adh; |
1969 | struct IdpClient *idp = cls; | 1969 | struct IdpClient *idp = cls; |
1970 | struct GNUNET_IDENTITY_PrivateKey identity; | 1970 | struct GNUNET_CRYPTO_PrivateKey identity; |
1971 | size_t data_len; | 1971 | size_t data_len; |
1972 | size_t key_len; | 1972 | size_t key_len; |
1973 | size_t read; | 1973 | size_t read; |
@@ -1979,7 +1979,7 @@ handle_credential_delete_message (void *cls, | |||
1979 | key_len = ntohs (dam->key_len); | 1979 | key_len = ntohs (dam->key_len); |
1980 | buf = (char *) &dam[1]; | 1980 | buf = (char *) &dam[1]; |
1981 | if ((GNUNET_SYSERR == | 1981 | if ((GNUNET_SYSERR == |
1982 | GNUNET_IDENTITY_read_private_key_from_buffer (buf, key_len, | 1982 | GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len, |
1983 | &identity, &read)) || | 1983 | &identity, &read)) || |
1984 | (read != key_len)) | 1984 | (read != key_len)) |
1985 | { | 1985 | { |
@@ -2068,14 +2068,14 @@ attr_iter_error (void *cls) | |||
2068 | */ | 2068 | */ |
2069 | static void | 2069 | static void |
2070 | attr_iter_cb (void *cls, | 2070 | attr_iter_cb (void *cls, |
2071 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 2071 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
2072 | const char *label, | 2072 | const char *label, |
2073 | unsigned int rd_count, | 2073 | unsigned int rd_count, |
2074 | const struct GNUNET_GNSRECORD_Data *rd) | 2074 | const struct GNUNET_GNSRECORD_Data *rd) |
2075 | { | 2075 | { |
2076 | struct Iterator *ai = cls; | 2076 | struct Iterator *ai = cls; |
2077 | struct GNUNET_MQ_Envelope *env; | 2077 | struct GNUNET_MQ_Envelope *env; |
2078 | struct GNUNET_IDENTITY_PublicKey identity; | 2078 | struct GNUNET_CRYPTO_PublicKey identity; |
2079 | char *data_tmp; | 2079 | char *data_tmp; |
2080 | size_t key_len; | 2080 | size_t key_len; |
2081 | ssize_t written; | 2081 | ssize_t written; |
@@ -2091,8 +2091,8 @@ attr_iter_cb (void *cls, | |||
2091 | label); | 2091 | label); |
2092 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2092 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2093 | "Sending ATTRIBUTE_RESULT message\n"); | 2093 | "Sending ATTRIBUTE_RESULT message\n"); |
2094 | GNUNET_IDENTITY_key_get_public (zone, &identity); | 2094 | GNUNET_CRYPTO_key_get_public (zone, &identity); |
2095 | key_len = GNUNET_IDENTITY_public_key_get_length (&identity); | 2095 | key_len = GNUNET_CRYPTO_public_key_get_length (&identity); |
2096 | env = GNUNET_MQ_msg_extra (arm, | 2096 | env = GNUNET_MQ_msg_extra (arm, |
2097 | rd->data_size + key_len, | 2097 | rd->data_size + key_len, |
2098 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); | 2098 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); |
@@ -2100,7 +2100,7 @@ attr_iter_cb (void *cls, | |||
2100 | arm->attr_len = htons (rd->data_size); | 2100 | arm->attr_len = htons (rd->data_size); |
2101 | data_tmp = (char *) &arm[1]; | 2101 | data_tmp = (char *) &arm[1]; |
2102 | arm->pkey_len = htons (key_len); | 2102 | arm->pkey_len = htons (key_len); |
2103 | written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity, | 2103 | written = GNUNET_CRYPTO_write_public_key_to_buffer (&identity, |
2104 | data_tmp, | 2104 | data_tmp, |
2105 | key_len); | 2105 | key_len); |
2106 | GNUNET_assert (0 <= written); | 2106 | GNUNET_assert (0 <= written); |
@@ -2141,7 +2141,7 @@ handle_iteration_start (void *cls, | |||
2141 | { | 2141 | { |
2142 | struct IdpClient *idp = cls; | 2142 | struct IdpClient *idp = cls; |
2143 | struct Iterator *ai; | 2143 | struct Iterator *ai; |
2144 | struct GNUNET_IDENTITY_PrivateKey identity; | 2144 | struct GNUNET_CRYPTO_PrivateKey identity; |
2145 | size_t key_len; | 2145 | size_t key_len; |
2146 | size_t read; | 2146 | size_t read; |
2147 | 2147 | ||
@@ -2149,7 +2149,7 @@ handle_iteration_start (void *cls, | |||
2149 | "Received ATTRIBUTE_ITERATION_START message\n"); | 2149 | "Received ATTRIBUTE_ITERATION_START message\n"); |
2150 | key_len = ntohs (ais_msg->key_len); | 2150 | key_len = ntohs (ais_msg->key_len); |
2151 | if ((GNUNET_SYSERR == | 2151 | if ((GNUNET_SYSERR == |
2152 | GNUNET_IDENTITY_read_private_key_from_buffer (&ais_msg[1], | 2152 | GNUNET_CRYPTO_read_private_key_from_buffer (&ais_msg[1], |
2153 | key_len, | 2153 | key_len, |
2154 | &identity, | 2154 | &identity, |
2155 | &read)) || | 2155 | &read)) || |
@@ -2298,7 +2298,7 @@ cred_iter_error (void *cls) | |||
2298 | */ | 2298 | */ |
2299 | static void | 2299 | static void |
2300 | cred_iter_cb (void *cls, | 2300 | cred_iter_cb (void *cls, |
2301 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 2301 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
2302 | const char *label, | 2302 | const char *label, |
2303 | unsigned int rd_count, | 2303 | unsigned int rd_count, |
2304 | const struct GNUNET_GNSRECORD_Data *rd) | 2304 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -2306,7 +2306,7 @@ cred_iter_cb (void *cls, | |||
2306 | struct Iterator *ai = cls; | 2306 | struct Iterator *ai = cls; |
2307 | struct GNUNET_MQ_Envelope *env; | 2307 | struct GNUNET_MQ_Envelope *env; |
2308 | struct CredentialResultMessage *arm; | 2308 | struct CredentialResultMessage *arm; |
2309 | struct GNUNET_IDENTITY_PublicKey identity; | 2309 | struct GNUNET_CRYPTO_PublicKey identity; |
2310 | char *data_tmp; | 2310 | char *data_tmp; |
2311 | size_t key_len; | 2311 | size_t key_len; |
2312 | ssize_t written; | 2312 | ssize_t written; |
@@ -2321,8 +2321,8 @@ cred_iter_cb (void *cls, | |||
2321 | label); | 2321 | label); |
2322 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2322 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2323 | "Sending CREDENTIAL_RESULT message\n"); | 2323 | "Sending CREDENTIAL_RESULT message\n"); |
2324 | GNUNET_IDENTITY_key_get_public (zone, &identity); | 2324 | GNUNET_CRYPTO_key_get_public (zone, &identity); |
2325 | key_len = GNUNET_IDENTITY_public_key_get_length (&identity); | 2325 | key_len = GNUNET_CRYPTO_public_key_get_length (&identity); |
2326 | env = GNUNET_MQ_msg_extra (arm, | 2326 | env = GNUNET_MQ_msg_extra (arm, |
2327 | rd->data_size + key_len, | 2327 | rd->data_size + key_len, |
2328 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT); | 2328 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT); |
@@ -2330,7 +2330,7 @@ cred_iter_cb (void *cls, | |||
2330 | arm->credential_len = htons (rd->data_size); | 2330 | arm->credential_len = htons (rd->data_size); |
2331 | arm->key_len = htons (key_len); | 2331 | arm->key_len = htons (key_len); |
2332 | data_tmp = (char *) &arm[1]; | 2332 | data_tmp = (char *) &arm[1]; |
2333 | written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity, | 2333 | written = GNUNET_CRYPTO_write_public_key_to_buffer (&identity, |
2334 | data_tmp, | 2334 | data_tmp, |
2335 | key_len); | 2335 | key_len); |
2336 | GNUNET_assert (written >= 0); | 2336 | GNUNET_assert (written >= 0); |
@@ -2372,7 +2372,7 @@ handle_credential_iteration_start (void *cls, | |||
2372 | { | 2372 | { |
2373 | struct IdpClient *idp = cls; | 2373 | struct IdpClient *idp = cls; |
2374 | struct Iterator *ai; | 2374 | struct Iterator *ai; |
2375 | struct GNUNET_IDENTITY_PrivateKey identity; | 2375 | struct GNUNET_CRYPTO_PrivateKey identity; |
2376 | size_t key_len; | 2376 | size_t key_len; |
2377 | size_t read; | 2377 | size_t read; |
2378 | 2378 | ||
@@ -2380,7 +2380,7 @@ handle_credential_iteration_start (void *cls, | |||
2380 | "Received CREDENTIAL_ITERATION_START message\n"); | 2380 | "Received CREDENTIAL_ITERATION_START message\n"); |
2381 | key_len = ntohs (ais_msg->key_len); | 2381 | key_len = ntohs (ais_msg->key_len); |
2382 | if ((GNUNET_SYSERR == | 2382 | if ((GNUNET_SYSERR == |
2383 | GNUNET_IDENTITY_read_private_key_from_buffer (&ais_msg[1], | 2383 | GNUNET_CRYPTO_read_private_key_from_buffer (&ais_msg[1], |
2384 | key_len, | 2384 | key_len, |
2385 | &identity, | 2385 | &identity, |
2386 | &read)) || | 2386 | &read)) || |
@@ -2554,7 +2554,7 @@ handle_ticket_iteration_start ( | |||
2554 | void *cls, | 2554 | void *cls, |
2555 | const struct TicketIterationStartMessage *tis_msg) | 2555 | const struct TicketIterationStartMessage *tis_msg) |
2556 | { | 2556 | { |
2557 | struct GNUNET_IDENTITY_PrivateKey identity; | 2557 | struct GNUNET_CRYPTO_PrivateKey identity; |
2558 | struct IdpClient *client = cls; | 2558 | struct IdpClient *client = cls; |
2559 | struct TicketIteration *ti; | 2559 | struct TicketIteration *ti; |
2560 | size_t key_len; | 2560 | size_t key_len; |
@@ -2564,7 +2564,7 @@ handle_ticket_iteration_start ( | |||
2564 | "Received TICKET_ITERATION_START message\n"); | 2564 | "Received TICKET_ITERATION_START message\n"); |
2565 | key_len = ntohs (tis_msg->key_len); | 2565 | key_len = ntohs (tis_msg->key_len); |
2566 | if ((GNUNET_SYSERR == | 2566 | if ((GNUNET_SYSERR == |
2567 | GNUNET_IDENTITY_read_private_key_from_buffer (&tis_msg[1], | 2567 | GNUNET_CRYPTO_read_private_key_from_buffer (&tis_msg[1], |
2568 | key_len, | 2568 | key_len, |
2569 | &identity, | 2569 | &identity, |
2570 | &read)) || | 2570 | &read)) || |
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c index 0c2fadd96..689fbc429 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.c +++ b/src/reclaim/gnunet-service-reclaim_tickets.c | |||
@@ -87,12 +87,12 @@ struct RECLAIM_TICKETS_ConsumeHandle | |||
87 | /** | 87 | /** |
88 | * Audience Key | 88 | * Audience Key |
89 | */ | 89 | */ |
90 | struct GNUNET_IDENTITY_PrivateKey identity; | 90 | struct GNUNET_CRYPTO_PrivateKey identity; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * Audience Key | 93 | * Audience Key |
94 | */ | 94 | */ |
95 | struct GNUNET_IDENTITY_PublicKey identity_pub; | 95 | struct GNUNET_CRYPTO_PublicKey identity_pub; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Lookup DLL | 98 | * Lookup DLL |
@@ -181,7 +181,7 @@ struct TicketIssueHandle | |||
181 | /** | 181 | /** |
182 | * Issuer Key | 182 | * Issuer Key |
183 | */ | 183 | */ |
184 | struct GNUNET_IDENTITY_PrivateKey identity; | 184 | struct GNUNET_CRYPTO_PrivateKey identity; |
185 | 185 | ||
186 | /** | 186 | /** |
187 | * Ticket to issue | 187 | * Ticket to issue |
@@ -264,7 +264,7 @@ struct RECLAIM_TICKETS_RevokeHandle | |||
264 | /** | 264 | /** |
265 | * Issuer Key | 265 | * Issuer Key |
266 | */ | 266 | */ |
267 | struct GNUNET_IDENTITY_PrivateKey identity; | 267 | struct GNUNET_CRYPTO_PrivateKey identity; |
268 | 268 | ||
269 | /** | 269 | /** |
270 | * Callback | 270 | * Callback |
@@ -491,7 +491,7 @@ rvk_ticket_update_finished (void *cls) | |||
491 | */ | 491 | */ |
492 | static void | 492 | static void |
493 | rvk_ticket_update (void *cls, | 493 | rvk_ticket_update (void *cls, |
494 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 494 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
495 | const char *label, | 495 | const char *label, |
496 | unsigned int rd_count, | 496 | unsigned int rd_count, |
497 | const struct GNUNET_GNSRECORD_Data *rd) | 497 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -667,7 +667,7 @@ move_attr_finished (void *cls, enum GNUNET_ErrorCode ec) | |||
667 | */ | 667 | */ |
668 | static void | 668 | static void |
669 | rvk_move_attr_cb (void *cls, | 669 | rvk_move_attr_cb (void *cls, |
670 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 670 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
671 | const char *label, | 671 | const char *label, |
672 | unsigned int rd_count, | 672 | unsigned int rd_count, |
673 | const struct GNUNET_GNSRECORD_Data *rd) | 673 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -845,7 +845,7 @@ remove_ticket_cont (void *cls, enum GNUNET_ErrorCode ec) | |||
845 | */ | 845 | */ |
846 | static void | 846 | static void |
847 | revoke_attrs_cb (void *cls, | 847 | revoke_attrs_cb (void *cls, |
848 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 848 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
849 | const char *label, | 849 | const char *label, |
850 | unsigned int rd_count, | 850 | unsigned int rd_count, |
851 | const struct GNUNET_GNSRECORD_Data *rd) | 851 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -908,7 +908,7 @@ rvk_attrs_err_cb (void *cls) | |||
908 | */ | 908 | */ |
909 | struct RECLAIM_TICKETS_RevokeHandle * | 909 | struct RECLAIM_TICKETS_RevokeHandle * |
910 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, | 910 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, |
911 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 911 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
912 | RECLAIM_TICKETS_RevokeCallback cb, | 912 | RECLAIM_TICKETS_RevokeCallback cb, |
913 | void *cb_cls) | 913 | void *cb_cls) |
914 | { | 914 | { |
@@ -920,7 +920,7 @@ RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, | |||
920 | rvk->cb_cls = cb_cls; | 920 | rvk->cb_cls = cb_cls; |
921 | rvk->identity = *identity; | 921 | rvk->identity = *identity; |
922 | rvk->ticket = *ticket; | 922 | rvk->ticket = *ticket; |
923 | GNUNET_IDENTITY_key_get_public (&rvk->identity, &rvk->ticket.identity); | 923 | GNUNET_CRYPTO_key_get_public (&rvk->identity, &rvk->ticket.identity); |
924 | /** Get shared attributes **/ | 924 | /** Get shared attributes **/ |
925 | label = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, | 925 | label = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, |
926 | sizeof(ticket->rnd)); | 926 | sizeof(ticket->rnd)); |
@@ -1179,7 +1179,7 @@ lookup_authz_cb (void *cls, | |||
1179 | * @return handle to the operation | 1179 | * @return handle to the operation |
1180 | */ | 1180 | */ |
1181 | struct RECLAIM_TICKETS_ConsumeHandle * | 1181 | struct RECLAIM_TICKETS_ConsumeHandle * |
1182 | RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | 1182 | RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_PrivateKey *id, |
1183 | const struct GNUNET_RECLAIM_Ticket *ticket, | 1183 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1184 | RECLAIM_TICKETS_ConsumeCallback cb, | 1184 | RECLAIM_TICKETS_ConsumeCallback cb, |
1185 | void *cb_cls) | 1185 | void *cb_cls) |
@@ -1190,7 +1190,7 @@ RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | |||
1190 | cth = GNUNET_new (struct RECLAIM_TICKETS_ConsumeHandle); | 1190 | cth = GNUNET_new (struct RECLAIM_TICKETS_ConsumeHandle); |
1191 | 1191 | ||
1192 | cth->identity = *id; | 1192 | cth->identity = *id; |
1193 | GNUNET_IDENTITY_key_get_public (&cth->identity, &cth->identity_pub); | 1193 | GNUNET_CRYPTO_key_get_public (&cth->identity, &cth->identity_pub); |
1194 | cth->attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); | 1194 | cth->attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); |
1195 | cth->presentations = GNUNET_new (struct GNUNET_RECLAIM_PresentationList); | 1195 | cth->presentations = GNUNET_new (struct GNUNET_RECLAIM_PresentationList); |
1196 | cth->ticket = *ticket; | 1196 | cth->ticket = *ticket; |
@@ -1199,7 +1199,7 @@ RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | |||
1199 | label = | 1199 | label = |
1200 | GNUNET_STRINGS_data_to_string_alloc (&cth->ticket.rnd, | 1200 | GNUNET_STRINGS_data_to_string_alloc (&cth->ticket.rnd, |
1201 | sizeof(cth->ticket.rnd)); | 1201 | sizeof(cth->ticket.rnd)); |
1202 | char *str = GNUNET_IDENTITY_public_key_to_string (&cth->ticket.identity); | 1202 | char *str = GNUNET_CRYPTO_public_key_to_string (&cth->ticket.identity); |
1203 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1203 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1204 | "Looking for AuthZ info under %s in %s\n", | 1204 | "Looking for AuthZ info under %s in %s\n", |
1205 | label, str); | 1205 | label, str); |
@@ -1397,10 +1397,10 @@ issue_ticket (struct TicketIssueHandle *ih) | |||
1397 | label = | 1397 | label = |
1398 | GNUNET_STRINGS_data_to_string_alloc (&ih->ticket.rnd, | 1398 | GNUNET_STRINGS_data_to_string_alloc (&ih->ticket.rnd, |
1399 | sizeof(ih->ticket.rnd)); | 1399 | sizeof(ih->ticket.rnd)); |
1400 | struct GNUNET_IDENTITY_PublicKey pub; | 1400 | struct GNUNET_CRYPTO_PublicKey pub; |
1401 | GNUNET_IDENTITY_key_get_public (&ih->identity, | 1401 | GNUNET_CRYPTO_key_get_public (&ih->identity, |
1402 | &pub); | 1402 | &pub); |
1403 | char *str = GNUNET_IDENTITY_public_key_to_string (&pub); | 1403 | char *str = GNUNET_CRYPTO_public_key_to_string (&pub); |
1404 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1404 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1405 | "Storing AuthZ information under %s in %s\n", label, str); | 1405 | "Storing AuthZ information under %s in %s\n", label, str); |
1406 | GNUNET_free (str); | 1406 | GNUNET_free (str); |
@@ -1466,7 +1466,7 @@ filter_tickets_error_cb (void *cls) | |||
1466 | */ | 1466 | */ |
1467 | static void | 1467 | static void |
1468 | filter_tickets_cb (void *cls, | 1468 | filter_tickets_cb (void *cls, |
1469 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1469 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1470 | const char *label, | 1470 | const char *label, |
1471 | unsigned int rd_count, | 1471 | unsigned int rd_count, |
1472 | const struct GNUNET_GNSRECORD_Data *rd) | 1472 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1512,11 +1512,11 @@ filter_tickets_cb (void *cls, | |||
1512 | continue; | 1512 | continue; |
1513 | } | 1513 | } |
1514 | // cmp audience | 1514 | // cmp audience |
1515 | // FIXME this is ugly, GNUNET_IDENTITY_PublicKey cannot be compared | 1515 | // FIXME this is ugly, GNUNET_CRYPTO_PublicKey cannot be compared |
1516 | // like this | 1516 | // like this |
1517 | if (0 == memcmp (&tih->ticket.audience, | 1517 | if (0 == memcmp (&tih->ticket.audience, |
1518 | &ticket.audience, | 1518 | &ticket.audience, |
1519 | sizeof(struct GNUNET_IDENTITY_PublicKey))) | 1519 | sizeof(struct GNUNET_CRYPTO_PublicKey))) |
1520 | { | 1520 | { |
1521 | tih->ticket = ticket; | 1521 | tih->ticket = ticket; |
1522 | ticket_found = GNUNET_YES; | 1522 | ticket_found = GNUNET_YES; |
@@ -1631,7 +1631,7 @@ filter_tickets_finished_cb (void *cls) | |||
1631 | { | 1631 | { |
1632 | struct TicketIssueHandle *tih = cls; | 1632 | struct TicketIssueHandle *tih = cls; |
1633 | 1633 | ||
1634 | GNUNET_IDENTITY_key_get_public (&tih->identity, &tih->ticket.identity); | 1634 | GNUNET_CRYPTO_key_get_public (&tih->identity, &tih->ticket.identity); |
1635 | GNUNET_RECLAIM_id_generate (&tih->ticket.rnd); | 1635 | GNUNET_RECLAIM_id_generate (&tih->ticket.rnd); |
1636 | issue_ticket (tih); | 1636 | issue_ticket (tih); |
1637 | } | 1637 | } |
@@ -1649,9 +1649,9 @@ filter_tickets_finished_cb (void *cls) | |||
1649 | * FIXME: Return handle?? | 1649 | * FIXME: Return handle?? |
1650 | */ | 1650 | */ |
1651 | void | 1651 | void |
1652 | RECLAIM_TICKETS_issue (const struct GNUNET_IDENTITY_PrivateKey *identity, | 1652 | RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_PrivateKey *identity, |
1653 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 1653 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
1654 | const struct GNUNET_IDENTITY_PublicKey *audience, | 1654 | const struct GNUNET_CRYPTO_PublicKey *audience, |
1655 | RECLAIM_TICKETS_TicketResult cb, | 1655 | RECLAIM_TICKETS_TicketResult cb, |
1656 | void *cb_cls) | 1656 | void *cb_cls) |
1657 | { | 1657 | { |
@@ -1709,7 +1709,7 @@ cleanup_iter (struct RECLAIM_TICKETS_Iterator *iter) | |||
1709 | */ | 1709 | */ |
1710 | static void | 1710 | static void |
1711 | collect_tickets_cb (void *cls, | 1711 | collect_tickets_cb (void *cls, |
1712 | const struct GNUNET_IDENTITY_PrivateKey *zone, | 1712 | const struct GNUNET_CRYPTO_PrivateKey *zone, |
1713 | const char *label, | 1713 | const char *label, |
1714 | unsigned int rd_count, | 1714 | unsigned int rd_count, |
1715 | const struct GNUNET_GNSRECORD_Data *rd) | 1715 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1807,7 +1807,7 @@ RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter) | |||
1807 | */ | 1807 | */ |
1808 | struct RECLAIM_TICKETS_Iterator * | 1808 | struct RECLAIM_TICKETS_Iterator * |
1809 | RECLAIM_TICKETS_iteration_start ( | 1809 | RECLAIM_TICKETS_iteration_start ( |
1810 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1810 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1811 | RECLAIM_TICKETS_TicketIter cb, | 1811 | RECLAIM_TICKETS_TicketIter cb, |
1812 | void *cb_cls) | 1812 | void *cb_cls) |
1813 | { | 1813 | { |
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.h b/src/reclaim/gnunet-service-reclaim_tickets.h index 9c31a6143..0ec232f49 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.h +++ b/src/reclaim/gnunet-service-reclaim_tickets.h | |||
@@ -138,7 +138,7 @@ typedef void (*RECLAIM_TICKETS_TicketResult) ( | |||
138 | */ | 138 | */ |
139 | typedef void (*RECLAIM_TICKETS_ConsumeCallback) ( | 139 | typedef void (*RECLAIM_TICKETS_ConsumeCallback) ( |
140 | void *cls, | 140 | void *cls, |
141 | const struct GNUNET_IDENTITY_PublicKey *identity, | 141 | const struct GNUNET_CRYPTO_PublicKey *identity, |
142 | const struct GNUNET_RECLAIM_AttributeList *attributes, | 142 | const struct GNUNET_RECLAIM_AttributeList *attributes, |
143 | const struct GNUNET_RECLAIM_PresentationList *presentations, | 143 | const struct GNUNET_RECLAIM_PresentationList *presentations, |
144 | int32_t success, | 144 | int32_t success, |
@@ -167,7 +167,7 @@ typedef void (*RECLAIM_TICKETS_RevokeCallback) (void *cls, int32_t success); | |||
167 | */ | 167 | */ |
168 | struct RECLAIM_TICKETS_RevokeHandle * | 168 | struct RECLAIM_TICKETS_RevokeHandle * |
169 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, | 169 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, |
170 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 170 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
171 | RECLAIM_TICKETS_RevokeCallback cb, | 171 | RECLAIM_TICKETS_RevokeCallback cb, |
172 | void *cb_cls); | 172 | void *cb_cls); |
173 | 173 | ||
@@ -193,7 +193,7 @@ RECLAIM_TICKETS_revoke_cancel (struct RECLAIM_TICKETS_RevokeHandle *rh); | |||
193 | * @return handle to the operation | 193 | * @return handle to the operation |
194 | */ | 194 | */ |
195 | struct RECLAIM_TICKETS_ConsumeHandle * | 195 | struct RECLAIM_TICKETS_ConsumeHandle * |
196 | RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id, | 196 | RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_PrivateKey *id, |
197 | const struct GNUNET_RECLAIM_Ticket *ticket, | 197 | const struct GNUNET_RECLAIM_Ticket *ticket, |
198 | RECLAIM_TICKETS_ConsumeCallback cb, | 198 | RECLAIM_TICKETS_ConsumeCallback cb, |
199 | void *cb_cls); | 199 | void *cb_cls); |
@@ -220,9 +220,9 @@ RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth); | |||
220 | * FIXME: Return handle?? | 220 | * FIXME: Return handle?? |
221 | */ | 221 | */ |
222 | void | 222 | void |
223 | RECLAIM_TICKETS_issue (const struct GNUNET_IDENTITY_PrivateKey *identity, | 223 | RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_PrivateKey *identity, |
224 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 224 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
225 | const struct GNUNET_IDENTITY_PublicKey *audience, | 225 | const struct GNUNET_CRYPTO_PublicKey *audience, |
226 | RECLAIM_TICKETS_TicketResult cb, | 226 | RECLAIM_TICKETS_TicketResult cb, |
227 | void *cb_cls); | 227 | void *cb_cls); |
228 | 228 | ||
@@ -255,7 +255,7 @@ RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter); | |||
255 | */ | 255 | */ |
256 | struct RECLAIM_TICKETS_Iterator * | 256 | struct RECLAIM_TICKETS_Iterator * |
257 | RECLAIM_TICKETS_iteration_start ( | 257 | RECLAIM_TICKETS_iteration_start ( |
258 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 258 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
259 | RECLAIM_TICKETS_TicketIter cb, | 259 | RECLAIM_TICKETS_TicketIter cb, |
260 | void *cb_cls); | 260 | void *cb_cls); |
261 | 261 | ||
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 90c33375f..a2da7312b 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -158,7 +158,7 @@ fix_base64 (char *str) | |||
158 | 158 | ||
159 | 159 | ||
160 | static json_t* | 160 | static json_t* |
161 | generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | 161 | generate_userinfo_json (const struct GNUNET_CRYPTO_PublicKey *sub_key, |
162 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 162 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
163 | const struct | 163 | const struct |
164 | GNUNET_RECLAIM_PresentationList *presentations) | 164 | GNUNET_RECLAIM_PresentationList *presentations) |
@@ -184,7 +184,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
184 | subject = | 184 | subject = |
185 | GNUNET_STRINGS_data_to_string_alloc (sub_key, | 185 | GNUNET_STRINGS_data_to_string_alloc (sub_key, |
186 | sizeof(struct | 186 | sizeof(struct |
187 | GNUNET_IDENTITY_PublicKey)); | 187 | GNUNET_CRYPTO_PublicKey)); |
188 | body = json_object (); | 188 | body = json_object (); |
189 | aggr_names = json_object (); | 189 | aggr_names = json_object (); |
190 | aggr_sources = json_object (); | 190 | aggr_sources = json_object (); |
@@ -343,7 +343,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
343 | * @return Userinfo JSON | 343 | * @return Userinfo JSON |
344 | */ | 344 | */ |
345 | char * | 345 | char * |
346 | OIDC_generate_userinfo (const struct GNUNET_IDENTITY_PublicKey *sub_key, | 346 | OIDC_generate_userinfo (const struct GNUNET_CRYPTO_PublicKey *sub_key, |
347 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 347 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
348 | const struct | 348 | const struct |
349 | GNUNET_RECLAIM_PresentationList *presentations) | 349 | GNUNET_RECLAIM_PresentationList *presentations) |
@@ -359,8 +359,8 @@ OIDC_generate_userinfo (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
359 | 359 | ||
360 | 360 | ||
361 | char * | 361 | char * |
362 | generate_id_token_body (const struct GNUNET_IDENTITY_PublicKey *aud_key, | 362 | generate_id_token_body (const struct GNUNET_CRYPTO_PublicKey *aud_key, |
363 | const struct GNUNET_IDENTITY_PublicKey *sub_key, | 363 | const struct GNUNET_CRYPTO_PublicKey *sub_key, |
364 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 364 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
365 | const struct | 365 | const struct |
366 | GNUNET_RECLAIM_PresentationList *presentations, | 366 | GNUNET_RECLAIM_PresentationList *presentations, |
@@ -387,11 +387,11 @@ generate_id_token_body (const struct GNUNET_IDENTITY_PublicKey *aud_key, | |||
387 | subject = | 387 | subject = |
388 | GNUNET_STRINGS_data_to_string_alloc (sub_key, | 388 | GNUNET_STRINGS_data_to_string_alloc (sub_key, |
389 | sizeof(struct | 389 | sizeof(struct |
390 | GNUNET_IDENTITY_PublicKey)); | 390 | GNUNET_CRYPTO_PublicKey)); |
391 | audience = | 391 | audience = |
392 | GNUNET_STRINGS_data_to_string_alloc (aud_key, | 392 | GNUNET_STRINGS_data_to_string_alloc (aud_key, |
393 | sizeof(struct | 393 | sizeof(struct |
394 | GNUNET_IDENTITY_PublicKey)); | 394 | GNUNET_CRYPTO_PublicKey)); |
395 | 395 | ||
396 | // aud REQUIRED public key client_id must be there | 396 | // aud REQUIRED public key client_id must be there |
397 | json_object_set_new (body, "aud", json_string (audience)); | 397 | json_object_set_new (body, "aud", json_string (audience)); |
@@ -424,8 +424,8 @@ generate_id_token_body (const struct GNUNET_IDENTITY_PublicKey *aud_key, | |||
424 | 424 | ||
425 | 425 | ||
426 | char * | 426 | char * |
427 | OIDC_generate_id_token_rsa (const struct GNUNET_IDENTITY_PublicKey *aud_key, | 427 | OIDC_generate_id_token_rsa (const struct GNUNET_CRYPTO_PublicKey *aud_key, |
428 | const struct GNUNET_IDENTITY_PublicKey *sub_key, | 428 | const struct GNUNET_CRYPTO_PublicKey *sub_key, |
429 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 429 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
430 | const struct | 430 | const struct |
431 | GNUNET_RECLAIM_PresentationList *presentations, | 431 | GNUNET_RECLAIM_PresentationList *presentations, |
@@ -486,8 +486,8 @@ OIDC_generate_id_token_rsa (const struct GNUNET_IDENTITY_PublicKey *aud_key, | |||
486 | * @return a new base64-encoded JWT string. | 486 | * @return a new base64-encoded JWT string. |
487 | */ | 487 | */ |
488 | char * | 488 | char * |
489 | OIDC_generate_id_token_hmac (const struct GNUNET_IDENTITY_PublicKey *aud_key, | 489 | OIDC_generate_id_token_hmac (const struct GNUNET_CRYPTO_PublicKey *aud_key, |
490 | const struct GNUNET_IDENTITY_PublicKey *sub_key, | 490 | const struct GNUNET_CRYPTO_PublicKey *sub_key, |
491 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 491 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
492 | const struct | 492 | const struct |
493 | GNUNET_RECLAIM_PresentationList *presentations, | 493 | GNUNET_RECLAIM_PresentationList *presentations, |
@@ -578,7 +578,7 @@ OIDC_generate_id_token_hmac (const struct GNUNET_IDENTITY_PublicKey *aud_key, | |||
578 | * @return a new authorization code (caller must free) | 578 | * @return a new authorization code (caller must free) |
579 | */ | 579 | */ |
580 | char * | 580 | char * |
581 | OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer, | 581 | OIDC_build_authz_code (const struct GNUNET_CRYPTO_PrivateKey *issuer, |
582 | const struct GNUNET_RECLAIM_Ticket *ticket, | 582 | const struct GNUNET_RECLAIM_Ticket *ticket, |
583 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 583 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
584 | const struct | 584 | const struct |
@@ -671,7 +671,7 @@ OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer, | |||
671 | // Get length | 671 | // Get length |
672 | code_payload_len = sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) | 672 | code_payload_len = sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) |
673 | + payload_len + sizeof(struct | 673 | + payload_len + sizeof(struct |
674 | GNUNET_IDENTITY_Signature); | 674 | GNUNET_CRYPTO_Signature); |
675 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 675 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
676 | "Length of data to encode: %lu\n", | 676 | "Length of data to encode: %lu\n", |
677 | code_payload_len); | 677 | code_payload_len); |
@@ -690,9 +690,9 @@ OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer, | |||
690 | buf_ptr += payload_len; | 690 | buf_ptr += payload_len; |
691 | // Sign and store signature | 691 | // Sign and store signature |
692 | if (GNUNET_SYSERR == | 692 | if (GNUNET_SYSERR == |
693 | GNUNET_IDENTITY_sign_ (issuer, | 693 | GNUNET_CRYPTO_sign_ (issuer, |
694 | purpose, | 694 | purpose, |
695 | (struct GNUNET_IDENTITY_Signature *) | 695 | (struct GNUNET_CRYPTO_Signature *) |
696 | buf_ptr)) | 696 | buf_ptr)) |
697 | { | 697 | { |
698 | GNUNET_break (0); | 698 | GNUNET_break (0); |
@@ -764,7 +764,7 @@ check_code_challenge (const char *code_challenge, | |||
764 | * @return GNUNET_OK if successful, else GNUNET_SYSERR | 764 | * @return GNUNET_OK if successful, else GNUNET_SYSERR |
765 | */ | 765 | */ |
766 | int | 766 | int |
767 | OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience, | 767 | OIDC_parse_authz_code (const struct GNUNET_CRYPTO_PublicKey *audience, |
768 | const char *code, | 768 | const char *code, |
769 | const char *code_verifier, | 769 | const char *code_verifier, |
770 | struct GNUNET_RECLAIM_Ticket *ticket, | 770 | struct GNUNET_RECLAIM_Ticket *ticket, |
@@ -780,7 +780,7 @@ OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience, | |||
780 | char *presentations_ser; | 780 | char *presentations_ser; |
781 | char *code_challenge; | 781 | char *code_challenge; |
782 | struct GNUNET_CRYPTO_EccSignaturePurpose *purpose; | 782 | struct GNUNET_CRYPTO_EccSignaturePurpose *purpose; |
783 | struct GNUNET_IDENTITY_Signature *signature; | 783 | struct GNUNET_CRYPTO_Signature *signature; |
784 | uint32_t code_challenge_len; | 784 | uint32_t code_challenge_len; |
785 | uint32_t attrs_ser_len; | 785 | uint32_t attrs_ser_len; |
786 | uint32_t pres_ser_len; | 786 | uint32_t pres_ser_len; |
@@ -796,7 +796,7 @@ OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience, | |||
796 | (void **) &code_payload); | 796 | (void **) &code_payload); |
797 | if (code_payload_len < sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) | 797 | if (code_payload_len < sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) |
798 | + sizeof(struct OIDC_Parameters) | 798 | + sizeof(struct OIDC_Parameters) |
799 | + sizeof(struct GNUNET_IDENTITY_Signature)) | 799 | + sizeof(struct GNUNET_CRYPTO_Signature)) |
800 | { | 800 | { |
801 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n"); | 801 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n"); |
802 | GNUNET_free (code_payload); | 802 | GNUNET_free (code_payload); |
@@ -807,10 +807,10 @@ OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience, | |||
807 | plaintext_len = code_payload_len; | 807 | plaintext_len = code_payload_len; |
808 | plaintext_len -= sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose); | 808 | plaintext_len -= sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose); |
809 | ptr = (char *) &purpose[1]; | 809 | ptr = (char *) &purpose[1]; |
810 | plaintext_len -= sizeof(struct GNUNET_IDENTITY_Signature); | 810 | plaintext_len -= sizeof(struct GNUNET_CRYPTO_Signature); |
811 | plaintext = ptr; | 811 | plaintext = ptr; |
812 | ptr += plaintext_len; | 812 | ptr += plaintext_len; |
813 | signature = (struct GNUNET_IDENTITY_Signature *) ptr; | 813 | signature = (struct GNUNET_CRYPTO_Signature *) ptr; |
814 | params = (struct OIDC_Parameters *) plaintext; | 814 | params = (struct OIDC_Parameters *) plaintext; |
815 | 815 | ||
816 | // cmp code_challenge code_verifier | 816 | // cmp code_challenge code_verifier |
@@ -848,7 +848,7 @@ OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience, | |||
848 | return GNUNET_SYSERR; | 848 | return GNUNET_SYSERR; |
849 | } | 849 | } |
850 | if (GNUNET_OK != | 850 | if (GNUNET_OK != |
851 | GNUNET_IDENTITY_signature_verify_ ( | 851 | GNUNET_CRYPTO_signature_verify_ ( |
852 | GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN, | 852 | GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN, |
853 | purpose, | 853 | purpose, |
854 | signature, | 854 | signature, |
diff --git a/src/reclaim/oidc_helper.h b/src/reclaim/oidc_helper.h index 81eadf2ed..de788fbdb 100644 --- a/src/reclaim/oidc_helper.h +++ b/src/reclaim/oidc_helper.h | |||
@@ -61,8 +61,8 @@ enum OIDC_VerificationOptions | |||
61 | * @return a new base64-encoded JWT string. | 61 | * @return a new base64-encoded JWT string. |
62 | */ | 62 | */ |
63 | char * | 63 | char * |
64 | OIDC_generate_id_token_rsa (const struct GNUNET_IDENTITY_PublicKey *aud_key, | 64 | OIDC_generate_id_token_rsa (const struct GNUNET_CRYPTO_PublicKey *aud_key, |
65 | const struct GNUNET_IDENTITY_PublicKey *sub_key, | 65 | const struct GNUNET_CRYPTO_PublicKey *sub_key, |
66 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 66 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
67 | const struct | 67 | const struct |
68 | GNUNET_RECLAIM_PresentationList *presentations, | 68 | GNUNET_RECLAIM_PresentationList *presentations, |
@@ -82,8 +82,8 @@ OIDC_generate_id_token_rsa (const struct GNUNET_IDENTITY_PublicKey *aud_key, | |||
82 | * @return a new base64-encoded JWT string. | 82 | * @return a new base64-encoded JWT string. |
83 | */ | 83 | */ |
84 | char* | 84 | char* |
85 | OIDC_generate_id_token_hmac (const struct GNUNET_IDENTITY_PublicKey *aud_key, | 85 | OIDC_generate_id_token_hmac (const struct GNUNET_CRYPTO_PublicKey *aud_key, |
86 | const struct GNUNET_IDENTITY_PublicKey *sub_key, | 86 | const struct GNUNET_CRYPTO_PublicKey *sub_key, |
87 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 87 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
88 | const struct | 88 | const struct |
89 | GNUNET_RECLAIM_PresentationList *presentations, | 89 | GNUNET_RECLAIM_PresentationList *presentations, |
@@ -105,7 +105,7 @@ OIDC_generate_id_token_hmac (const struct GNUNET_IDENTITY_PublicKey *aud_key, | |||
105 | * @return a new authorization code (caller must free) | 105 | * @return a new authorization code (caller must free) |
106 | */ | 106 | */ |
107 | char* | 107 | char* |
108 | OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer, | 108 | OIDC_build_authz_code (const struct GNUNET_CRYPTO_PrivateKey *issuer, |
109 | const struct GNUNET_RECLAIM_Ticket *ticket, | 109 | const struct GNUNET_RECLAIM_Ticket *ticket, |
110 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 110 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
111 | const struct | 111 | const struct |
@@ -128,7 +128,7 @@ OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer, | |||
128 | * @return GNUNET_OK if successful, else GNUNET_SYSERR | 128 | * @return GNUNET_OK if successful, else GNUNET_SYSERR |
129 | */ | 129 | */ |
130 | int | 130 | int |
131 | OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *ecdsa_pub, | 131 | OIDC_parse_authz_code (const struct GNUNET_CRYPTO_PublicKey *ecdsa_pub, |
132 | const char *code, | 132 | const char *code, |
133 | const char *code_verifier, | 133 | const char *code_verifier, |
134 | struct GNUNET_RECLAIM_Ticket *ticket, | 134 | struct GNUNET_RECLAIM_Ticket *ticket, |
@@ -188,7 +188,7 @@ OIDC_check_scopes_for_claim_request (const char *scopes, | |||
188 | * @return Userinfo JSON | 188 | * @return Userinfo JSON |
189 | */ | 189 | */ |
190 | char * | 190 | char * |
191 | OIDC_generate_userinfo (const struct GNUNET_IDENTITY_PublicKey *sub_key, | 191 | OIDC_generate_userinfo (const struct GNUNET_CRYPTO_PublicKey *sub_key, |
192 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 192 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
193 | const struct | 193 | const struct |
194 | GNUNET_RECLAIM_PresentationList *presentations); | 194 | GNUNET_RECLAIM_PresentationList *presentations); |
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index ff882aca1..d0aee043e 100644 --- a/src/reclaim/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
@@ -331,7 +331,7 @@ struct OIDC_Variables | |||
331 | /** | 331 | /** |
332 | * The RP client public key | 332 | * The RP client public key |
333 | */ | 333 | */ |
334 | struct GNUNET_IDENTITY_PublicKey client_pkey; | 334 | struct GNUNET_CRYPTO_PublicKey client_pkey; |
335 | 335 | ||
336 | /** | 336 | /** |
337 | * The OIDC client id of the RP | 337 | * The OIDC client id of the RP |
@@ -442,7 +442,7 @@ struct RequestHandle | |||
442 | /** | 442 | /** |
443 | * Pointer to ego private key | 443 | * Pointer to ego private key |
444 | */ | 444 | */ |
445 | struct GNUNET_IDENTITY_PrivateKey priv_key; | 445 | struct GNUNET_CRYPTO_PrivateKey priv_key; |
446 | 446 | ||
447 | /** | 447 | /** |
448 | * OIDC variables | 448 | * OIDC variables |
@@ -1257,7 +1257,7 @@ oidc_cred_collect_finished_cb (void *cls) | |||
1257 | */ | 1257 | */ |
1258 | static void | 1258 | static void |
1259 | oidc_cred_collect (void *cls, | 1259 | oidc_cred_collect (void *cls, |
1260 | const struct GNUNET_IDENTITY_PublicKey *identity, | 1260 | const struct GNUNET_CRYPTO_PublicKey *identity, |
1261 | const struct GNUNET_RECLAIM_Credential *cred) | 1261 | const struct GNUNET_RECLAIM_Credential *cred) |
1262 | { | 1262 | { |
1263 | struct RequestHandle *handle = cls; | 1263 | struct RequestHandle *handle = cls; |
@@ -1380,7 +1380,7 @@ attr_in_userinfo_request (struct RequestHandle *handle, | |||
1380 | */ | 1380 | */ |
1381 | static void | 1381 | static void |
1382 | oidc_attr_collect (void *cls, | 1382 | oidc_attr_collect (void *cls, |
1383 | const struct GNUNET_IDENTITY_PublicKey *identity, | 1383 | const struct GNUNET_CRYPTO_PublicKey *identity, |
1384 | const struct GNUNET_RECLAIM_Attribute *attr) | 1384 | const struct GNUNET_RECLAIM_Attribute *attr) |
1385 | { | 1385 | { |
1386 | struct RequestHandle *handle = cls; | 1386 | struct RequestHandle *handle = cls; |
@@ -1429,8 +1429,8 @@ code_redirect (void *cls) | |||
1429 | struct RequestHandle *handle = cls; | 1429 | struct RequestHandle *handle = cls; |
1430 | struct GNUNET_TIME_Absolute current_time; | 1430 | struct GNUNET_TIME_Absolute current_time; |
1431 | struct GNUNET_TIME_Absolute *relog_time; | 1431 | struct GNUNET_TIME_Absolute *relog_time; |
1432 | struct GNUNET_IDENTITY_PublicKey pubkey; | 1432 | struct GNUNET_CRYPTO_PublicKey pubkey; |
1433 | struct GNUNET_IDENTITY_PublicKey ego_pkey; | 1433 | struct GNUNET_CRYPTO_PublicKey ego_pkey; |
1434 | struct GNUNET_HashCode cache_key; | 1434 | struct GNUNET_HashCode cache_key; |
1435 | char *identity_cookie; | 1435 | char *identity_cookie; |
1436 | 1436 | ||
@@ -1450,7 +1450,7 @@ code_redirect (void *cls) | |||
1450 | if (current_time.abs_value_us <= relog_time->abs_value_us) | 1450 | if (current_time.abs_value_us <= relog_time->abs_value_us) |
1451 | { | 1451 | { |
1452 | if (GNUNET_OK != | 1452 | if (GNUNET_OK != |
1453 | GNUNET_IDENTITY_public_key_from_string (handle->oidc | 1453 | GNUNET_CRYPTO_public_key_from_string (handle->oidc |
1454 | ->login_identity, | 1454 | ->login_identity, |
1455 | &pubkey)) | 1455 | &pubkey)) |
1456 | { | 1456 | { |
@@ -1544,7 +1544,7 @@ lookup_redirect_uri_result (void *cls, | |||
1544 | char *tmp; | 1544 | char *tmp; |
1545 | char *tmp_key_str; | 1545 | char *tmp_key_str; |
1546 | char *pos; | 1546 | char *pos; |
1547 | struct GNUNET_IDENTITY_PublicKey redirect_zone; | 1547 | struct GNUNET_CRYPTO_PublicKey redirect_zone; |
1548 | 1548 | ||
1549 | handle->gns_op = NULL; | 1549 | handle->gns_op = NULL; |
1550 | if (0 == rd_count) | 1550 | if (0 == rd_count) |
@@ -1776,10 +1776,10 @@ static void | |||
1776 | tld_iter (void *cls, const char *section, const char *option, const char *value) | 1776 | tld_iter (void *cls, const char *section, const char *option, const char *value) |
1777 | { | 1777 | { |
1778 | struct RequestHandle *handle = cls; | 1778 | struct RequestHandle *handle = cls; |
1779 | struct GNUNET_IDENTITY_PublicKey pkey; | 1779 | struct GNUNET_CRYPTO_PublicKey pkey; |
1780 | 1780 | ||
1781 | if (GNUNET_OK != | 1781 | if (GNUNET_OK != |
1782 | GNUNET_IDENTITY_public_key_from_string (value, &pkey)) | 1782 | GNUNET_CRYPTO_public_key_from_string (value, &pkey)) |
1783 | { | 1783 | { |
1784 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Skipping non key %s\n", value); | 1784 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Skipping non key %s\n", value); |
1785 | return; | 1785 | return; |
@@ -1803,8 +1803,8 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1803 | { | 1803 | { |
1804 | struct RequestHandle *handle = cls; | 1804 | struct RequestHandle *handle = cls; |
1805 | struct EgoEntry *tmp_ego; | 1805 | struct EgoEntry *tmp_ego; |
1806 | const struct GNUNET_IDENTITY_PrivateKey *priv_key; | 1806 | const struct GNUNET_CRYPTO_PrivateKey *priv_key; |
1807 | struct GNUNET_IDENTITY_PublicKey pkey; | 1807 | struct GNUNET_CRYPTO_PublicKey pkey; |
1808 | 1808 | ||
1809 | cookie_identity_interpretation (handle); | 1809 | cookie_identity_interpretation (handle); |
1810 | 1810 | ||
@@ -1832,7 +1832,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1832 | } | 1832 | } |
1833 | 1833 | ||
1834 | if (GNUNET_OK != | 1834 | if (GNUNET_OK != |
1835 | GNUNET_IDENTITY_public_key_from_string (handle->oidc->client_id, | 1835 | GNUNET_CRYPTO_public_key_from_string (handle->oidc->client_id, |
1836 | &handle->oidc->client_pkey)) | 1836 | &handle->oidc->client_pkey)) |
1837 | { | 1837 | { |
1838 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_UNAUTHORIZED_CLIENT); | 1838 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_UNAUTHORIZED_CLIENT); |
@@ -1848,7 +1848,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1848 | for (tmp_ego = ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next) | 1848 | for (tmp_ego = ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next) |
1849 | { | 1849 | { |
1850 | priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego); | 1850 | priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego); |
1851 | GNUNET_IDENTITY_key_get_public (priv_key, &pkey); | 1851 | GNUNET_CRYPTO_key_get_public (priv_key, &pkey); |
1852 | if (0 == GNUNET_memcmp (&pkey, &handle->oidc->client_pkey)) | 1852 | if (0 == GNUNET_memcmp (&pkey, &handle->oidc->client_pkey)) |
1853 | { | 1853 | { |
1854 | handle->tld = GNUNET_strdup (tmp_ego->identifier); | 1854 | handle->tld = GNUNET_strdup (tmp_ego->identifier); |
@@ -2041,7 +2041,7 @@ parse_credentials_post_body (struct RequestHandle *handle, | |||
2041 | 2041 | ||
2042 | static int | 2042 | static int |
2043 | check_authorization (struct RequestHandle *handle, | 2043 | check_authorization (struct RequestHandle *handle, |
2044 | struct GNUNET_IDENTITY_PublicKey *cid) | 2044 | struct GNUNET_CRYPTO_PublicKey *cid) |
2045 | { | 2045 | { |
2046 | char *expected_pass; | 2046 | char *expected_pass; |
2047 | char *received_cid; | 2047 | char *received_cid; |
@@ -2078,7 +2078,7 @@ check_authorization (struct RequestHandle *handle, | |||
2078 | GNUNET_STRINGS_string_to_data (received_cid, | 2078 | GNUNET_STRINGS_string_to_data (received_cid, |
2079 | strlen (received_cid), | 2079 | strlen (received_cid), |
2080 | cid, | 2080 | cid, |
2081 | sizeof(struct GNUNET_IDENTITY_PublicKey)); | 2081 | sizeof(struct GNUNET_CRYPTO_PublicKey)); |
2082 | GNUNET_free (received_cid); | 2082 | GNUNET_free (received_cid); |
2083 | return GNUNET_OK; | 2083 | return GNUNET_OK; |
2084 | 2084 | ||
@@ -2128,7 +2128,7 @@ check_authorization (struct RequestHandle *handle, | |||
2128 | GNUNET_STRINGS_string_to_data (received_cid, | 2128 | GNUNET_STRINGS_string_to_data (received_cid, |
2129 | strlen (received_cid), | 2129 | strlen (received_cid), |
2130 | cid, | 2130 | cid, |
2131 | sizeof(struct GNUNET_IDENTITY_PublicKey)); | 2131 | sizeof(struct GNUNET_CRYPTO_PublicKey)); |
2132 | 2132 | ||
2133 | GNUNET_free (received_cpw); | 2133 | GNUNET_free (received_cpw); |
2134 | GNUNET_free (received_cid); | 2134 | GNUNET_free (received_cid); |
@@ -2138,10 +2138,10 @@ check_authorization (struct RequestHandle *handle, | |||
2138 | 2138 | ||
2139 | const struct EgoEntry * | 2139 | const struct EgoEntry * |
2140 | find_ego (struct RequestHandle *handle, | 2140 | find_ego (struct RequestHandle *handle, |
2141 | struct GNUNET_IDENTITY_PublicKey *test_key) | 2141 | struct GNUNET_CRYPTO_PublicKey *test_key) |
2142 | { | 2142 | { |
2143 | struct EgoEntry *ego_entry; | 2143 | struct EgoEntry *ego_entry; |
2144 | struct GNUNET_IDENTITY_PublicKey pub_key; | 2144 | struct GNUNET_CRYPTO_PublicKey pub_key; |
2145 | 2145 | ||
2146 | for (ego_entry = ego_head; NULL != ego_entry; | 2146 | for (ego_entry = ego_head; NULL != ego_entry; |
2147 | ego_entry = ego_entry->next) | 2147 | ego_entry = ego_entry->next) |
@@ -2172,7 +2172,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
2172 | struct GNUNET_RECLAIM_AttributeList *cl = NULL; | 2172 | struct GNUNET_RECLAIM_AttributeList *cl = NULL; |
2173 | struct GNUNET_RECLAIM_PresentationList *pl = NULL; | 2173 | struct GNUNET_RECLAIM_PresentationList *pl = NULL; |
2174 | struct GNUNET_RECLAIM_Ticket ticket; | 2174 | struct GNUNET_RECLAIM_Ticket ticket; |
2175 | struct GNUNET_IDENTITY_PublicKey cid; | 2175 | struct GNUNET_CRYPTO_PublicKey cid; |
2176 | struct GNUNET_HashCode cache_key; | 2176 | struct GNUNET_HashCode cache_key; |
2177 | struct MHD_Response *resp = NULL; | 2177 | struct MHD_Response *resp = NULL; |
2178 | char *grant_type = NULL; | 2178 | char *grant_type = NULL; |
@@ -2439,7 +2439,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
2439 | */ | 2439 | */ |
2440 | static void | 2440 | static void |
2441 | consume_ticket (void *cls, | 2441 | consume_ticket (void *cls, |
2442 | const struct GNUNET_IDENTITY_PublicKey *identity, | 2442 | const struct GNUNET_CRYPTO_PublicKey *identity, |
2443 | const struct GNUNET_RECLAIM_Attribute *attr, | 2443 | const struct GNUNET_RECLAIM_Attribute *attr, |
2444 | const struct GNUNET_RECLAIM_Presentation *presentation) | 2444 | const struct GNUNET_RECLAIM_Presentation *presentation) |
2445 | { | 2445 | { |
@@ -2620,7 +2620,7 @@ userinfo_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
2620 | char *authorization_type; | 2620 | char *authorization_type; |
2621 | char *authorization_access_token; | 2621 | char *authorization_access_token; |
2622 | const struct EgoEntry *aud_ego; | 2622 | const struct EgoEntry *aud_ego; |
2623 | const struct GNUNET_IDENTITY_PrivateKey *privkey; | 2623 | const struct GNUNET_CRYPTO_PrivateKey *privkey; |
2624 | 2624 | ||
2625 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Getting userinfo\n"); | 2625 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Getting userinfo\n"); |
2626 | GNUNET_CRYPTO_hash (OIDC_AUTHORIZATION_HEADER_KEY, | 2626 | GNUNET_CRYPTO_hash (OIDC_AUTHORIZATION_HEADER_KEY, |
@@ -2802,7 +2802,7 @@ list_ego (void *cls, | |||
2802 | const char *identifier) | 2802 | const char *identifier) |
2803 | { | 2803 | { |
2804 | struct EgoEntry *ego_entry; | 2804 | struct EgoEntry *ego_entry; |
2805 | struct GNUNET_IDENTITY_PublicKey pk; | 2805 | struct GNUNET_CRYPTO_PublicKey pk; |
2806 | 2806 | ||
2807 | if (NULL == ego) | 2807 | if (NULL == ego) |
2808 | { | 2808 | { |
@@ -2814,7 +2814,7 @@ list_ego (void *cls, | |||
2814 | { | 2814 | { |
2815 | ego_entry = GNUNET_new (struct EgoEntry); | 2815 | ego_entry = GNUNET_new (struct EgoEntry); |
2816 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 2816 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
2817 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); | 2817 | ego_entry->keystring = GNUNET_CRYPTO_public_key_to_string (&pk); |
2818 | ego_entry->ego = ego; | 2818 | ego_entry->ego = ego; |
2819 | ego_entry->identifier = GNUNET_strdup (identifier); | 2819 | ego_entry->identifier = GNUNET_strdup (identifier); |
2820 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 2820 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
@@ -2841,7 +2841,7 @@ list_ego (void *cls, | |||
2841 | /* Add */ | 2841 | /* Add */ |
2842 | ego_entry = GNUNET_new (struct EgoEntry); | 2842 | ego_entry = GNUNET_new (struct EgoEntry); |
2843 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 2843 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
2844 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); | 2844 | ego_entry->keystring = GNUNET_CRYPTO_public_key_to_string (&pk); |
2845 | ego_entry->ego = ego; | 2845 | ego_entry->ego = ego; |
2846 | ego_entry->identifier = GNUNET_strdup (identifier); | 2846 | ego_entry->identifier = GNUNET_strdup (identifier); |
2847 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 2847 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 9cc41bf1a..b2586109a 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -172,7 +172,7 @@ struct RequestHandle | |||
172 | /** | 172 | /** |
173 | * Pointer to ego private key | 173 | * Pointer to ego private key |
174 | */ | 174 | */ |
175 | struct GNUNET_IDENTITY_PrivateKey priv_key; | 175 | struct GNUNET_CRYPTO_PrivateKey priv_key; |
176 | 176 | ||
177 | /** | 177 | /** |
178 | * Rest connection | 178 | * Rest connection |
@@ -449,14 +449,14 @@ ticket_collect (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket) | |||
449 | tmp = | 449 | tmp = |
450 | GNUNET_STRINGS_data_to_string_alloc (&ticket->identity, | 450 | GNUNET_STRINGS_data_to_string_alloc (&ticket->identity, |
451 | sizeof(struct | 451 | sizeof(struct |
452 | GNUNET_IDENTITY_PublicKey)); | 452 | GNUNET_CRYPTO_PublicKey)); |
453 | value = json_string (tmp); | 453 | value = json_string (tmp); |
454 | json_object_set_new (json_resource, "issuer", value); | 454 | json_object_set_new (json_resource, "issuer", value); |
455 | GNUNET_free (tmp); | 455 | GNUNET_free (tmp); |
456 | tmp = | 456 | tmp = |
457 | GNUNET_STRINGS_data_to_string_alloc (&ticket->audience, | 457 | GNUNET_STRINGS_data_to_string_alloc (&ticket->audience, |
458 | sizeof(struct | 458 | sizeof(struct |
459 | GNUNET_IDENTITY_PublicKey)); | 459 | GNUNET_CRYPTO_PublicKey)); |
460 | value = json_string (tmp); | 460 | value = json_string (tmp); |
461 | json_object_set_new (json_resource, "audience", value); | 461 | json_object_set_new (json_resource, "audience", value); |
462 | GNUNET_free (tmp); | 462 | GNUNET_free (tmp); |
@@ -474,7 +474,7 @@ add_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
474 | void *cls) | 474 | void *cls) |
475 | { | 475 | { |
476 | struct RequestHandle *handle = cls; | 476 | struct RequestHandle *handle = cls; |
477 | const struct GNUNET_IDENTITY_PrivateKey *identity_priv; | 477 | const struct GNUNET_CRYPTO_PrivateKey *identity_priv; |
478 | const char *identity; | 478 | const char *identity; |
479 | struct EgoEntry *ego_entry; | 479 | struct EgoEntry *ego_entry; |
480 | struct GNUNET_RECLAIM_Credential *attribute; | 480 | struct GNUNET_RECLAIM_Credential *attribute; |
@@ -562,7 +562,7 @@ add_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
562 | */ | 562 | */ |
563 | static void | 563 | static void |
564 | cred_collect (void *cls, | 564 | cred_collect (void *cls, |
565 | const struct GNUNET_IDENTITY_PublicKey *identity, | 565 | const struct GNUNET_CRYPTO_PublicKey *identity, |
566 | const struct GNUNET_RECLAIM_Credential *cred) | 566 | const struct GNUNET_RECLAIM_Credential *cred) |
567 | { | 567 | { |
568 | struct RequestHandle *handle = cls; | 568 | struct RequestHandle *handle = cls; |
@@ -649,7 +649,7 @@ list_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
649 | void *cls) | 649 | void *cls) |
650 | { | 650 | { |
651 | struct RequestHandle *handle = cls; | 651 | struct RequestHandle *handle = cls; |
652 | const struct GNUNET_IDENTITY_PrivateKey *priv_key; | 652 | const struct GNUNET_CRYPTO_PrivateKey *priv_key; |
653 | struct EgoEntry *ego_entry; | 653 | struct EgoEntry *ego_entry; |
654 | char *identity; | 654 | char *identity; |
655 | 655 | ||
@@ -706,7 +706,7 @@ delete_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
706 | void *cls) | 706 | void *cls) |
707 | { | 707 | { |
708 | struct RequestHandle *handle = cls; | 708 | struct RequestHandle *handle = cls; |
709 | const struct GNUNET_IDENTITY_PrivateKey *priv_key; | 709 | const struct GNUNET_CRYPTO_PrivateKey *priv_key; |
710 | struct GNUNET_RECLAIM_Credential attr; | 710 | struct GNUNET_RECLAIM_Credential attr; |
711 | struct EgoEntry *ego_entry; | 711 | struct EgoEntry *ego_entry; |
712 | char *identity_id_str; | 712 | char *identity_id_str; |
@@ -772,7 +772,7 @@ list_tickets_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
772 | const char *url, | 772 | const char *url, |
773 | void *cls) | 773 | void *cls) |
774 | { | 774 | { |
775 | const struct GNUNET_IDENTITY_PrivateKey *priv_key; | 775 | const struct GNUNET_CRYPTO_PrivateKey *priv_key; |
776 | struct RequestHandle *handle = cls; | 776 | struct RequestHandle *handle = cls; |
777 | struct EgoEntry *ego_entry; | 777 | struct EgoEntry *ego_entry; |
778 | char *identity; | 778 | char *identity; |
@@ -819,7 +819,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
819 | const char *url, | 819 | const char *url, |
820 | void *cls) | 820 | void *cls) |
821 | { | 821 | { |
822 | const struct GNUNET_IDENTITY_PrivateKey *identity_priv; | 822 | const struct GNUNET_CRYPTO_PrivateKey *identity_priv; |
823 | const char *identity; | 823 | const char *identity; |
824 | struct RequestHandle *handle = cls; | 824 | struct RequestHandle *handle = cls; |
825 | struct EgoEntry *ego_entry; | 825 | struct EgoEntry *ego_entry; |
@@ -967,7 +967,7 @@ parse_jwt (const struct GNUNET_RECLAIM_Credential *cred, | |||
967 | */ | 967 | */ |
968 | static void | 968 | static void |
969 | attr_collect (void *cls, | 969 | attr_collect (void *cls, |
970 | const struct GNUNET_IDENTITY_PublicKey *identity, | 970 | const struct GNUNET_CRYPTO_PublicKey *identity, |
971 | const struct GNUNET_RECLAIM_Attribute *attr) | 971 | const struct GNUNET_RECLAIM_Attribute *attr) |
972 | { | 972 | { |
973 | struct RequestHandle *handle = cls; | 973 | struct RequestHandle *handle = cls; |
@@ -1016,7 +1016,7 @@ list_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1016 | const char *url, | 1016 | const char *url, |
1017 | void *cls) | 1017 | void *cls) |
1018 | { | 1018 | { |
1019 | const struct GNUNET_IDENTITY_PrivateKey *priv_key; | 1019 | const struct GNUNET_CRYPTO_PrivateKey *priv_key; |
1020 | struct RequestHandle *handle = cls; | 1020 | struct RequestHandle *handle = cls; |
1021 | struct EgoEntry *ego_entry; | 1021 | struct EgoEntry *ego_entry; |
1022 | char *identity; | 1022 | char *identity; |
@@ -1070,7 +1070,7 @@ delete_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1070 | const char *url, | 1070 | const char *url, |
1071 | void *cls) | 1071 | void *cls) |
1072 | { | 1072 | { |
1073 | const struct GNUNET_IDENTITY_PrivateKey *priv_key; | 1073 | const struct GNUNET_CRYPTO_PrivateKey *priv_key; |
1074 | struct RequestHandle *handle = cls; | 1074 | struct RequestHandle *handle = cls; |
1075 | struct GNUNET_RECLAIM_Attribute attr; | 1075 | struct GNUNET_RECLAIM_Attribute attr; |
1076 | struct EgoEntry *ego_entry; | 1076 | struct EgoEntry *ego_entry; |
@@ -1128,11 +1128,11 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1128 | const char *url, | 1128 | const char *url, |
1129 | void *cls) | 1129 | void *cls) |
1130 | { | 1130 | { |
1131 | const struct GNUNET_IDENTITY_PrivateKey *identity_priv; | 1131 | const struct GNUNET_CRYPTO_PrivateKey *identity_priv; |
1132 | struct RequestHandle *handle = cls; | 1132 | struct RequestHandle *handle = cls; |
1133 | struct EgoEntry *ego_entry; | 1133 | struct EgoEntry *ego_entry; |
1134 | struct GNUNET_RECLAIM_Ticket *ticket = NULL; | 1134 | struct GNUNET_RECLAIM_Ticket *ticket = NULL; |
1135 | struct GNUNET_IDENTITY_PublicKey tmp_pk; | 1135 | struct GNUNET_CRYPTO_PublicKey tmp_pk; |
1136 | char term_data[handle->rest_handle->data_size + 1]; | 1136 | char term_data[handle->rest_handle->data_size + 1]; |
1137 | json_t *data_json; | 1137 | json_t *data_json; |
1138 | json_error_t err; | 1138 | json_error_t err; |
@@ -1176,7 +1176,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1176 | GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &tmp_pk); | 1176 | GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &tmp_pk); |
1177 | if (0 == memcmp (&ticket->identity, | 1177 | if (0 == memcmp (&ticket->identity, |
1178 | &tmp_pk, | 1178 | &tmp_pk, |
1179 | sizeof(struct GNUNET_IDENTITY_PublicKey))) | 1179 | sizeof(struct GNUNET_CRYPTO_PublicKey))) |
1180 | break; | 1180 | break; |
1181 | } | 1181 | } |
1182 | if (NULL == ego_entry) | 1182 | if (NULL == ego_entry) |
@@ -1198,7 +1198,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1198 | 1198 | ||
1199 | static void | 1199 | static void |
1200 | consume_cont (void *cls, | 1200 | consume_cont (void *cls, |
1201 | const struct GNUNET_IDENTITY_PublicKey *identity, | 1201 | const struct GNUNET_CRYPTO_PublicKey *identity, |
1202 | const struct GNUNET_RECLAIM_Attribute *attr, | 1202 | const struct GNUNET_RECLAIM_Attribute *attr, |
1203 | const struct GNUNET_RECLAIM_Presentation *presentation) | 1203 | const struct GNUNET_RECLAIM_Presentation *presentation) |
1204 | { | 1204 | { |
@@ -1235,11 +1235,11 @@ consume_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1235 | const char *url, | 1235 | const char *url, |
1236 | void *cls) | 1236 | void *cls) |
1237 | { | 1237 | { |
1238 | const struct GNUNET_IDENTITY_PrivateKey *identity_priv; | 1238 | const struct GNUNET_CRYPTO_PrivateKey *identity_priv; |
1239 | struct RequestHandle *handle = cls; | 1239 | struct RequestHandle *handle = cls; |
1240 | struct EgoEntry *ego_entry; | 1240 | struct EgoEntry *ego_entry; |
1241 | struct GNUNET_RECLAIM_Ticket *ticket; | 1241 | struct GNUNET_RECLAIM_Ticket *ticket; |
1242 | struct GNUNET_IDENTITY_PublicKey tmp_pk; | 1242 | struct GNUNET_CRYPTO_PublicKey tmp_pk; |
1243 | char term_data[handle->rest_handle->data_size + 1]; | 1243 | char term_data[handle->rest_handle->data_size + 1]; |
1244 | json_t *data_json; | 1244 | json_t *data_json; |
1245 | json_error_t err; | 1245 | json_error_t err; |
@@ -1279,7 +1279,7 @@ consume_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1279 | GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &tmp_pk); | 1279 | GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &tmp_pk); |
1280 | if (0 == memcmp (&ticket->audience, | 1280 | if (0 == memcmp (&ticket->audience, |
1281 | &tmp_pk, | 1281 | &tmp_pk, |
1282 | sizeof(struct GNUNET_IDENTITY_PublicKey))) | 1282 | sizeof(struct GNUNET_CRYPTO_PublicKey))) |
1283 | break; | 1283 | break; |
1284 | } | 1284 | } |
1285 | if (NULL == ego_entry) | 1285 | if (NULL == ego_entry) |
@@ -1362,7 +1362,7 @@ list_ego (void *cls, | |||
1362 | const char *identifier) | 1362 | const char *identifier) |
1363 | { | 1363 | { |
1364 | struct EgoEntry *ego_entry; | 1364 | struct EgoEntry *ego_entry; |
1365 | struct GNUNET_IDENTITY_PublicKey pk; | 1365 | struct GNUNET_CRYPTO_PublicKey pk; |
1366 | 1366 | ||
1367 | if (NULL == ego) | 1367 | if (NULL == ego) |
1368 | { | 1368 | { |
@@ -1373,7 +1373,7 @@ list_ego (void *cls, | |||
1373 | { | 1373 | { |
1374 | ego_entry = GNUNET_new (struct EgoEntry); | 1374 | ego_entry = GNUNET_new (struct EgoEntry); |
1375 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 1375 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
1376 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); | 1376 | ego_entry->keystring = GNUNET_CRYPTO_public_key_to_string (&pk); |
1377 | ego_entry->ego = ego; | 1377 | ego_entry->ego = ego; |
1378 | ego_entry->identifier = GNUNET_strdup (identifier); | 1378 | ego_entry->identifier = GNUNET_strdup (identifier); |
1379 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 1379 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
@@ -1399,7 +1399,7 @@ list_ego (void *cls, | |||
1399 | /* Add */ | 1399 | /* Add */ |
1400 | ego_entry = GNUNET_new (struct EgoEntry); | 1400 | ego_entry = GNUNET_new (struct EgoEntry); |
1401 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 1401 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
1402 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); | 1402 | ego_entry->keystring = GNUNET_CRYPTO_public_key_to_string (&pk); |
1403 | ego_entry->ego = ego; | 1403 | ego_entry->ego = ego; |
1404 | ego_entry->identifier = GNUNET_strdup (identifier); | 1404 | ego_entry->identifier = GNUNET_strdup (identifier); |
1405 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 1405 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c index fedee3fff..e9a34dd95 100644 --- a/src/reclaim/reclaim_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -234,7 +234,7 @@ struct GNUNET_RECLAIM_AttributeIterator | |||
234 | /** | 234 | /** |
235 | * Private key of the zone. | 235 | * Private key of the zone. |
236 | */ | 236 | */ |
237 | struct GNUNET_IDENTITY_PrivateKey identity; | 237 | struct GNUNET_CRYPTO_PrivateKey identity; |
238 | 238 | ||
239 | /** | 239 | /** |
240 | * The operation id this zone iteration operation has | 240 | * The operation id this zone iteration operation has |
@@ -301,7 +301,7 @@ struct GNUNET_RECLAIM_CredentialIterator | |||
301 | /** | 301 | /** |
302 | * Private key of the zone. | 302 | * Private key of the zone. |
303 | */ | 303 | */ |
304 | struct GNUNET_IDENTITY_PrivateKey identity; | 304 | struct GNUNET_CRYPTO_PrivateKey identity; |
305 | 305 | ||
306 | /** | 306 | /** |
307 | * The operation id this zone iteration operation has | 307 | * The operation id this zone iteration operation has |
@@ -592,7 +592,7 @@ static void | |||
592 | handle_consume_ticket_result (void *cls, | 592 | handle_consume_ticket_result (void *cls, |
593 | const struct ConsumeTicketResultMessage *msg) | 593 | const struct ConsumeTicketResultMessage *msg) |
594 | { | 594 | { |
595 | struct GNUNET_IDENTITY_PublicKey identity; | 595 | struct GNUNET_CRYPTO_PublicKey identity; |
596 | struct GNUNET_RECLAIM_Handle *h = cls; | 596 | struct GNUNET_RECLAIM_Handle *h = cls; |
597 | struct GNUNET_RECLAIM_Operation *op; | 597 | struct GNUNET_RECLAIM_Operation *op; |
598 | size_t attrs_len; | 598 | size_t attrs_len; |
@@ -621,7 +621,7 @@ handle_consume_ticket_result (void *cls, | |||
621 | struct GNUNET_RECLAIM_PresentationListEntry *ple; | 621 | struct GNUNET_RECLAIM_PresentationListEntry *ple; |
622 | read_ptr = (char *) &msg[1]; | 622 | read_ptr = (char *) &msg[1]; |
623 | GNUNET_assert (GNUNET_SYSERR != | 623 | GNUNET_assert (GNUNET_SYSERR != |
624 | GNUNET_IDENTITY_read_public_key_from_buffer (read_ptr, | 624 | GNUNET_CRYPTO_read_public_key_from_buffer (read_ptr, |
625 | key_len, | 625 | key_len, |
626 | &identity, | 626 | &identity, |
627 | &read)); | 627 | &read)); |
@@ -714,7 +714,7 @@ check_attribute_result (void *cls, const struct AttributeResultMessage *msg) | |||
714 | static void | 714 | static void |
715 | handle_attribute_result (void *cls, const struct AttributeResultMessage *msg) | 715 | handle_attribute_result (void *cls, const struct AttributeResultMessage *msg) |
716 | { | 716 | { |
717 | static struct GNUNET_IDENTITY_PublicKey identity; | 717 | static struct GNUNET_CRYPTO_PublicKey identity; |
718 | struct GNUNET_RECLAIM_Handle *h = cls; | 718 | struct GNUNET_RECLAIM_Handle *h = cls; |
719 | struct GNUNET_RECLAIM_AttributeIterator *it; | 719 | struct GNUNET_RECLAIM_AttributeIterator *it; |
720 | struct GNUNET_RECLAIM_Operation *op; | 720 | struct GNUNET_RECLAIM_Operation *op; |
@@ -765,7 +765,7 @@ handle_attribute_result (void *cls, const struct AttributeResultMessage *msg) | |||
765 | { | 765 | { |
766 | struct GNUNET_RECLAIM_Attribute *attr; | 766 | struct GNUNET_RECLAIM_Attribute *attr; |
767 | GNUNET_assert (GNUNET_SYSERR != | 767 | GNUNET_assert (GNUNET_SYSERR != |
768 | GNUNET_IDENTITY_read_public_key_from_buffer (buf, | 768 | GNUNET_CRYPTO_read_public_key_from_buffer (buf, |
769 | key_len, | 769 | key_len, |
770 | &identity, | 770 | &identity, |
771 | &read)); | 771 | &read)); |
@@ -826,7 +826,7 @@ static void | |||
826 | handle_credential_result (void *cls, const struct | 826 | handle_credential_result (void *cls, const struct |
827 | CredentialResultMessage *msg) | 827 | CredentialResultMessage *msg) |
828 | { | 828 | { |
829 | struct GNUNET_IDENTITY_PublicKey identity; | 829 | struct GNUNET_CRYPTO_PublicKey identity; |
830 | struct GNUNET_RECLAIM_Handle *h = cls; | 830 | struct GNUNET_RECLAIM_Handle *h = cls; |
831 | struct GNUNET_RECLAIM_CredentialIterator *it; | 831 | struct GNUNET_RECLAIM_CredentialIterator *it; |
832 | struct GNUNET_RECLAIM_Operation *op; | 832 | struct GNUNET_RECLAIM_Operation *op; |
@@ -854,7 +854,7 @@ handle_credential_result (void *cls, const struct | |||
854 | if (0 < key_len) | 854 | if (0 < key_len) |
855 | { | 855 | { |
856 | GNUNET_assert (GNUNET_SYSERR != | 856 | GNUNET_assert (GNUNET_SYSERR != |
857 | GNUNET_IDENTITY_read_public_key_from_buffer (buf, | 857 | GNUNET_CRYPTO_read_public_key_from_buffer (buf, |
858 | key_len, | 858 | key_len, |
859 | &identity, | 859 | &identity, |
860 | &read)); | 860 | &read)); |
@@ -1161,7 +1161,7 @@ GNUNET_RECLAIM_disconnect (struct GNUNET_RECLAIM_Handle *h) | |||
1161 | struct GNUNET_RECLAIM_Operation * | 1161 | struct GNUNET_RECLAIM_Operation * |
1162 | GNUNET_RECLAIM_attribute_store ( | 1162 | GNUNET_RECLAIM_attribute_store ( |
1163 | struct GNUNET_RECLAIM_Handle *h, | 1163 | struct GNUNET_RECLAIM_Handle *h, |
1164 | const struct GNUNET_IDENTITY_PrivateKey *pkey, | 1164 | const struct GNUNET_CRYPTO_PrivateKey *pkey, |
1165 | const struct GNUNET_RECLAIM_Attribute *attr, | 1165 | const struct GNUNET_RECLAIM_Attribute *attr, |
1166 | const struct GNUNET_TIME_Relative *exp_interval, | 1166 | const struct GNUNET_TIME_Relative *exp_interval, |
1167 | GNUNET_RECLAIM_ContinuationWithStatus cont, | 1167 | GNUNET_RECLAIM_ContinuationWithStatus cont, |
@@ -1180,14 +1180,14 @@ GNUNET_RECLAIM_attribute_store ( | |||
1180 | op->cls = cont_cls; | 1180 | op->cls = cont_cls; |
1181 | op->r_id = h->r_id_gen++; | 1181 | op->r_id = h->r_id_gen++; |
1182 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1182 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1183 | key_len = GNUNET_IDENTITY_private_key_get_length (pkey); | 1183 | key_len = GNUNET_CRYPTO_private_key_get_length (pkey); |
1184 | attr_len = GNUNET_RECLAIM_attribute_serialize_get_size (attr); | 1184 | attr_len = GNUNET_RECLAIM_attribute_serialize_get_size (attr); |
1185 | op->env = GNUNET_MQ_msg_extra (sam, | 1185 | op->env = GNUNET_MQ_msg_extra (sam, |
1186 | attr_len + key_len, | 1186 | attr_len + key_len, |
1187 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE); | 1187 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE); |
1188 | sam->key_len = htons (key_len); | 1188 | sam->key_len = htons (key_len); |
1189 | buf = (char *) &sam[1]; | 1189 | buf = (char *) &sam[1]; |
1190 | written = GNUNET_IDENTITY_write_private_key_to_buffer (pkey, buf, key_len); | 1190 | written = GNUNET_CRYPTO_write_private_key_to_buffer (pkey, buf, key_len); |
1191 | GNUNET_assert (0 < written); | 1191 | GNUNET_assert (0 < written); |
1192 | buf += written; | 1192 | buf += written; |
1193 | sam->id = htonl (op->r_id); | 1193 | sam->id = htonl (op->r_id); |
@@ -1205,7 +1205,7 @@ GNUNET_RECLAIM_attribute_store ( | |||
1205 | struct GNUNET_RECLAIM_Operation * | 1205 | struct GNUNET_RECLAIM_Operation * |
1206 | GNUNET_RECLAIM_attribute_delete ( | 1206 | GNUNET_RECLAIM_attribute_delete ( |
1207 | struct GNUNET_RECLAIM_Handle *h, | 1207 | struct GNUNET_RECLAIM_Handle *h, |
1208 | const struct GNUNET_IDENTITY_PrivateKey *pkey, | 1208 | const struct GNUNET_CRYPTO_PrivateKey *pkey, |
1209 | const struct GNUNET_RECLAIM_Attribute *attr, | 1209 | const struct GNUNET_RECLAIM_Attribute *attr, |
1210 | GNUNET_RECLAIM_ContinuationWithStatus cont, | 1210 | GNUNET_RECLAIM_ContinuationWithStatus cont, |
1211 | void *cont_cls) | 1211 | void *cont_cls) |
@@ -1223,14 +1223,14 @@ GNUNET_RECLAIM_attribute_delete ( | |||
1223 | op->cls = cont_cls; | 1223 | op->cls = cont_cls; |
1224 | op->r_id = h->r_id_gen++; | 1224 | op->r_id = h->r_id_gen++; |
1225 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1225 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1226 | key_len = GNUNET_IDENTITY_private_key_get_length (pkey); | 1226 | key_len = GNUNET_CRYPTO_private_key_get_length (pkey); |
1227 | attr_len = GNUNET_RECLAIM_attribute_serialize_get_size (attr); | 1227 | attr_len = GNUNET_RECLAIM_attribute_serialize_get_size (attr); |
1228 | op->env = GNUNET_MQ_msg_extra (dam, | 1228 | op->env = GNUNET_MQ_msg_extra (dam, |
1229 | attr_len + key_len, | 1229 | attr_len + key_len, |
1230 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_DELETE); | 1230 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_DELETE); |
1231 | dam->key_len = htons (key_len); | 1231 | dam->key_len = htons (key_len); |
1232 | buf = (char *) &dam[1]; | 1232 | buf = (char *) &dam[1]; |
1233 | written = GNUNET_IDENTITY_write_private_key_to_buffer (pkey, buf, key_len); | 1233 | written = GNUNET_CRYPTO_write_private_key_to_buffer (pkey, buf, key_len); |
1234 | GNUNET_assert (0 < written); | 1234 | GNUNET_assert (0 < written); |
1235 | buf += written; | 1235 | buf += written; |
1236 | dam->id = htonl (op->r_id); | 1236 | dam->id = htonl (op->r_id); |
@@ -1246,7 +1246,7 @@ GNUNET_RECLAIM_attribute_delete ( | |||
1246 | struct GNUNET_RECLAIM_Operation * | 1246 | struct GNUNET_RECLAIM_Operation * |
1247 | GNUNET_RECLAIM_credential_store ( | 1247 | GNUNET_RECLAIM_credential_store ( |
1248 | struct GNUNET_RECLAIM_Handle *h, | 1248 | struct GNUNET_RECLAIM_Handle *h, |
1249 | const struct GNUNET_IDENTITY_PrivateKey *pkey, | 1249 | const struct GNUNET_CRYPTO_PrivateKey *pkey, |
1250 | const struct GNUNET_RECLAIM_Credential *credential, | 1250 | const struct GNUNET_RECLAIM_Credential *credential, |
1251 | const struct GNUNET_TIME_Relative *exp_interval, | 1251 | const struct GNUNET_TIME_Relative *exp_interval, |
1252 | GNUNET_RECLAIM_ContinuationWithStatus cont, | 1252 | GNUNET_RECLAIM_ContinuationWithStatus cont, |
@@ -1264,7 +1264,7 @@ GNUNET_RECLAIM_credential_store ( | |||
1264 | op->as_cb = cont; | 1264 | op->as_cb = cont; |
1265 | op->cls = cont_cls; | 1265 | op->cls = cont_cls; |
1266 | op->r_id = h->r_id_gen++; | 1266 | op->r_id = h->r_id_gen++; |
1267 | key_len = GNUNET_IDENTITY_private_key_get_length (pkey); | 1267 | key_len = GNUNET_CRYPTO_private_key_get_length (pkey); |
1268 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1268 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1269 | attr_len = GNUNET_RECLAIM_credential_serialize_get_size (credential); | 1269 | attr_len = GNUNET_RECLAIM_credential_serialize_get_size (credential); |
1270 | op->env = GNUNET_MQ_msg_extra (sam, | 1270 | op->env = GNUNET_MQ_msg_extra (sam, |
@@ -1272,7 +1272,7 @@ GNUNET_RECLAIM_credential_store ( | |||
1272 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_STORE); | 1272 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_STORE); |
1273 | sam->key_len = htons (key_len); | 1273 | sam->key_len = htons (key_len); |
1274 | buf = (char *) &sam[1]; | 1274 | buf = (char *) &sam[1]; |
1275 | written = GNUNET_IDENTITY_write_private_key_to_buffer (pkey, buf, key_len); | 1275 | written = GNUNET_CRYPTO_write_private_key_to_buffer (pkey, buf, key_len); |
1276 | GNUNET_assert (0 <= written); | 1276 | GNUNET_assert (0 <= written); |
1277 | buf += written; | 1277 | buf += written; |
1278 | sam->id = htonl (op->r_id); | 1278 | sam->id = htonl (op->r_id); |
@@ -1290,7 +1290,7 @@ GNUNET_RECLAIM_credential_store ( | |||
1290 | struct GNUNET_RECLAIM_Operation * | 1290 | struct GNUNET_RECLAIM_Operation * |
1291 | GNUNET_RECLAIM_credential_delete ( | 1291 | GNUNET_RECLAIM_credential_delete ( |
1292 | struct GNUNET_RECLAIM_Handle *h, | 1292 | struct GNUNET_RECLAIM_Handle *h, |
1293 | const struct GNUNET_IDENTITY_PrivateKey *pkey, | 1293 | const struct GNUNET_CRYPTO_PrivateKey *pkey, |
1294 | const struct GNUNET_RECLAIM_Credential *attr, | 1294 | const struct GNUNET_RECLAIM_Credential *attr, |
1295 | GNUNET_RECLAIM_ContinuationWithStatus cont, | 1295 | GNUNET_RECLAIM_ContinuationWithStatus cont, |
1296 | void *cont_cls) | 1296 | void *cont_cls) |
@@ -1307,7 +1307,7 @@ GNUNET_RECLAIM_credential_delete ( | |||
1307 | op->as_cb = cont; | 1307 | op->as_cb = cont; |
1308 | op->cls = cont_cls; | 1308 | op->cls = cont_cls; |
1309 | op->r_id = h->r_id_gen++; | 1309 | op->r_id = h->r_id_gen++; |
1310 | key_len = GNUNET_IDENTITY_private_key_get_length (pkey); | 1310 | key_len = GNUNET_CRYPTO_private_key_get_length (pkey); |
1311 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1311 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1312 | attr_len = GNUNET_RECLAIM_credential_serialize_get_size (attr); | 1312 | attr_len = GNUNET_RECLAIM_credential_serialize_get_size (attr); |
1313 | op->env = GNUNET_MQ_msg_extra (dam, | 1313 | op->env = GNUNET_MQ_msg_extra (dam, |
@@ -1315,7 +1315,7 @@ GNUNET_RECLAIM_credential_delete ( | |||
1315 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_DELETE); | 1315 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_DELETE); |
1316 | dam->key_len = htons (key_len); | 1316 | dam->key_len = htons (key_len); |
1317 | buf = (char *) &dam[1]; | 1317 | buf = (char *) &dam[1]; |
1318 | written = GNUNET_IDENTITY_write_private_key_to_buffer (pkey, buf, key_len); | 1318 | written = GNUNET_CRYPTO_write_private_key_to_buffer (pkey, buf, key_len); |
1319 | GNUNET_assert (0 <= written); | 1319 | GNUNET_assert (0 <= written); |
1320 | buf += written; | 1320 | buf += written; |
1321 | dam->id = htonl (op->r_id); | 1321 | dam->id = htonl (op->r_id); |
@@ -1331,7 +1331,7 @@ GNUNET_RECLAIM_credential_delete ( | |||
1331 | struct GNUNET_RECLAIM_AttributeIterator * | 1331 | struct GNUNET_RECLAIM_AttributeIterator * |
1332 | GNUNET_RECLAIM_get_attributes_start ( | 1332 | GNUNET_RECLAIM_get_attributes_start ( |
1333 | struct GNUNET_RECLAIM_Handle *h, | 1333 | struct GNUNET_RECLAIM_Handle *h, |
1334 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1334 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1335 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1335 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1336 | void *error_cb_cls, | 1336 | void *error_cb_cls, |
1337 | GNUNET_RECLAIM_AttributeResult proc, | 1337 | GNUNET_RECLAIM_AttributeResult proc, |
@@ -1356,7 +1356,7 @@ GNUNET_RECLAIM_get_attributes_start ( | |||
1356 | it->proc_cls = proc_cls; | 1356 | it->proc_cls = proc_cls; |
1357 | it->r_id = rid; | 1357 | it->r_id = rid; |
1358 | it->identity = *identity; | 1358 | it->identity = *identity; |
1359 | key_len = GNUNET_IDENTITY_private_key_get_length (identity); | 1359 | key_len = GNUNET_CRYPTO_private_key_get_length (identity); |
1360 | GNUNET_CONTAINER_DLL_insert_tail (h->it_head, h->it_tail, it); | 1360 | GNUNET_CONTAINER_DLL_insert_tail (h->it_head, h->it_tail, it); |
1361 | env = | 1361 | env = |
1362 | GNUNET_MQ_msg_extra (msg, | 1362 | GNUNET_MQ_msg_extra (msg, |
@@ -1364,7 +1364,7 @@ GNUNET_RECLAIM_get_attributes_start ( | |||
1364 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_START); | 1364 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_START); |
1365 | msg->id = htonl (rid); | 1365 | msg->id = htonl (rid); |
1366 | msg->key_len = htons (key_len); | 1366 | msg->key_len = htons (key_len); |
1367 | GNUNET_IDENTITY_write_private_key_to_buffer (identity, &msg[1], key_len); | 1367 | GNUNET_CRYPTO_write_private_key_to_buffer (identity, &msg[1], key_len); |
1368 | if (NULL == h->mq) | 1368 | if (NULL == h->mq) |
1369 | it->env = env; | 1369 | it->env = env; |
1370 | else | 1370 | else |
@@ -1408,7 +1408,7 @@ GNUNET_RECLAIM_get_attributes_stop (struct GNUNET_RECLAIM_AttributeIterator *it) | |||
1408 | struct GNUNET_RECLAIM_CredentialIterator * | 1408 | struct GNUNET_RECLAIM_CredentialIterator * |
1409 | GNUNET_RECLAIM_get_credentials_start ( | 1409 | GNUNET_RECLAIM_get_credentials_start ( |
1410 | struct GNUNET_RECLAIM_Handle *h, | 1410 | struct GNUNET_RECLAIM_Handle *h, |
1411 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1411 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1412 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1412 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1413 | void *error_cb_cls, | 1413 | void *error_cb_cls, |
1414 | GNUNET_RECLAIM_CredentialResult proc, | 1414 | GNUNET_RECLAIM_CredentialResult proc, |
@@ -1433,7 +1433,7 @@ GNUNET_RECLAIM_get_credentials_start ( | |||
1433 | ait->proc_cls = proc_cls; | 1433 | ait->proc_cls = proc_cls; |
1434 | ait->r_id = rid; | 1434 | ait->r_id = rid; |
1435 | ait->identity = *identity; | 1435 | ait->identity = *identity; |
1436 | key_len = GNUNET_IDENTITY_private_key_get_length (identity); | 1436 | key_len = GNUNET_CRYPTO_private_key_get_length (identity); |
1437 | GNUNET_CONTAINER_DLL_insert_tail (h->ait_head, h->ait_tail, ait); | 1437 | GNUNET_CONTAINER_DLL_insert_tail (h->ait_head, h->ait_tail, ait); |
1438 | env = | 1438 | env = |
1439 | GNUNET_MQ_msg_extra (msg, | 1439 | GNUNET_MQ_msg_extra (msg, |
@@ -1441,7 +1441,7 @@ GNUNET_RECLAIM_get_credentials_start ( | |||
1441 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_ITERATION_START); | 1441 | GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_ITERATION_START); |
1442 | msg->id = htonl (rid); | 1442 | msg->id = htonl (rid); |
1443 | msg->key_len = htons (key_len); | 1443 | msg->key_len = htons (key_len); |
1444 | GNUNET_IDENTITY_write_private_key_to_buffer (identity, &msg[1], key_len); | 1444 | GNUNET_CRYPTO_write_private_key_to_buffer (identity, &msg[1], key_len); |
1445 | if (NULL == h->mq) | 1445 | if (NULL == h->mq) |
1446 | ait->env = env; | 1446 | ait->env = env; |
1447 | else | 1447 | else |
@@ -1488,8 +1488,8 @@ GNUNET_RECLAIM_get_credentials_stop (struct | |||
1488 | struct GNUNET_RECLAIM_Operation * | 1488 | struct GNUNET_RECLAIM_Operation * |
1489 | GNUNET_RECLAIM_ticket_issue ( | 1489 | GNUNET_RECLAIM_ticket_issue ( |
1490 | struct GNUNET_RECLAIM_Handle *h, | 1490 | struct GNUNET_RECLAIM_Handle *h, |
1491 | const struct GNUNET_IDENTITY_PrivateKey *iss, | 1491 | const struct GNUNET_CRYPTO_PrivateKey *iss, |
1492 | const struct GNUNET_IDENTITY_PublicKey *rp, | 1492 | const struct GNUNET_CRYPTO_PublicKey *rp, |
1493 | const struct GNUNET_RECLAIM_AttributeList *attrs, | 1493 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
1494 | GNUNET_RECLAIM_IssueTicketCallback cb, | 1494 | GNUNET_RECLAIM_IssueTicketCallback cb, |
1495 | void *cb_cls) | 1495 | void *cb_cls) |
@@ -1507,8 +1507,8 @@ GNUNET_RECLAIM_ticket_issue ( | |||
1507 | op->ti_cb = cb; | 1507 | op->ti_cb = cb; |
1508 | op->cls = cb_cls; | 1508 | op->cls = cb_cls; |
1509 | op->r_id = h->r_id_gen++; | 1509 | op->r_id = h->r_id_gen++; |
1510 | key_len = GNUNET_IDENTITY_private_key_get_length (iss); | 1510 | key_len = GNUNET_CRYPTO_private_key_get_length (iss); |
1511 | rpk_len = GNUNET_IDENTITY_public_key_get_length (rp); | 1511 | rpk_len = GNUNET_CRYPTO_public_key_get_length (rp); |
1512 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1512 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1513 | attr_len = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs); | 1513 | attr_len = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs); |
1514 | op->env = GNUNET_MQ_msg_extra (tim, | 1514 | op->env = GNUNET_MQ_msg_extra (tim, |
@@ -1517,10 +1517,10 @@ GNUNET_RECLAIM_ticket_issue ( | |||
1517 | tim->key_len = htons (key_len); | 1517 | tim->key_len = htons (key_len); |
1518 | tim->pkey_len = htons (rpk_len); | 1518 | tim->pkey_len = htons (rpk_len); |
1519 | buf = (char *) &tim[1]; | 1519 | buf = (char *) &tim[1]; |
1520 | written = GNUNET_IDENTITY_write_private_key_to_buffer (iss, buf, key_len); | 1520 | written = GNUNET_CRYPTO_write_private_key_to_buffer (iss, buf, key_len); |
1521 | GNUNET_assert (0 <= written); | 1521 | GNUNET_assert (0 <= written); |
1522 | buf += written; | 1522 | buf += written; |
1523 | written = GNUNET_IDENTITY_write_public_key_to_buffer (rp, buf, rpk_len); | 1523 | written = GNUNET_CRYPTO_write_public_key_to_buffer (rp, buf, rpk_len); |
1524 | GNUNET_assert (0 <= written); | 1524 | GNUNET_assert (0 <= written); |
1525 | buf += written; | 1525 | buf += written; |
1526 | tim->id = htonl (op->r_id); | 1526 | tim->id = htonl (op->r_id); |
@@ -1548,7 +1548,7 @@ GNUNET_RECLAIM_ticket_issue ( | |||
1548 | struct GNUNET_RECLAIM_Operation * | 1548 | struct GNUNET_RECLAIM_Operation * |
1549 | GNUNET_RECLAIM_ticket_consume ( | 1549 | GNUNET_RECLAIM_ticket_consume ( |
1550 | struct GNUNET_RECLAIM_Handle *h, | 1550 | struct GNUNET_RECLAIM_Handle *h, |
1551 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1551 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1552 | const struct GNUNET_RECLAIM_Ticket *ticket, | 1552 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1553 | GNUNET_RECLAIM_AttributeTicketResult cb, | 1553 | GNUNET_RECLAIM_AttributeTicketResult cb, |
1554 | void *cb_cls) | 1554 | void *cb_cls) |
@@ -1564,7 +1564,7 @@ GNUNET_RECLAIM_ticket_consume ( | |||
1564 | op->atr_cb = cb; | 1564 | op->atr_cb = cb; |
1565 | op->cls = cb_cls; | 1565 | op->cls = cb_cls; |
1566 | op->r_id = h->r_id_gen++; | 1566 | op->r_id = h->r_id_gen++; |
1567 | key_len = GNUNET_IDENTITY_private_key_get_length (identity); | 1567 | key_len = GNUNET_CRYPTO_private_key_get_length (identity); |
1568 | tkt_len = GNUNET_RECLAIM_ticket_serialize_get_size (ticket); | 1568 | tkt_len = GNUNET_RECLAIM_ticket_serialize_get_size (ticket); |
1569 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1569 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1570 | op->env = GNUNET_MQ_msg_extra (ctm, | 1570 | op->env = GNUNET_MQ_msg_extra (ctm, |
@@ -1572,7 +1572,7 @@ GNUNET_RECLAIM_ticket_consume ( | |||
1572 | GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET); | 1572 | GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET); |
1573 | ctm->key_len = htons (key_len); | 1573 | ctm->key_len = htons (key_len); |
1574 | buf = (char*) &ctm[1]; | 1574 | buf = (char*) &ctm[1]; |
1575 | GNUNET_IDENTITY_write_private_key_to_buffer (identity, buf, key_len); | 1575 | GNUNET_CRYPTO_write_private_key_to_buffer (identity, buf, key_len); |
1576 | buf += key_len; | 1576 | buf += key_len; |
1577 | ctm->tkt_len = htons (tkt_len); | 1577 | ctm->tkt_len = htons (tkt_len); |
1578 | GNUNET_RECLAIM_write_ticket_to_buffer (ticket, buf, tkt_len); | 1578 | GNUNET_RECLAIM_write_ticket_to_buffer (ticket, buf, tkt_len); |
@@ -1588,7 +1588,7 @@ GNUNET_RECLAIM_ticket_consume ( | |||
1588 | struct GNUNET_RECLAIM_TicketIterator * | 1588 | struct GNUNET_RECLAIM_TicketIterator * |
1589 | GNUNET_RECLAIM_ticket_iteration_start ( | 1589 | GNUNET_RECLAIM_ticket_iteration_start ( |
1590 | struct GNUNET_RECLAIM_Handle *h, | 1590 | struct GNUNET_RECLAIM_Handle *h, |
1591 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1591 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1592 | GNUNET_SCHEDULER_TaskCallback error_cb, | 1592 | GNUNET_SCHEDULER_TaskCallback error_cb, |
1593 | void *error_cb_cls, | 1593 | void *error_cb_cls, |
1594 | GNUNET_RECLAIM_TicketCallback proc, | 1594 | GNUNET_RECLAIM_TicketCallback proc, |
@@ -1613,14 +1613,14 @@ GNUNET_RECLAIM_ticket_iteration_start ( | |||
1613 | it->cls = proc_cls; | 1613 | it->cls = proc_cls; |
1614 | it->r_id = rid; | 1614 | it->r_id = rid; |
1615 | 1615 | ||
1616 | key_len = GNUNET_IDENTITY_private_key_get_length (identity); | 1616 | key_len = GNUNET_CRYPTO_private_key_get_length (identity); |
1617 | GNUNET_CONTAINER_DLL_insert_tail (h->ticket_it_head, h->ticket_it_tail, it); | 1617 | GNUNET_CONTAINER_DLL_insert_tail (h->ticket_it_head, h->ticket_it_tail, it); |
1618 | env = GNUNET_MQ_msg_extra (msg, | 1618 | env = GNUNET_MQ_msg_extra (msg, |
1619 | key_len, | 1619 | key_len, |
1620 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); | 1620 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); |
1621 | msg->id = htonl (rid); | 1621 | msg->id = htonl (rid); |
1622 | msg->key_len = htons (key_len); | 1622 | msg->key_len = htons (key_len); |
1623 | GNUNET_IDENTITY_write_private_key_to_buffer (identity, | 1623 | GNUNET_CRYPTO_write_private_key_to_buffer (identity, |
1624 | &msg[1], | 1624 | &msg[1], |
1625 | key_len); | 1625 | key_len); |
1626 | if (NULL == h->mq) | 1626 | if (NULL == h->mq) |
@@ -1691,7 +1691,7 @@ GNUNET_RECLAIM_ticket_iteration_stop (struct GNUNET_RECLAIM_TicketIterator *it) | |||
1691 | struct GNUNET_RECLAIM_Operation * | 1691 | struct GNUNET_RECLAIM_Operation * |
1692 | GNUNET_RECLAIM_ticket_revoke ( | 1692 | GNUNET_RECLAIM_ticket_revoke ( |
1693 | struct GNUNET_RECLAIM_Handle *h, | 1693 | struct GNUNET_RECLAIM_Handle *h, |
1694 | const struct GNUNET_IDENTITY_PrivateKey *identity, | 1694 | const struct GNUNET_CRYPTO_PrivateKey *identity, |
1695 | const struct GNUNET_RECLAIM_Ticket *ticket, | 1695 | const struct GNUNET_RECLAIM_Ticket *ticket, |
1696 | GNUNET_RECLAIM_ContinuationWithStatus cb, | 1696 | GNUNET_RECLAIM_ContinuationWithStatus cb, |
1697 | void *cb_cls) | 1697 | void *cb_cls) |
@@ -1711,7 +1711,7 @@ GNUNET_RECLAIM_ticket_revoke ( | |||
1711 | op->cls = cb_cls; | 1711 | op->cls = cb_cls; |
1712 | op->r_id = rid; | 1712 | op->r_id = rid; |
1713 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); | 1713 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); |
1714 | key_len = GNUNET_IDENTITY_private_key_get_length (identity); | 1714 | key_len = GNUNET_CRYPTO_private_key_get_length (identity); |
1715 | tkt_len = GNUNET_RECLAIM_ticket_serialize_get_size (ticket); | 1715 | tkt_len = GNUNET_RECLAIM_ticket_serialize_get_size (ticket); |
1716 | op->env = GNUNET_MQ_msg_extra (msg, | 1716 | op->env = GNUNET_MQ_msg_extra (msg, |
1717 | key_len + tkt_len, | 1717 | key_len + tkt_len, |
@@ -1720,7 +1720,7 @@ GNUNET_RECLAIM_ticket_revoke ( | |||
1720 | msg->key_len = htons (key_len); | 1720 | msg->key_len = htons (key_len); |
1721 | msg->tkt_len = htons (tkt_len); | 1721 | msg->tkt_len = htons (tkt_len); |
1722 | buf = (char*) &msg[1]; | 1722 | buf = (char*) &msg[1]; |
1723 | written = GNUNET_IDENTITY_write_private_key_to_buffer (identity, | 1723 | written = GNUNET_CRYPTO_write_private_key_to_buffer (identity, |
1724 | buf, | 1724 | buf, |
1725 | key_len); | 1725 | key_len); |
1726 | GNUNET_assert (0 <= written); | 1726 | GNUNET_assert (0 <= written); |
@@ -1741,8 +1741,8 @@ GNUNET_RECLAIM_ticket_serialize_get_size (const struct | |||
1741 | GNUNET_RECLAIM_Ticket *tkt) | 1741 | GNUNET_RECLAIM_Ticket *tkt) |
1742 | { | 1742 | { |
1743 | size_t size = sizeof (tkt->rnd); | 1743 | size_t size = sizeof (tkt->rnd); |
1744 | size += GNUNET_IDENTITY_public_key_get_length (&tkt->identity); | 1744 | size += GNUNET_CRYPTO_public_key_get_length (&tkt->identity); |
1745 | size += GNUNET_IDENTITY_public_key_get_length (&tkt->audience); | 1745 | size += GNUNET_CRYPTO_public_key_get_length (&tkt->audience); |
1746 | return size; | 1746 | return size; |
1747 | } | 1747 | } |
1748 | 1748 | ||
@@ -1756,7 +1756,7 @@ GNUNET_RECLAIM_read_ticket_from_buffer (const void *buffer, | |||
1756 | size_t read = 0; | 1756 | size_t read = 0; |
1757 | size_t left = len; | 1757 | size_t left = len; |
1758 | if (GNUNET_SYSERR == | 1758 | if (GNUNET_SYSERR == |
1759 | GNUNET_IDENTITY_read_public_key_from_buffer (tmp, | 1759 | GNUNET_CRYPTO_read_public_key_from_buffer (tmp, |
1760 | left, | 1760 | left, |
1761 | &tkt->identity, | 1761 | &tkt->identity, |
1762 | &read)) | 1762 | &read)) |
@@ -1764,7 +1764,7 @@ GNUNET_RECLAIM_read_ticket_from_buffer (const void *buffer, | |||
1764 | left -= read; | 1764 | left -= read; |
1765 | tmp += read; | 1765 | tmp += read; |
1766 | if (GNUNET_SYSERR == | 1766 | if (GNUNET_SYSERR == |
1767 | GNUNET_IDENTITY_read_public_key_from_buffer (tmp, | 1767 | GNUNET_CRYPTO_read_public_key_from_buffer (tmp, |
1768 | left, | 1768 | left, |
1769 | &tkt->audience, | 1769 | &tkt->audience, |
1770 | &read)) | 1770 | &read)) |
@@ -1788,14 +1788,14 @@ GNUNET_RECLAIM_write_ticket_to_buffer (const struct | |||
1788 | char *tmp = buffer; | 1788 | char *tmp = buffer; |
1789 | size_t left = len; | 1789 | size_t left = len; |
1790 | ssize_t written = 0; | 1790 | ssize_t written = 0; |
1791 | written = GNUNET_IDENTITY_write_public_key_to_buffer (&tkt->identity, | 1791 | written = GNUNET_CRYPTO_write_public_key_to_buffer (&tkt->identity, |
1792 | buffer, | 1792 | buffer, |
1793 | left); | 1793 | left); |
1794 | if (0 > written) | 1794 | if (0 > written) |
1795 | return written; | 1795 | return written; |
1796 | left -= written; | 1796 | left -= written; |
1797 | tmp += written; | 1797 | tmp += written; |
1798 | written = GNUNET_IDENTITY_write_public_key_to_buffer (&tkt->audience, | 1798 | written = GNUNET_CRYPTO_write_public_key_to_buffer (&tkt->audience, |
1799 | tmp, | 1799 | tmp, |
1800 | left); | 1800 | left); |
1801 | if (0 > written) | 1801 | if (0 > written) |
diff --git a/src/reclaim/test_did_helper.c b/src/reclaim/test_did_helper.c index 02db28925..c11f47540 100644 --- a/src/reclaim/test_did_helper.c +++ b/src/reclaim/test_did_helper.c | |||
@@ -58,8 +58,8 @@ static const char *test_did_document_format_str = | |||
58 | \"authentication\":[\"#key-1\"],\ | 58 | \"authentication\":[\"#key-1\"],\ |
59 | \"assertionMethod\":[\"#key-1\"]}"; | 59 | \"assertionMethod\":[\"#key-1\"]}"; |
60 | 60 | ||
61 | static struct GNUNET_IDENTITY_PrivateKey test_skey; | 61 | static struct GNUNET_CRYPTO_PrivateKey test_skey; |
62 | static struct GNUNET_IDENTITY_PublicKey test_pkey; | 62 | static struct GNUNET_CRYPTO_PublicKey test_pkey; |
63 | static struct json_t *test_did_document; | 63 | static struct json_t *test_did_document; |
64 | static char *test_did_document_str; | 64 | static char *test_did_document_str; |
65 | 65 | ||
@@ -75,7 +75,7 @@ test_GNUNET_DID_pkey_to_did () | |||
75 | void | 75 | void |
76 | test_GNUNET_DID_did_to_pkey () | 76 | test_GNUNET_DID_did_to_pkey () |
77 | { | 77 | { |
78 | struct GNUNET_IDENTITY_PublicKey pkey; | 78 | struct GNUNET_CRYPTO_PublicKey pkey; |
79 | DID_did_to_pkey ((char *) test_did, &pkey); | 79 | DID_did_to_pkey ((char *) test_did, &pkey); |
80 | 80 | ||
81 | GNUNET_assert (test_pkey.type = pkey.type); | 81 | GNUNET_assert (test_pkey.type = pkey.type); |
@@ -112,11 +112,11 @@ int | |||
112 | main () | 112 | main () |
113 | { | 113 | { |
114 | // Setup key | 114 | // Setup key |
115 | test_skey.type = htonl (GNUNET_IDENTITY_TYPE_EDDSA); | 115 | test_skey.type = htonl (GNUNET_PUBLIC_KEY_TYPE_EDDSA); |
116 | memcpy (&(test_skey.eddsa_key), | 116 | memcpy (&(test_skey.eddsa_key), |
117 | test_skey_bytes, | 117 | test_skey_bytes, |
118 | sizeof(struct GNUNET_CRYPTO_EddsaPrivateKey)); | 118 | sizeof(struct GNUNET_CRYPTO_EddsaPrivateKey)); |
119 | GNUNET_IDENTITY_key_get_public (&test_skey, &test_pkey); | 119 | GNUNET_CRYPTO_key_get_public (&test_skey, &test_pkey); |
120 | 120 | ||
121 | // Setup did document | 121 | // Setup did document |
122 | GNUNET_asprintf (&test_did_document_str, | 122 | GNUNET_asprintf (&test_did_document_str, |