From a42d7df64e18705cef7cd04ac36fd7dbace80268 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 22 Mar 2021 20:06:33 +0100 Subject: fix #6808: gnunet-bcd card generation --- src/gns/Makefile.am | 1 + src/gns/gnunet-bcd.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 9f03311e1..b35836233 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am @@ -156,6 +156,7 @@ gnunet_bcd_SOURCES = \ gnunet-bcd.c gnunet_bcd_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ + $(top_builddir)/src/identity/libgnunetidentity.la \ $(GN_LIBINTL) $(MHD_LIBS) gnunet_bcd_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS) diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c index f71f477ef..a2e94089c 100644 --- a/src/gns/gnunet-bcd.c +++ b/src/gns/gnunet-bcd.c @@ -27,6 +27,7 @@ #include "platform.h" #include #include "gnunet_util_lib.h" +#include "gnunet_identity_service.h" #include "gnunet_mhd_compat.h" /** @@ -148,7 +149,7 @@ access_handler_callback (void *cls, char *p; char *tmp; char *deffile; - struct GNUNET_CRYPTO_EcdsaPublicKey pub; + struct GNUNET_IDENTITY_PublicKey pub; size_t slen; FILE *f; struct stat st; @@ -166,9 +167,8 @@ access_handler_callback (void *cls, MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "gnskey"); if ((NULL == gnskey) || (GNUNET_OK != - GNUNET_CRYPTO_ecdsa_public_key_from_string (gnskey, - strlen (gnskey), - &pub))) + GNUNET_IDENTITY_public_key_from_string (gnskey, + &pub))) { return MHD_queue_response (connection, MHD_HTTP_OK, @@ -218,10 +218,10 @@ access_handler_callback (void *cls, (NULL == gns_nick) ? "" : gns_nick); fclose (f); GNUNET_asprintf ( - &p, - "cd %s; cp %s gns-bcd.tex | pdflatex --enable-write18 gns-bcd.tex > /dev/null 2> /dev/null", - tmp, - resfile); + &p, + "cd %s; cp %s gns-bcd.tex | pdflatex --enable-write18 gns-bcd.tex > /dev/null 2> /dev/null", + tmp, + resfile); GNUNET_free (deffile); ret = system (p); if (WIFSIGNALED (ret) || (0 != WEXITSTATUS (ret))) @@ -506,7 +506,7 @@ main (int argc, char *const *argv) "port", "PORT", gettext_noop ( - "Run HTTP serve on port PORT (default is 8888)"), + "Run HTTP serve on port PORT (default is 8888)"), &port), GNUNET_GETOPT_OPTION_END }; @@ -523,8 +523,8 @@ main (int argc, char *const *argv) options, &run, NULL)) - ? 0 - : 1; + ? 0 + : 1; GNUNET_free_nz ((void *) argv); return ret; } -- cgit v1.2.3