aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r--src/reclaim/oidc_helper.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 1dde7b673..40cc5751e 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -256,6 +256,18 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key,
256 int j = 0; 256 int j = 0;
257 for (ple = presentations->list_head; NULL != ple; ple = ple->next) 257 for (ple = presentations->list_head; NULL != ple; ple = ple->next)
258 { 258 {
259 char *tmp;
260 tmp = GNUNET_STRINGS_data_to_string_alloc (&le->attribute->credential,
261 sizeof (le->attribute->credential));
262 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
263 "Checking : %s\n", tmp);
264 GNUNET_free (tmp);
265
266 tmp = GNUNET_STRINGS_data_to_string_alloc (&ple->presentation->credential_id,
267 sizeof (ple->presentation->credential_id));
268 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
269 " against: %s\n", tmp);
270 GNUNET_free (tmp);
259 if (GNUNET_YES == 271 if (GNUNET_YES ==
260 GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id, 272 GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id,
261 &le->attribute->credential)) 273 &le->attribute->credential))
@@ -498,6 +510,9 @@ OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer,
498 if (NULL != presentations) 510 if (NULL != presentations)
499 { 511 {
500 // Get length 512 // Get length
513 // FIXME only add presentations relevant for attribute list!!!
514 // This is important because of the distinction between id_token and
515 // userinfo in OIDC
501 pres_list_len = 516 pres_list_len =
502 GNUNET_RECLAIM_presentation_list_serialize_get_size (presentations); 517 GNUNET_RECLAIM_presentation_list_serialize_get_size (presentations);
503 params.pres_list_len = htonl (pres_list_len); 518 params.pres_list_len = htonl (pres_list_len);
@@ -524,8 +539,10 @@ OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer,
524 } 539 }
525 if (0 < attr_list_len) 540 if (0 < attr_list_len)
526 GNUNET_RECLAIM_attribute_list_serialize (attrs, tmp); 541 GNUNET_RECLAIM_attribute_list_serialize (attrs, tmp);
542 tmp += attr_list_len;
527 if (0 < pres_list_len) 543 if (0 < pres_list_len)
528 GNUNET_RECLAIM_presentation_list_serialize (presentations, tmp); 544 GNUNET_RECLAIM_presentation_list_serialize (presentations, tmp);
545 tmp += pres_list_len;
529 546
530 /** END **/ 547 /** END **/
531 548