[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -update revocation test vector
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -update revocation test vector |
Date: |
Mon, 31 Jan 2022 16:53:53 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 8b4561538 -update revocation test vector
8b4561538 is described below
commit 8b456153847db2e4cf51c4f924021af40bbbe68b
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Jan 31 16:53:49 2022 +0100
-update revocation test vector
---
src/revocation/gnunet-revocation-tvg.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/revocation/gnunet-revocation-tvg.c
b/src/revocation/gnunet-revocation-tvg.c
index cb5e31fcd..71d74ea5e 100644
--- a/src/revocation/gnunet-revocation-tvg.c
+++ b/src/revocation/gnunet-revocation-tvg.c
@@ -35,9 +35,10 @@
#define TEST_DIFFICULTY 5
static void
-print_bytes (void *buf,
+print_bytes_ (void *buf,
size_t buf_len,
- int fold)
+ int fold,
+ int in_be)
{
int i;
@@ -45,11 +46,23 @@ print_bytes (void *buf,
{
if ((0 != i) && (0 != fold) && (i % fold == 0))
printf ("\n");
- printf ("%02x", ((unsigned char*) buf)[i]);
+ if (in_be)
+ printf ("%02x", ((unsigned char*) buf)[buf_len - 1 - i]);
+ else
+ printf ("%02x", ((unsigned char*) buf)[i]);
}
printf ("\n");
}
+static void
+print_bytes (void *buf,
+ size_t buf_len,
+ int fold)
+{
+ print_bytes_ (buf, buf_len, fold, 0);
+}
+
+
/**
* Main function that will be run.
@@ -80,8 +93,8 @@ run (void *cls,
GNUNET_IDENTITY_key_get_length (&id_pub),
ztld,
sizeof (ztld));
- fprintf (stdout, "Zone private key (d, little-endian scalar, with ztype
prepended):\n");
- print_bytes (&id_priv, sizeof(id_priv), 8);
+ fprintf (stdout, "Zone private key (d, big-endian scalar, with ztype
prepended):\n");
+ print_bytes_ (&id_priv.ecdsa_key, sizeof(id_priv.ecdsa_key), 8, 1);
fprintf (stdout, "\n");
fprintf (stdout, "Zone identifier (zid):\n");
print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -update revocation test vector,
gnunet <=