diff options
author | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-07-20 21:42:37 +0200 |
---|---|---|
committer | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-07-20 21:42:37 +0200 |
commit | 1914b435ce08b95c02d9c630acc292f4a7548a47 (patch) | |
tree | 9e6b49b90bc7a5d31615b638e3a4f80e429d5ef8 /src/reclaim | |
parent | 74a80d549aef8452b1040ea69d7c1274679f7338 (diff) | |
download | gnunet-1914b435ce08b95c02d9c630acc292f4a7548a47.tar.gz gnunet-1914b435ce08b95c02d9c630acc292f4a7548a47.zip |
revert simple TLD mapping
Diffstat (limited to 'src/reclaim')
-rw-r--r-- | src/reclaim/plugin_rest_openid_connect.c | 18 |
1 files changed, 17 insertions, 1 deletions
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, | |||
1165 | { | 1165 | { |
1166 | struct RequestHandle *handle = cls; | 1166 | struct RequestHandle *handle = cls; |
1167 | struct GNUNET_HashCode cache_key; | 1167 | struct GNUNET_HashCode cache_key; |
1168 | struct EgoEntry *tmp_ego; | ||
1169 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key; | ||
1170 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | ||
1168 | 1171 | ||
1169 | cookie_identity_interpretation(handle); | 1172 | cookie_identity_interpretation(handle); |
1170 | 1173 | ||
@@ -1218,7 +1221,20 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1218 | 1221 | ||
1219 | handle->ego_entry = handle->ego_head; | 1222 | handle->ego_entry = handle->ego_head; |
1220 | handle->priv_key = *GNUNET_IDENTITY_ego_get_private_key (handle->ego_head->ego); | 1223 | handle->priv_key = *GNUNET_IDENTITY_ego_get_private_key (handle->ego_head->ego); |
1221 | 1224 | //If we know this identity, translated the corresponding TLD | |
1225 | //TODO: We might want to have a reverse lookup functionality for TLDs? | ||
1226 | for (tmp_ego = handle->ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next) | ||
1227 | { | ||
1228 | priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego); | ||
1229 | GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, | ||
1230 | &pkey); | ||
1231 | if ( 0 == memcmp (&pkey, &handle->oidc->client_pkey, | ||
1232 | sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)) ) | ||
1233 | { | ||
1234 | handle->tld = GNUNET_strdup (tmp_ego->identifier); | ||
1235 | handle->ego_entry = handle->ego_tail; | ||
1236 | } | ||
1237 | } | ||
1222 | GNUNET_SCHEDULER_add_now (&build_authz_response, handle); | 1238 | GNUNET_SCHEDULER_add_now (&build_authz_response, handle); |
1223 | } | 1239 | } |
1224 | 1240 | ||