aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-25 08:32:47 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-25 08:32:47 +0100
commitdebba1a49a46ba963553da222ade563d6d67932b (patch)
treebd9ffe21e85179944826731898b5b7cee41f8e60 /src/reclaim/oidc_helper.c
parentf13c54ac597671c2e6a72ac7708812c94b05d59c (diff)
parent4a280820ca3ac316e38a62396c4abba7df105063 (diff)
downloadgnunet-debba1a49a46ba963553da222ade563d6d67932b.tar.gz
gnunet-debba1a49a46ba963553da222ade563d6d67932b.zip
Merge branch 'master' of git+ssh://gnunet.org/gnunet
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 33db26a7c..a90d02d68 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