diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-12-25 08:32:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-12-25 08:32:47 +0100 |
commit | debba1a49a46ba963553da222ade563d6d67932b (patch) | |
tree | bd9ffe21e85179944826731898b5b7cee41f8e60 | |
parent | f13c54ac597671c2e6a72ac7708812c94b05d59c (diff) | |
parent | 4a280820ca3ac316e38a62396c4abba7df105063 (diff) | |
download | gnunet-debba1a49a46ba963553da222ade563d6d67932b.tar.gz gnunet-debba1a49a46ba963553da222ade563d6d67932b.zip |
Merge branch 'master' of git+ssh://gnunet.org/gnunet
-rwxr-xr-x | .buildbot/build.sh | 3 | ||||
-rw-r--r-- | src/reclaim/json_reclaim.c | 6 | ||||
-rw-r--r-- | src/reclaim/oidc_helper.c | 17 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_openid_connect.c | 1 |
4 files changed, 22 insertions, 5 deletions
diff --git a/.buildbot/build.sh b/.buildbot/build.sh index f2cdb3f2a..f1f474ee7 100755 --- a/.buildbot/build.sh +++ b/.buildbot/build.sh | |||
@@ -1,3 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | echo "Cleanup old installation..." | |
3 | rm -rf /tmp/gnunet | ||
3 | ./bootstrap && ./configure --prefix=/tmp/gnunet --enable-experimental && make | 4 | ./bootstrap && ./configure --prefix=/tmp/gnunet --enable-experimental && make |
diff --git a/src/reclaim/json_reclaim.c b/src/reclaim/json_reclaim.c index 8a3479b8a..6c945036a 100644 --- a/src/reclaim/json_reclaim.c +++ b/src/reclaim/json_reclaim.c | |||
@@ -211,8 +211,7 @@ parse_ticket (void *cls, json_t *root, struct GNUNET_JSON_Specification *spec) | |||
211 | GNUNET_STRINGS_string_to_data (id_str, | 211 | GNUNET_STRINGS_string_to_data (id_str, |
212 | strlen (id_str), | 212 | strlen (id_str), |
213 | &ticket->identity, | 213 | &ticket->identity, |
214 | sizeof( | 214 | sizeof(ticket->identity))) |
215 | struct GNUNET_CRYPTO_EcdsaPublicKey))) | ||
216 | { | 215 | { |
217 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity invalid\n"); | 216 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity invalid\n"); |
218 | GNUNET_free (ticket); | 217 | GNUNET_free (ticket); |
@@ -223,8 +222,7 @@ parse_ticket (void *cls, json_t *root, struct GNUNET_JSON_Specification *spec) | |||
223 | GNUNET_STRINGS_string_to_data (aud_str, | 222 | GNUNET_STRINGS_string_to_data (aud_str, |
224 | strlen (aud_str), | 223 | strlen (aud_str), |
225 | &ticket->audience, | 224 | &ticket->audience, |
226 | sizeof(struct | 225 | sizeof(ticket->audience))) |
227 | GNUNET_CRYPTO_EcdsaPublicKey))) | ||
228 | { | 226 | { |
229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Audience invalid\n"); | 227 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Audience invalid\n"); |
230 | GNUNET_free (ticket); | 228 | GNUNET_free (ticket); |
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 | ||
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index 698dbfe18..5eb1ff093 100644 --- a/src/reclaim/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
@@ -2243,6 +2243,7 @@ consume_ticket (void *cls, | |||
2243 | atle->presentation = GNUNET_RECLAIM_presentation_new (pres->type, | 2243 | atle->presentation = GNUNET_RECLAIM_presentation_new (pres->type, |
2244 | pres->data, | 2244 | pres->data, |
2245 | pres->data_size); | 2245 | pres->data_size); |
2246 | atle->presentation->credential_id = pres->credential_id; | ||
2246 | GNUNET_CONTAINER_DLL_insert (handle->presentations->list_head, | 2247 | GNUNET_CONTAINER_DLL_insert (handle->presentations->list_head, |
2247 | handle->presentations->list_tail, | 2248 | handle->presentations->list_tail, |
2248 | atle); | 2249 | atle); |