aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/identity-provider/plugin_gnsrecord_identity_provider.c9
-rwxr-xr-xsrc/identity-provider/test_idp_attribute.sh1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/identity-provider/plugin_gnsrecord_identity_provider.c b/src/identity-provider/plugin_gnsrecord_identity_provider.c
index cee0a95065..ad5a95dc71 100644
--- a/src/identity-provider/plugin_gnsrecord_identity_provider.c
+++ b/src/identity-provider/plugin_gnsrecord_identity_provider.c
@@ -54,12 +54,13 @@ value_to_string (void *cls,
switch (type)
{
case GNUNET_GNSRECORD_TYPE_ID_ATTR:
- case GNUNET_GNSRECORD_TYPE_ID_TOKEN:
+ return GNUNET_STRINGS_data_to_string_alloc (data, data_size);
+ case GNUNET_GNSRECORD_TYPE_ID_TOKEN: //DEPRECATED
return GNUNET_strndup (data, data_size);
case GNUNET_GNSRECORD_TYPE_ABE_KEY:
case GNUNET_GNSRECORD_TYPE_ABE_MASTER:
return GNUNET_STRINGS_data_to_string_alloc (data, data_size);
- case GNUNET_GNSRECORD_TYPE_ID_TOKEN_METADATA:
+ case GNUNET_GNSRECORD_TYPE_ID_TOKEN_METADATA: //DEPRECATED
ecdhe_privkey = data;
audience_pubkey = data+sizeof (struct GNUNET_CRYPTO_EcdhePrivateKey);
scopes = (char*) audience_pubkey+(sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
@@ -109,6 +110,10 @@ string_to_value (void *cls,
switch (type)
{
case GNUNET_GNSRECORD_TYPE_ID_ATTR:
+ return GNUNET_STRINGS_string_to_data (s,
+ strlen (s),
+ *data,
+ *data_size);
case GNUNET_GNSRECORD_TYPE_ID_TOKEN:
*data = GNUNET_strdup (s);
*data_size = strlen (s);
diff --git a/src/identity-provider/test_idp_attribute.sh b/src/identity-provider/test_idp_attribute.sh
index 433dfa3c4d..6c357128f2 100755
--- a/src/identity-provider/test_idp_attribute.sh
+++ b/src/identity-provider/test_idp_attribute.sh
@@ -29,4 +29,5 @@ gnunet-identity -C rpego -c test_idp.conf
TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep testego | awk '{print $3}')
gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf
gnunet-idp -e testego -a name -V John -c test_idp.conf
+gnunet-namestore -D -z testego -D -c test_idp.conf
gnunet-arm -e -c test_idp.conf