gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 137/171: -fix records


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 137/171: -fix records
Date: Thu, 04 Jan 2018 16:10:45 +0100

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

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

commit 0729d3ff0b209fe2da270d98c967ad0acbdd49cb
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Sat Oct 7 13:21:21 2017 +0200

    -fix records
---
 src/identity-provider/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 address@hidden -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

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



reply via email to

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