gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (589be093e -> 4a280820c)


From: gnunet
Subject: [gnunet] branch master updated (589be093e -> 4a280820c)
Date: Mon, 21 Dec 2020 15:53:18 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from 589be093e lower log level
     new 90cab809e fixes
     new 309cf872b cleanup before build
     new 4a280820c Merge branch 'master' of ssh://gnunet.org/gnunet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .buildbot/build.sh                       |  3 ++-
 src/reclaim/json_reclaim.c               |  6 ++----
 src/reclaim/oidc_helper.c                | 17 +++++++++++++++++
 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 @@
 #!/bin/bash
-
+echo "Cleanup old installation..."
+rm -rf /tmp/gnunet
 ./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)
       GNUNET_STRINGS_string_to_data (id_str,
                                      strlen (id_str),
                                      &ticket->identity,
-                                     sizeof(
-                                       struct GNUNET_CRYPTO_EcdsaPublicKey)))
+                                     sizeof(ticket->identity)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity invalid\n");
     GNUNET_free (ticket);
@@ -223,8 +222,7 @@ parse_ticket (void *cls, json_t *root, struct 
GNUNET_JSON_Specification *spec)
       GNUNET_STRINGS_string_to_data (aud_str,
                                      strlen (aud_str),
                                      &ticket->audience,
-                                     sizeof(struct
-                                            GNUNET_CRYPTO_EcdsaPublicKey)))
+                                     sizeof(ticket->audience)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Audience invalid\n");
     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,
       int j = 0;
       for (ple = presentations->list_head; NULL != ple; ple = ple->next)
       {
+        char *tmp;
+        tmp = GNUNET_STRINGS_data_to_string_alloc (&le->attribute->credential,
+                                                   sizeof 
(le->attribute->credential));
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    "Checking : %s\n", tmp);
+        GNUNET_free (tmp);
+
+        tmp = GNUNET_STRINGS_data_to_string_alloc 
(&ple->presentation->credential_id,
+                                                   sizeof 
(ple->presentation->credential_id));
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    " against: %s\n", tmp);
+        GNUNET_free (tmp);
         if (GNUNET_YES ==
             GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id,
                                         &le->attribute->credential))
@@ -498,6 +510,9 @@ OIDC_build_authz_code (const struct 
GNUNET_IDENTITY_PrivateKey *issuer,
   if (NULL != presentations)
   {
     // Get length
+    // FIXME only add presentations relevant for attribute list!!!
+    // This is important because of the distinction between id_token and
+    // userinfo in OIDC
     pres_list_len =
       GNUNET_RECLAIM_presentation_list_serialize_get_size (presentations);
     params.pres_list_len = htonl (pres_list_len);
@@ -524,8 +539,10 @@ OIDC_build_authz_code (const struct 
GNUNET_IDENTITY_PrivateKey *issuer,
   }
   if (0 < attr_list_len)
     GNUNET_RECLAIM_attribute_list_serialize (attrs, tmp);
+  tmp += attr_list_len;
   if (0 < pres_list_len)
     GNUNET_RECLAIM_presentation_list_serialize (presentations, tmp);
+  tmp += pres_list_len;
 
   /** END **/
 
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,
     atle->presentation = GNUNET_RECLAIM_presentation_new (pres->type,
                                                           pres->data,
                                                           pres->data_size);
+    atle->presentation->credential_id = pres->credential_id;
     GNUNET_CONTAINER_DLL_insert (handle->presentations->list_head,
                                  handle->presentations->list_tail,
                                  atle);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]