gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: revert simple TLD mapping


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: revert simple TLD mapping
Date: Fri, 20 Jul 2018 21:42:43 +0200

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 1914b435c revert simple TLD mapping
1914b435c is described below

commit 1914b435ce08b95c02d9c630acc292f4a7548a47
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Fri Jul 20 21:42:37 2018 +0200

    revert simple TLD mapping
---
 src/reclaim/plugin_rest_openid_connect.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/reclaim/plugin_rest_openid_connect.c 
b/src/reclaim/plugin_rest_openid_connect.c
index 3e53a2836..6aa2cd907 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -1165,6 +1165,9 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
 {
   struct RequestHandle *handle = cls;
   struct GNUNET_HashCode cache_key;
+  struct EgoEntry *tmp_ego;
+  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
 
   cookie_identity_interpretation(handle);
 
@@ -1218,7 +1221,20 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
 
   handle->ego_entry = handle->ego_head;
   handle->priv_key = *GNUNET_IDENTITY_ego_get_private_key 
(handle->ego_head->ego);
-  
+  //If we know this identity, translated the corresponding TLD
+  //TODO: We might want to have a reverse lookup functionality for TLDs?
+  for (tmp_ego = handle->ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next)
+  {
+    priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego);
+    GNUNET_CRYPTO_ecdsa_key_get_public (priv_key,
+                                        &pkey);
+    if ( 0 == memcmp (&pkey, &handle->oidc->client_pkey,
+                      sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)) )
+    {
+      handle->tld = GNUNET_strdup (tmp_ego->identifier);
+      handle->ego_entry = handle->ego_tail;
+    }
+  } 
   GNUNET_SCHEDULER_add_now (&build_authz_response, handle);
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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