aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-26 20:25:37 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-26 20:25:37 +0200
commitaa78134a557079ce570345e751e4c36c4b2ba79a (patch)
treef7bf25950513285184e2426109235337d0aef8be /src/reclaim
parent1f2674fe293be7c1a852fbe4a7241fbcb149078f (diff)
downloadgnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.tar.gz
gnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.zip
-fix many more typos
Diffstat (limited to 'src/reclaim')
-rw-r--r--src/reclaim/gnunet-service-reclaim.c2
-rw-r--r--src/reclaim/gnunet-service-reclaim_tickets.c45
-rw-r--r--src/reclaim/oidc_helper.c4
-rw-r--r--src/reclaim/plugin_reclaim_credential_jwt.c34
-rw-r--r--src/reclaim/plugin_reclaim_credential_pabc.c11
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c31
-rw-r--r--src/reclaim/plugin_rest_pabc.c2
-rw-r--r--src/reclaim/plugin_rest_reclaim.c4
-rw-r--r--src/reclaim/reclaim_api.c11
-rw-r--r--src/reclaim/reclaim_credential.c15
10 files changed, 84 insertions, 75 deletions
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c
index 04c12735b..105187c26 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -1824,7 +1824,7 @@ handle_credential_delete_message (void *cls,
1824 1824
1825 1825
1826/************************************************* 1826/*************************************************
1827 * Attrubute iteration 1827 * Attribute iteration
1828 *************************************************/ 1828 *************************************************/
1829 1829
1830 1830
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c
index 48b3fe214..5d3119c6f 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.c
+++ b/src/reclaim/gnunet-service-reclaim_tickets.c
@@ -29,7 +29,7 @@
29 29
30 30
31/** 31/**
32 * FIXME: the defaul ticket iteration interval should probably 32 * FIXME: the default ticket iteration interval should probably
33 * be the minimim attribute expiration. 33 * be the minimim attribute expiration.
34 */ 34 */
35#define DEFAULT_TICKET_REFRESH_INTERVAL GNUNET_TIME_UNIT_HOURS 35#define DEFAULT_TICKET_REFRESH_INTERVAL GNUNET_TIME_UNIT_HOURS
@@ -129,7 +129,7 @@ struct RECLAIM_TICKETS_ConsumeHandle
129 RECLAIM_TICKETS_ConsumeCallback cb; 129 RECLAIM_TICKETS_ConsumeCallback cb;
130 130
131 /** 131 /**
132 * Callbacl closure 132 * Callback closure
133 */ 133 */
134 void *cb_cls; 134 void *cb_cls;
135}; 135};
@@ -1319,31 +1319,32 @@ issue_ticket (struct TicketIssueHandle *ih)
1319 { 1319 {
1320 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1320 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1321 "Attribute is backed by credential. Adding...\n"); 1321 "Attribute is backed by credential. Adding...\n");
1322 struct GNUNET_RECLAIM_Presentation *pres = NULL; 1322 struct GNUNET_RECLAIM_Presentation *presentation = NULL;
1323 for (j = 0; j < i; j++) 1323 for (j = 0; j < i; j++)
1324 { 1324 {
1325 if (attrs_record[j].record_type 1325 if (attrs_record[j].record_type
1326 != GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION) 1326 != GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION)
1327 continue; 1327 continue;
1328 pres = GNUNET_RECLAIM_presentation_deserialize (attrs_record[j].data, 1328 presentation = GNUNET_RECLAIM_presentation_deserialize (
1329 attrs_record[j]. 1329 attrs_record[j].data,
1330 data_size); 1330 attrs_record[j].
1331 if (NULL == pres) 1331 data_size);
1332 if (NULL == presentation)
1332 { 1333 {
1333 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1334 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1334 "Failed to deserialize presentation\n"); 1335 "Failed to deserialize presentation\n");
1335 continue; 1336 continue;
1336 } 1337 }
1337 if (0 == memcmp (&pres->credential_id, 1338 if (0 == memcmp (&presentation->credential_id,
1338 &le->attribute->credential, 1339 &le->attribute->credential,
1339 sizeof (le->attribute->credential))) 1340 sizeof (le->attribute->credential)))
1340 break; 1341 break;
1341 GNUNET_free (pres); 1342 GNUNET_free (presentation);
1342 pres = NULL; 1343 presentation = NULL;
1343 } 1344 }
1344 if (NULL != pres) 1345 if (NULL != presentation)
1345 { 1346 {
1346 GNUNET_free (pres); 1347 GNUNET_free (presentation);
1347 continue; // Skip as we have already added this credential presentation. 1348 continue; // Skip as we have already added this credential presentation.
1348 } 1349 }
1349 for (ple = ih->presentations->list_head; NULL != ple; ple = ple->next) 1350 for (ple = ih->presentations->list_head; NULL != ple; ple = ple->next)
@@ -1361,6 +1362,7 @@ issue_ticket (struct TicketIssueHandle *ih)
1361 } 1362 }
1362 char *pres_buf; 1363 char *pres_buf;
1363 size_t pres_size; 1364 size_t pres_size;
1365
1364 pres_size = 1366 pres_size =
1365 GNUNET_RECLAIM_presentation_serialize_get_size (ple->presentation); 1367 GNUNET_RECLAIM_presentation_serialize_get_size (ple->presentation);
1366 pres_buf = GNUNET_malloc (pres_size); 1368 pres_buf = GNUNET_malloc (pres_size);
@@ -1457,7 +1459,7 @@ filter_tickets_cb (void *cls,
1457{ 1459{
1458 struct TicketIssueHandle *tih = cls; 1460 struct TicketIssueHandle *tih = cls;
1459 struct GNUNET_RECLAIM_Ticket *ticket = NULL; 1461 struct GNUNET_RECLAIM_Ticket *ticket = NULL;
1460 struct GNUNET_RECLAIM_Presentation *pres; 1462 struct GNUNET_RECLAIM_Presentation *presentation;
1461 struct GNUNET_RECLAIM_PresentationList *ticket_presentations; 1463 struct GNUNET_RECLAIM_PresentationList *ticket_presentations;
1462 struct GNUNET_RECLAIM_Credential *cred; 1464 struct GNUNET_RECLAIM_Credential *cred;
1463 struct GNUNET_RECLAIM_PresentationListEntry *ple; 1465 struct GNUNET_RECLAIM_PresentationListEntry *ple;
@@ -1526,7 +1528,7 @@ filter_tickets_cb (void *cls,
1526 if (GNUNET_OK != GNUNET_RECLAIM_credential_get_presentation ( 1528 if (GNUNET_OK != GNUNET_RECLAIM_credential_get_presentation (
1527 cred, 1529 cred,
1528 tih->attrs, 1530 tih->attrs,
1529 &pres)) 1531 &presentation))
1530 { 1532 {
1531 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1533 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1532 "Unable to retrieve presentation from credential\n"); 1534 "Unable to retrieve presentation from credential\n");
@@ -1534,7 +1536,7 @@ filter_tickets_cb (void *cls,
1534 continue; 1536 continue;
1535 } 1537 }
1536 ple = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry); 1538 ple = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry);
1537 ple->presentation = pres; 1539 ple->presentation = presentation;
1538 GNUNET_CONTAINER_DLL_insert (tih->presentations->list_head, 1540 GNUNET_CONTAINER_DLL_insert (tih->presentations->list_head,
1539 tih->presentations->list_tail, 1541 tih->presentations->list_tail,
1540 ple); 1542 ple);
@@ -1546,20 +1548,21 @@ filter_tickets_cb (void *cls,
1546 { 1548 {
1547 for (le = tih->attrs->list_head; NULL != le; le = le->next) 1549 for (le = tih->attrs->list_head; NULL != le; le = le->next)
1548 { 1550 {
1549 pres = GNUNET_RECLAIM_presentation_deserialize (rd[i].data, 1551 presentation = GNUNET_RECLAIM_presentation_deserialize (rd[i].data,
1550 rd[i].data_size); 1552 rd[i].data_size);
1551 if (NULL == pres) 1553 if (NULL == presentation)
1552 { 1554 {
1553 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1555 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1554 "Failed to deserialize presentation\n"); 1556 "Failed to deserialize presentation\n");
1555 continue; 1557 continue;
1556 } 1558 }
1557 if (GNUNET_YES == GNUNET_RECLAIM_id_is_equal (&pres->credential_id, 1559 if (GNUNET_YES == GNUNET_RECLAIM_id_is_equal (
1558 &le->attribute->credential)) 1560 &presentation->credential_id,
1561 &le->attribute->credential))
1559 { 1562 {
1560 found_pres_cnt++; 1563 found_pres_cnt++;
1561 ple = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry); 1564 ple = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry);
1562 ple->presentation = pres; 1565 ple->presentation = presentation;
1563 GNUNET_CONTAINER_DLL_insert (ticket_presentations->list_head, 1566 GNUNET_CONTAINER_DLL_insert (ticket_presentations->list_head,
1564 ticket_presentations->list_tail, 1567 ticket_presentations->list_tail,
1565 ple); 1568 ple);
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 7b24ee598..9237902ce 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -237,7 +237,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key,
237 le->attribute->data, 237 le->attribute->data,
238 le->attribute->data_size); 238 le->attribute->data_size);
239 /** 239 /**
240 * There is this wierd quirk that the individual address claim(s) must be 240 * There is this weird quirk that the individual address claim(s) must be
241 * inside a JSON object of the "address" claim. 241 * inside a JSON object of the "address" claim.
242 */ 242 */
243 if (GNUNET_YES == is_claim_in_address_scope (le->attribute->name)) 243 if (GNUNET_YES == is_claim_in_address_scope (le->attribute->name))
@@ -287,7 +287,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key,
287 continue; 287 continue;
288 } 288 }
289 /** 289 /**
290 * There is this wierd quirk that the individual address claim(s) must be 290 * There is this weird quirk that the individual address claim(s) must be
291 * inside a JSON object of the "address" claim. 291 * inside a JSON object of the "address" claim.
292 */ 292 */
293 if (GNUNET_YES == is_claim_in_address_scope (le->attribute->name)) 293 if (GNUNET_YES == is_claim_in_address_scope (le->attribute->name))
diff --git a/src/reclaim/plugin_reclaim_credential_jwt.c b/src/reclaim/plugin_reclaim_credential_jwt.c
index fb01903aa..5d5e221f9 100644
--- a/src/reclaim/plugin_reclaim_credential_jwt.c
+++ b/src/reclaim/plugin_reclaim_credential_jwt.c
@@ -194,7 +194,8 @@ jwt_parse_attributes (void *cls,
194 continue; 194 continue;
195 if (0 == strcmp ("address", key)) 195 if (0 == strcmp ("address", key))
196 { 196 {
197 if (!json_is_object(value)) { 197 if (! json_is_object (value))
198 {
198 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 199 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
199 "address claim in wrong format!"); 200 "address claim in wrong format!");
200 continue; 201 continue;
@@ -202,12 +203,12 @@ jwt_parse_attributes (void *cls,
202 json_object_foreach (value, addr_key, addr_value) { 203 json_object_foreach (value, addr_key, addr_value) {
203 val_str = json_dumps (addr_value, JSON_ENCODE_ANY); 204 val_str = json_dumps (addr_value, JSON_ENCODE_ANY);
204 tmp = val_str; 205 tmp = val_str;
205 //Remove leading " from jasson conversion 206 // Remove leading " from jasson conversion
206 if (tmp[0] == '"') 207 if (tmp[0] == '"')
207 tmp++; 208 tmp++;
208 //Remove trailing " from jansson conversion 209 // Remove trailing " from jansson conversion
209 if (tmp[strlen(tmp)-1] == '"') 210 if (tmp[strlen (tmp) - 1] == '"')
210 tmp[strlen(tmp)-1] = '\0'; 211 tmp[strlen (tmp) - 1] = '\0';
211 GNUNET_RECLAIM_attribute_list_add (attrs, 212 GNUNET_RECLAIM_attribute_list_add (attrs,
212 addr_key, 213 addr_key,
213 NULL, 214 NULL,
@@ -220,12 +221,12 @@ jwt_parse_attributes (void *cls,
220 } 221 }
221 val_str = json_dumps (value, JSON_ENCODE_ANY); 222 val_str = json_dumps (value, JSON_ENCODE_ANY);
222 tmp = val_str; 223 tmp = val_str;
223 //Remove leading " from jasson conversion 224 // Remove leading " from jasson conversion
224 if (tmp[0] == '"') 225 if (tmp[0] == '"')
225 tmp++; 226 tmp++;
226 //Remove trailing " from jansson conversion 227 // Remove trailing " from jansson conversion
227 if (tmp[strlen(tmp)-1] == '"') 228 if (tmp[strlen (tmp) - 1] == '"')
228 tmp[strlen(tmp)-1] = '\0'; 229 tmp[strlen (tmp) - 1] = '\0';
229 GNUNET_RECLAIM_attribute_list_add (attrs, 230 GNUNET_RECLAIM_attribute_list_add (attrs,
230 key, 231 key,
231 NULL, 232 NULL,
@@ -307,7 +308,8 @@ jwt_get_issuer (void *cls,
307 if (NULL == json_val) 308 if (NULL == json_val)
308 return NULL; 309 return NULL;
309 issuer_json = json_object_get (json_val, "iss"); 310 issuer_json = json_object_get (json_val, "iss");
310 if ((NULL == issuer_json) || (! json_is_string (issuer_json))) { 311 if ((NULL == issuer_json) || (! json_is_string (issuer_json)))
312 {
311 json_decref (json_val); 313 json_decref (json_val);
312 return NULL; 314 return NULL;
313 } 315 }
@@ -384,7 +386,8 @@ jwt_get_expiration (void *cls,
384 if (NULL == json_val) 386 if (NULL == json_val)
385 return GNUNET_SYSERR; 387 return GNUNET_SYSERR;
386 exp_json = json_object_get (json_val, "exp"); 388 exp_json = json_object_get (json_val, "exp");
387 if ((NULL == exp_json) || (! json_is_integer (exp_json))) { 389 if ((NULL == exp_json) || (! json_is_integer (exp_json)))
390 {
388 json_decref (json_val); 391 json_decref (json_val);
389 return GNUNET_SYSERR; 392 return GNUNET_SYSERR;
390 } 393 }
@@ -434,13 +437,14 @@ enum GNUNET_GenericReturnValue
434jwt_create_presentation (void *cls, 437jwt_create_presentation (void *cls,
435 const struct GNUNET_RECLAIM_Credential *cred, 438 const struct GNUNET_RECLAIM_Credential *cred,
436 const struct GNUNET_RECLAIM_AttributeList *attrs, 439 const struct GNUNET_RECLAIM_AttributeList *attrs,
437 struct GNUNET_RECLAIM_Presentation **pres) 440 struct GNUNET_RECLAIM_Presentation **presentation)
438{ 441{
439 if (GNUNET_RECLAIM_CREDENTIAL_TYPE_JWT != cred->type) 442 if (GNUNET_RECLAIM_CREDENTIAL_TYPE_JWT != cred->type)
440 return GNUNET_NO; 443 return GNUNET_NO;
441 *pres = GNUNET_RECLAIM_presentation_new (GNUNET_RECLAIM_CREDENTIAL_TYPE_JWT, 444 *presentation = GNUNET_RECLAIM_presentation_new (
442 cred->data, 445 GNUNET_RECLAIM_CREDENTIAL_TYPE_JWT,
443 cred->data_size); 446 cred->data,
447 cred->data_size);
444 return GNUNET_OK; 448 return GNUNET_OK;
445} 449}
446 450
diff --git a/src/reclaim/plugin_reclaim_credential_pabc.c b/src/reclaim/plugin_reclaim_credential_pabc.c
index 89acd9032..a906805fb 100644
--- a/src/reclaim/plugin_reclaim_credential_pabc.c
+++ b/src/reclaim/plugin_reclaim_credential_pabc.c
@@ -154,7 +154,7 @@ inspect_attrs (char const *const key,
154 if (NULL == value) 154 if (NULL == value)
155 return; 155 return;
156 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 156 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
157 "Found attribue in PABC credential: `%s': `%s'\n", 157 "Found attribute in PABC credential: `%s': `%s'\n",
158 key, value); 158 key, value);
159 if (0 == strcmp (key, "expiration")) 159 if (0 == strcmp (key, "expiration"))
160 return; 160 return;
@@ -362,7 +362,7 @@ int
362pabc_create_presentation (void *cls, 362pabc_create_presentation (void *cls,
363 const struct GNUNET_RECLAIM_Credential *credential, 363 const struct GNUNET_RECLAIM_Credential *credential,
364 const struct GNUNET_RECLAIM_AttributeList *attrs, 364 const struct GNUNET_RECLAIM_AttributeList *attrs,
365 struct GNUNET_RECLAIM_Presentation **pres) 365 struct GNUNET_RECLAIM_Presentation **presentation)
366{ 366{
367 struct pabc_context *ctx = NULL; 367 struct pabc_context *ctx = NULL;
368 struct pabc_user_context *usr_ctx = NULL; 368 struct pabc_user_context *usr_ctx = NULL;
@@ -508,9 +508,10 @@ pabc_create_presentation (void *cls,
508 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 508 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
509 "Presentation: %s\n", json_enc); 509 "Presentation: %s\n", json_enc);
510 // clean up 510 // clean up
511 *pres = GNUNET_RECLAIM_presentation_new (GNUNET_RECLAIM_CREDENTIAL_TYPE_PABC, 511 *presentation = GNUNET_RECLAIM_presentation_new (
512 json_enc, 512 GNUNET_RECLAIM_CREDENTIAL_TYPE_PABC,
513 strlen (json_enc) + 1); 513 json_enc,
514 strlen (json_enc) + 1);
514 GNUNET_free (json_enc); 515 GNUNET_free (json_enc);
515 PABC_FREE_NULL (json); 516 PABC_FREE_NULL (json);
516 pabc_free_proof (ctx, pp, &proof); 517 pabc_free_proof (ctx, pp, &proof);
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index fef79fb10..88b928526 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -551,7 +551,7 @@ struct RequestHandle
551 char *edesc; 551 char *edesc;
552 552
553 /** 553 /**
554 * Reponse code 554 * Response code
555 */ 555 */
556 int response_code; 556 int response_code;
557 557
@@ -974,7 +974,8 @@ oidc_iteration_error (void *cls)
974static void 974static void
975oidc_ticket_issue_cb (void *cls, 975oidc_ticket_issue_cb (void *cls,
976 const struct GNUNET_RECLAIM_Ticket *ticket, 976 const struct GNUNET_RECLAIM_Ticket *ticket,
977 const struct GNUNET_RECLAIM_PresentationList *pres) 977 const struct
978 GNUNET_RECLAIM_PresentationList *presentation)
978{ 979{
979 struct RequestHandle *handle = cls; 980 struct RequestHandle *handle = cls;
980 struct MHD_Response *resp; 981 struct MHD_Response *resp;
@@ -997,7 +998,7 @@ oidc_ticket_issue_cb (void *cls,
997 code_string = OIDC_build_authz_code (&handle->priv_key, 998 code_string = OIDC_build_authz_code (&handle->priv_key,
998 &handle->ticket, 999 &handle->ticket,
999 handle->attr_idtoken_list, 1000 handle->attr_idtoken_list,
1000 pres, 1001 presentation,
1001 handle->oidc->nonce, 1002 handle->oidc->nonce,
1002 handle->oidc->code_challenge); 1003 handle->oidc->code_challenge);
1003 if ((NULL != handle->redirect_prefix) && (NULL != handle->redirect_suffix) && 1004 if ((NULL != handle->redirect_prefix) && (NULL != handle->redirect_suffix) &&
@@ -1103,7 +1104,7 @@ oidc_cred_collect_finished_cb (void *cls)
1103 handle->attr_userinfo_list); 1104 handle->attr_userinfo_list);
1104 for (le_m = merged_list->list_head; NULL != le_m; le_m = le_m->next) 1105 for (le_m = merged_list->list_head; NULL != le_m; le_m = le_m->next)
1105 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1106 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1106 "List Attibute in ticket to issue: %s\n", 1107 "List Attribute in ticket to issue: %s\n",
1107 le_m->attribute->name); 1108 le_m->attribute->name);
1108 handle->idp_op = GNUNET_RECLAIM_ticket_issue (idp, 1109 handle->idp_op = GNUNET_RECLAIM_ticket_issue (idp,
1109 &handle->priv_key, 1110 &handle->priv_key,
@@ -1387,7 +1388,8 @@ build_redirect (void *cls)
1387 } 1388 }
1388 resp = GNUNET_REST_create_response (""); 1389 resp = GNUNET_REST_create_response ("");
1389 GNUNET_assert (MHD_NO != MHD_add_response_header (resp, 1390 GNUNET_assert (MHD_NO != MHD_add_response_header (resp,
1390 "Location", redirect_uri)); 1391 "Location",
1392 redirect_uri));
1391 handle->proc (handle->proc_cls, resp, MHD_HTTP_FOUND); 1393 handle->proc (handle->proc_cls, resp, MHD_HTTP_FOUND);
1392 cleanup_handle (handle); 1394 cleanup_handle (handle);
1393 GNUNET_free (redirect_uri); 1395 GNUNET_free (redirect_uri);
@@ -2192,7 +2194,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2192 &cache_key, 2194 &cache_key,
2193 code, 2195 code,
2194 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE); 2196 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE);
2195 /* If there was a previus code in there, free the old value */ 2197 /* If there was a previous code in there, free the old value */
2196 if (NULL != tmp_at) 2198 if (NULL != tmp_at)
2197 { 2199 {
2198 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2200 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2231,7 +2233,7 @@ static void
2231consume_ticket (void *cls, 2233consume_ticket (void *cls,
2232 const struct GNUNET_IDENTITY_PublicKey *identity, 2234 const struct GNUNET_IDENTITY_PublicKey *identity,
2233 const struct GNUNET_RECLAIM_Attribute *attr, 2235 const struct GNUNET_RECLAIM_Attribute *attr,
2234 const struct GNUNET_RECLAIM_Presentation *pres) 2236 const struct GNUNET_RECLAIM_Presentation *presentation)
2235{ 2237{
2236 struct RequestHandle *handle = cls; 2238 struct RequestHandle *handle = cls;
2237 struct GNUNET_RECLAIM_AttributeListEntry *ale; 2239 struct GNUNET_RECLAIM_AttributeListEntry *ale;
@@ -2268,14 +2270,14 @@ consume_ticket (void *cls,
2268 GNUNET_CONTAINER_DLL_insert (handle->attr_userinfo_list->list_head, 2270 GNUNET_CONTAINER_DLL_insert (handle->attr_userinfo_list->list_head,
2269 handle->attr_userinfo_list->list_tail, 2271 handle->attr_userinfo_list->list_tail,
2270 ale); 2272 ale);
2271 if (NULL == pres) 2273 if (NULL == presentation)
2272 return; 2274 return;
2273 for (atle = handle->presentations->list_head; 2275 for (atle = handle->presentations->list_head;
2274 NULL != atle; atle = atle->next) 2276 NULL != atle; atle = atle->next)
2275 { 2277 {
2276 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal ( 2278 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (
2277 &atle->presentation->credential_id, 2279 &atle->presentation->credential_id,
2278 &pres->credential_id)) 2280 &presentation->credential_id))
2279 continue; 2281 continue;
2280 break; /** already in list **/ 2282 break; /** already in list **/
2281 } 2283 }
@@ -2283,10 +2285,11 @@ consume_ticket (void *cls,
2283 { 2285 {
2284 /** Credential matches for attribute, add **/ 2286 /** Credential matches for attribute, add **/
2285 atle = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry); 2287 atle = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry);
2286 atle->presentation = GNUNET_RECLAIM_presentation_new (pres->type, 2288 atle->presentation = GNUNET_RECLAIM_presentation_new (presentation->type,
2287 pres->data, 2289 presentation->data,
2288 pres->data_size); 2290 presentation->
2289 atle->presentation->credential_id = pres->credential_id; 2291 data_size);
2292 atle->presentation->credential_id = presentation->credential_id;
2290 GNUNET_CONTAINER_DLL_insert (handle->presentations->list_head, 2293 GNUNET_CONTAINER_DLL_insert (handle->presentations->list_head,
2291 handle->presentations->list_tail, 2294 handle->presentations->list_tail,
2292 atle); 2295 atle);
@@ -2643,7 +2646,7 @@ oidc_config_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2643 response_types); 2646 response_types);
2644 sub_types = json_array (); 2647 sub_types = json_array ();
2645 json_array_append_new (sub_types, 2648 json_array_append_new (sub_types,
2646 json_string ("public")); /* no pairwise suppport */ 2649 json_string ("public")); /* no pairwise support */
2647 json_object_set_new (oidc_config, 2650 json_object_set_new (oidc_config,
2648 "subject_types_supported", 2651 "subject_types_supported",
2649 sub_types); 2652 sub_types);
diff --git a/src/reclaim/plugin_rest_pabc.c b/src/reclaim/plugin_rest_pabc.c
index 6603fb888..a0551f215 100644
--- a/src/reclaim/plugin_rest_pabc.c
+++ b/src/reclaim/plugin_rest_pabc.c
@@ -112,7 +112,7 @@ struct RequestHandle
112 char *emsg; 112 char *emsg;
113 113
114 /** 114 /**
115 * Reponse code 115 * Response code
116 */ 116 */
117 int response_code; 117 int response_code;
118 118
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c
index 1d1231cbd..80d6ca976 100644
--- a/src/reclaim/plugin_rest_reclaim.c
+++ b/src/reclaim/plugin_rest_reclaim.c
@@ -245,7 +245,7 @@ struct RequestHandle
245 char *emsg; 245 char *emsg;
246 246
247 /** 247 /**
248 * Reponse code 248 * Response code
249 */ 249 */
250 int response_code; 250 int response_code;
251 251
@@ -1200,7 +1200,7 @@ static void
1200consume_cont (void *cls, 1200consume_cont (void *cls,
1201 const struct GNUNET_IDENTITY_PublicKey *identity, 1201 const struct GNUNET_IDENTITY_PublicKey *identity,
1202 const struct GNUNET_RECLAIM_Attribute *attr, 1202 const struct GNUNET_RECLAIM_Attribute *attr,
1203 const struct GNUNET_RECLAIM_Presentation *pres) 1203 const struct GNUNET_RECLAIM_Presentation *presentation)
1204{ 1204{
1205 struct RequestHandle *handle = cls; 1205 struct RequestHandle *handle = cls;
1206 char *val_str; 1206 char *val_str;
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c
index c08cc868c..f41473f9f 100644
--- a/src/reclaim/reclaim_api.c
+++ b/src/reclaim/reclaim_api.c
@@ -907,7 +907,7 @@ handle_ticket_result (void *cls, const struct TicketResultMessage *msg)
907 struct GNUNET_RECLAIM_Handle *handle = cls; 907 struct GNUNET_RECLAIM_Handle *handle = cls;
908 struct GNUNET_RECLAIM_Operation *op; 908 struct GNUNET_RECLAIM_Operation *op;
909 struct GNUNET_RECLAIM_TicketIterator *it; 909 struct GNUNET_RECLAIM_TicketIterator *it;
910 struct GNUNET_RECLAIM_PresentationList *pres; 910 struct GNUNET_RECLAIM_PresentationList *presentation;
911 uint32_t r_id = ntohl (msg->id); 911 uint32_t r_id = ntohl (msg->id);
912 static const struct GNUNET_RECLAIM_Ticket ticket; 912 static const struct GNUNET_RECLAIM_Ticket ticket;
913 uint32_t pres_len = ntohs (msg->presentations_len); 913 uint32_t pres_len = ntohs (msg->presentations_len);
@@ -923,8 +923,9 @@ handle_ticket_result (void *cls, const struct TicketResultMessage *msg)
923 if (NULL != op) 923 if (NULL != op)
924 { 924 {
925 if (0 < pres_len) 925 if (0 < pres_len)
926 pres = GNUNET_RECLAIM_presentation_list_deserialize ((char*) &msg[1], 926 presentation = GNUNET_RECLAIM_presentation_list_deserialize (
927 pres_len); 927 (char*) &msg[1],
928 pres_len);
928 GNUNET_CONTAINER_DLL_remove (handle->op_head, handle->op_tail, op); 929 GNUNET_CONTAINER_DLL_remove (handle->op_head, handle->op_tail, op);
929 if (0 == 930 if (0 ==
930 memcmp (&msg->ticket, &ticket, sizeof(struct GNUNET_RECLAIM_Ticket))) 931 memcmp (&msg->ticket, &ticket, sizeof(struct GNUNET_RECLAIM_Ticket)))
@@ -937,10 +938,10 @@ handle_ticket_result (void *cls, const struct TicketResultMessage *msg)
937 if (NULL != op->ti_cb) 938 if (NULL != op->ti_cb)
938 op->ti_cb (op->cls, 939 op->ti_cb (op->cls,
939 &msg->ticket, 940 &msg->ticket,
940 (0 < pres_len) ? pres : NULL); 941 (0 < pres_len) ? presentation : NULL);
941 } 942 }
942 if (0 < pres_len) 943 if (0 < pres_len)
943 GNUNET_RECLAIM_presentation_list_destroy (pres); 944 GNUNET_RECLAIM_presentation_list_destroy (presentation);
944 free_op (op); 945 free_op (op);
945 return; 946 return;
946 } 947 }
diff --git a/src/reclaim/reclaim_credential.c b/src/reclaim/reclaim_credential.c
index da5cee988..b4aeedf29 100644
--- a/src/reclaim/reclaim_credential.c
+++ b/src/reclaim/reclaim_credential.c
@@ -135,7 +135,6 @@ RECLAIM_CREDENTIAL_fini ()
135} 135}
136 136
137 137
138
139/** 138/**
140 * Convert an credential type name to the corresponding number 139 * Convert an credential type name to the corresponding number
141 * 140 *
@@ -1030,6 +1029,7 @@ GNUNET_RECLAIM_presentation_get_expiration (const struct
1030 return GNUNET_SYSERR; 1029 return GNUNET_SYSERR;
1031} 1030}
1032 1031
1032
1033/** 1033/**
1034 * Create a presentation from a credential and a lift of (selected) 1034 * Create a presentation from a credential and a lift of (selected)
1035 * attributes in the credential. 1035 * attributes in the credential.
@@ -1042,9 +1042,9 @@ GNUNET_RECLAIM_presentation_get_expiration (const struct
1042 */ 1042 */
1043int 1043int
1044GNUNET_RECLAIM_credential_get_presentation ( 1044GNUNET_RECLAIM_credential_get_presentation (
1045 const struct GNUNET_RECLAIM_Credential *cred, 1045 const struct GNUNET_RECLAIM_Credential *cred,
1046 const struct GNUNET_RECLAIM_AttributeList *attrs, 1046 const struct GNUNET_RECLAIM_AttributeList *attrs,
1047 struct GNUNET_RECLAIM_Presentation **pres) 1047 struct GNUNET_RECLAIM_Presentation **presentation)
1048{ 1048{
1049 unsigned int i; 1049 unsigned int i;
1050 struct Plugin *plugin; 1050 struct Plugin *plugin;
@@ -1055,13 +1055,10 @@ GNUNET_RECLAIM_credential_get_presentation (
1055 if (GNUNET_OK != plugin->api->create_presentation (plugin->api->cls, 1055 if (GNUNET_OK != plugin->api->create_presentation (plugin->api->cls,
1056 cred, 1056 cred,
1057 attrs, 1057 attrs,
1058 pres)) 1058 presentation))
1059 continue; 1059 continue;
1060 (*pres)->credential_id = cred->id; 1060 (*presentation)->credential_id = cred->id;
1061 return GNUNET_OK; 1061 return GNUNET_OK;
1062 } 1062 }
1063 return GNUNET_SYSERR; 1063 return GNUNET_SYSERR;
1064} 1064}
1065
1066
1067