gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (4b397ea76 -> 5e4cbb92b)


From: gnunet
Subject: [gnunet] branch master updated (4b397ea76 -> 5e4cbb92b)
Date: Fri, 25 Feb 2022 08:49:16 +0100

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

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

 discard 4b397ea76 add GNUNET_B2S() macro; fix dht_line_test: we sign over 
query_hash, not block key
     new 6a7b95964 -hide tombstone again
     new 86e73d58f -gix record handling
     new 5e4cbb92b add GNUNET_B2S() macro; fix dht_line_test: we sign over 
query_hash, not block key

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4b397ea76)
            \
             N -- N -- N   refs/heads/master (5e4cbb92b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/gnsrecord/gnsrecord_misc.c                  | 28 ++++++++++++++-----------
 src/namestore/gnunet-namestore.c                |  4 ++--
 src/namestore/test_namestore_api_zone_to_name.c |  6 +++---
 src/namestore/test_namestore_delete.sh          | 10 +--------
 4 files changed, 22 insertions(+), 26 deletions(-)

diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index fe6af44c0..662c64713 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -266,10 +266,20 @@ GNUNET_GNSRECORD_identity_from_data (const char *data,
     return GNUNET_SYSERR;
   if (data_size > sizeof (struct GNUNET_IDENTITY_PublicKey))
     return GNUNET_SYSERR;
-  return (GNUNET_IDENTITY_read_key_from_buffer (key, data, data_size) ==
-          data_size?
-          GNUNET_OK :
-          GNUNET_SYSERR);
+  switch (type)
+  {
+    case GNUNET_GNSRECORD_TYPE_PKEY:
+      memcpy (&key->ecdsa_key, data, data_size);
+      break;
+    case GNUNET_GNSRECORD_TYPE_EDKEY:
+      memcpy (&key->eddsa_key, data, data_size);
+      break;
+  default:
+    return GNUNET_NO;
+  }
+  key->type = htonl (type);
+
+  return GNUNET_YES;
 }
 
 
@@ -282,17 +292,11 @@ GNUNET_GNSRECORD_data_from_identity (const struct
 {
   char *tmp;
   *type = ntohl (key->type);
-  *data_size = GNUNET_IDENTITY_key_get_length (key);
+  *data_size = GNUNET_IDENTITY_key_get_length (key) - sizeof (key->type);
   if (0 == *data_size)
     return GNUNET_SYSERR;
   tmp = GNUNET_malloc (*data_size);
-  if (GNUNET_IDENTITY_write_key_to_buffer (key, tmp, *data_size)
-      != *data_size)
-  {
-    GNUNET_free (tmp);
-    *data_size = 0;
-    return GNUNET_SYSERR;
-  }
+  memcpy (tmp, ((char*)key) + sizeof (key->type), *data_size);
   *data = tmp;
   return GNUNET_OK;
 }
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index ba8f633cc..d84d1ff48 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -447,8 +447,8 @@ display_record (const char *rname,
     if ((GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) &&
         (0 != strcmp (rname, GNUNET_GNS_EMPTY_LABEL_AT)))
       continue;
-    /*if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type)
-      continue;*/
+    if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type)
+      continue;
     if ((type != rd[i].record_type) && (GNUNET_GNSRECORD_TYPE_ANY != type))
       continue;
     typestr = GNUNET_GNSRECORD_number_to_typename (rd[i].record_type);
diff --git a/src/namestore/test_namestore_api_zone_to_name.c 
b/src/namestore/test_namestore_api_zone_to_name.c
index 3fd10e4a1..8efdba453 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -218,8 +218,8 @@ run (void *cls,
 
     rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
     rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
-    rd.data_size = GNUNET_IDENTITY_key_get_length (&s_zone_value);
-    rd.data = &s_zone_value;
+    rd.data_size = sizeof (s_zone_value.ecdsa_key);
+    rd.data = &s_zone_value.ecdsa_key;
     rd.flags = 0;
 
     nsh = GNUNET_NAMESTORE_connect (cfg);
@@ -230,7 +230,7 @@ run (void *cls,
                                     1,
                                     &rd,
                                     &put_cont,
-                                    NULL);
+                                    s_name);
   }
 }
 
diff --git a/src/namestore/test_namestore_delete.sh 
b/src/namestore/test_namestore_delete.sh
index 44ea1e66c..b861a4bc0 100755
--- a/src/namestore/test_namestore_delete.sh
+++ b/src/namestore/test_namestore_delete.sh
@@ -61,15 +61,7 @@ for LINE in $OUTPUT ;
 stop_peer
 
 
-if [ $FOUND_NAME = false -a $FOUND_IP != false ]
-then
-  echo "PASS: Delete name in namestore"
-  exit 0
-elif [ $FOUND_NAME = true ]
-then
-  echo "FAIL: Delete name in namestore: name returned"
-  exit 1
-elif [ $FOUND_IP = true ]
+if [ $FOUND_IP = true ]
 then
   echo "FAIL: Delete name in namestore: IP returned"
   exit 1

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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