gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated (2825992a3 -> 2b99bddcb)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (2825992a3 -> 2b99bddcb)
Date: Thu, 31 May 2018 08:17:20 +0200

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

grothoff pushed a change to branch master
in repository gnunet.

    from 2825992a3 reduce loop counters to more practical levels
     new a243bee79 add -2 flag to gnunet-gns-benchmark
     new 2b99bddcb Niibe writes:

The 2 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/gns/gnunet-gns-benchmark.c | 12 +++++++++++-
 src/util/crypto_ecc.c          | 11 +----------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/gns/gnunet-gns-benchmark.c b/src/gns/gnunet-gns-benchmark.c
index 0ab6cefd5..dd393972a 100644
--- a/src/gns/gnunet-gns-benchmark.c
+++ b/src/gns/gnunet-gns-benchmark.c
@@ -181,6 +181,10 @@ static struct GNUNET_TIME_Relative timeout;
  */
 static unsigned int active_cnt;
 
+/**
+ * Look for GNS2DNS records specifically?
+ */
+static int g2d;
 
 /**
  * Free @a req and data structures reachable from it.
@@ -294,7 +298,9 @@ process_queue (void *cls)
               active_cnt);
   req->lr = GNUNET_GNS_lookup_with_tld (gns,
                                        req->hostname,
-                                       GNUNET_GNSRECORD_TYPE_ANY,
+                                       g2d
+                                        ? GNUNET_GNSRECORD_TYPE_GNS2DNS
+                                        : GNUNET_GNSRECORD_TYPE_ANY,
                                        GNUNET_GNS_LO_DEFAULT,
                                        &process_result,
                                        req);
@@ -580,6 +586,10 @@ main (int argc,
                                         "RELATIVETIME",
                                         gettext_noop ("how long to wait for an 
answer"),
                                         &timeout),
+    GNUNET_GETOPT_option_flag ('2',
+                               "g2d",
+                               gettext_noop ("look for GNS2DNS records instead 
of ANY"),
+                               &g2d),
     GNUNET_GETOPT_OPTION_END
   };
 
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 8d9091b23..200371cd7 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -1275,22 +1275,13 @@ eddsa_d_to_a (gcry_mpi_t d)
 
   /* Note that we clear DIGEST so we can use it as input to left pad
      the key with zeroes for hashing.  */
+  memset (digest, 0, sizeof digest);
   memset (hvec, 0, sizeof hvec);
   rawmpilen = sizeof (rawmpi);
   GNUNET_assert (0 ==
                  gcry_mpi_print (GCRYMPI_FMT_USG,
                                 rawmpi, rawmpilen, &rawmpilen,
                                  d));
-  if (rawmpilen < 32)
-  {
-    memmove (rawmpi + 32 - rawmpilen,
-             rawmpi,
-             rawmpilen);
-    memset (rawmpi,
-            0,
-            32 - rawmpilen);
-    rawmpilen = 32;
-  }
   hvec[0].data = digest;
   hvec[0].off = 0;
   hvec[0].len = b > rawmpilen ? (b - rawmpilen) : 0;

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



reply via email to

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