From 0729d3ff0b209fe2da270d98c967ad0acbdd49cb Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sat, 7 Oct 2017 13:21:21 +0200 Subject: [PATCH] -fix records --- .../plugin_gnsrecord_identity_provider.c | 9 +++++++-- src/identity-provider/test_idp_attribute.sh | 1 + 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 cee0a9506..ad5a95dc7 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 433dfa3c4..6c357128f 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 -- 2.25.1