summaryrefslogtreecommitdiff
path: root/src/reclaim
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-07-23 22:58:20 +0200
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-07-23 22:58:20 +0200
commit4336c9fddab44104eef6a480f354a92b6befa255 (patch)
treed6dd63423ed2667e4cce9c8d8b55d0acf57bd64c /src/reclaim
parent94c9fde8f4136432bb4cbc99ba5102702279df14 (diff)
fix wrong record type
Diffstat (limited to 'src/reclaim')
-rw-r--r--src/reclaim/plugin_gnsrecord_reclaim.c8
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/src/reclaim/plugin_gnsrecord_reclaim.c b/src/reclaim/plugin_gnsrecord_reclaim.c
index 181a4bbc2..ecd1d6e77 100644
--- a/src/reclaim/plugin_gnsrecord_reclaim.c
+++ b/src/reclaim/plugin_gnsrecord_reclaim.c
@@ -54,11 +54,11 @@ value_to_string (void *cls,
case GNUNET_GNSRECORD_TYPE_ID_ATTR:
return GNUNET_STRINGS_data_to_string_alloc (data, data_size);
case GNUNET_GNSRECORD_TYPE_ID_TOKEN: //DEPRECATED
+ case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT:
+ case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT:
return GNUNET_strndup (data, data_size);
case GNUNET_GNSRECORD_TYPE_ABE_KEY:
case GNUNET_GNSRECORD_TYPE_ABE_MASTER:
- case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT:
- case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT:
return GNUNET_STRINGS_data_to_string_alloc (data, data_size);
case GNUNET_GNSRECORD_TYPE_ID_TOKEN_METADATA: //DEPRECATED
ecdhe_privkey = data;
@@ -115,13 +115,13 @@ string_to_value (void *cls,
*data,
*data_size);
case GNUNET_GNSRECORD_TYPE_ID_TOKEN:
+ case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT:
+ case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT:
*data = GNUNET_strdup (s);
*data_size = strlen (s);
return GNUNET_OK;
case GNUNET_GNSRECORD_TYPE_ABE_KEY:
case GNUNET_GNSRECORD_TYPE_ABE_MASTER:
- case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT:
- case GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT:
return GNUNET_STRINGS_string_to_data (s,
strlen (s),
*data,
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index 99459427c..24673c692 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -895,10 +895,12 @@ lookup_redirect_uri_result (void *cls,
}
for (int i = 0; i < rd_count; i++)
{
- if (0 != strcmp (rd[0].data,
+ if (GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT != rd[i].record_type)
+ continue;
+ if (0 != strcmp (rd[i].data,
handle->oidc->redirect_uri))
continue;
- tmp = GNUNET_strdup (rd[0].data);
+ tmp = GNUNET_strdup (rd[i].data);
pos = strrchr (tmp,
(unsigned char) '.');
*pos = '\0';