[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 06/20: -implement TVG
From: |
gnunet |
Subject: |
[gnunet] 06/20: -implement TVG |
Date: |
Sat, 19 Feb 2022 16:20:46 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 3a71153405e8fc26712807b4bdb5987fb3bf2b9e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Jan 13 20:26:33 2022 +0100
-implement TVG
---
src/hello/Makefile.am | 3 ++-
src/hello/test_hello-uri.c | 40 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am
index 08d976260..c04b85106 100644
--- a/src/hello/Makefile.am
+++ b/src/hello/Makefile.am
@@ -50,7 +50,8 @@ test_hello_uri_SOURCES = \
test_hello-uri.c
test_hello_uri_LDADD = \
libgnunethello.la \
- $(top_builddir)/src/util/libgnunetutil.la
+ $(top_builddir)/src/util/libgnunetutil.la \
+ -lgcrypt
test_friend_hello_SOURCES = \
diff --git a/src/hello/test_hello-uri.c b/src/hello/test_hello-uri.c
index 295c08ea3..7e70d6763 100644
--- a/src/hello/test_hello-uri.c
+++ b/src/hello/test_hello-uri.c
@@ -44,7 +44,7 @@ check_uris (void *cls,
"test://address"))
*found |= 1;
else if (0 == strcmp (uri,
- "test://more"))
+ "test://more"))
*found |= 2;
else
*found = (unsigned int) -1;
@@ -170,7 +170,43 @@ main (int argc,
GNUNET_HELLO_builder_free (b2);
}
-
GNUNET_HELLO_builder_free (b);
+
+ GNUNET_CRYPTO_mpi_print_unsigned (priv.d,
+ sizeof (priv.d),
+ GCRYMPI_CONST_ONE);
+ priv.d[0] &= 248;
+ priv.d[31] &= 127;
+ priv.d[31] |= 64;
+ {
+ char *buf;
+
+ buf = GNUNET_STRINGS_data_to_string_alloc (&priv,
+ sizeof (priv));
+ fprintf (stderr,
+ "PK: %s\n",
+ buf);
+ GNUNET_free (buf);
+ }
+ GNUNET_CRYPTO_eddsa_key_get_public (&priv,
+ &pid.public_key);
+ b = GNUNET_HELLO_builder_new (&pid);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_HELLO_builder_add_address (b,
+ "a://first"));
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_HELLO_builder_add_address (b,
+ "b://second"));
+ {
+ char *url;
+
+ url = GNUNET_HELLO_builder_to_url (b,
+ &priv);
+ fprintf (stderr,
+ "TV: %s\n",
+ url);
+ GNUNET_free (url);
+ }
+
return 0;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 13/20: -fix port initialization in addr, (continued)
- [gnunet] 13/20: -fix port initialization in addr, gnunet, 2022/02/19
- [gnunet] 11/20: -DHT: add gnunet-dht-hello for bootstrapping, gnunet, 2022/02/19
- [gnunet] 16/20: -got basics to work with dhtu and udp+ip underlay, gnunet, 2022/02/19
- [gnunet] 18/20: -fix merge issues, gnunet, 2022/02/19
- [gnunet] 20/20: -fix assertion, fix key initialization, gnunet, 2022/02/19
- [gnunet] 17/20: -try to make static analysis happy, gnunet, 2022/02/19
- [gnunet] 15/20: -adding logging, minor dthu bugfixes, gnunet, 2022/02/19
- [gnunet] 19/20: -fix htons/htonl bug introduced by message format change, gnunet, 2022/02/19
- [gnunet] 12/20: -fix crashes on new DHT load/shutdown, gnunet, 2022/02/19
- [gnunet] 10/20: -add hold/drop logic, gnunet, 2022/02/19
- [gnunet] 06/20: -implement TVG,
gnunet <=
- [gnunet] 05/20: add new HELLO_URI block support to block plugin, gnunet, 2022/02/19
- [gnunet] 14/20: -DHT: get tests to pass, gnunet, 2022/02/19