gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: [donau-tools] delete offline files


From: gnunet
Subject: [taler-donau] branch master updated: [donau-tools] delete offline files
Date: Mon, 01 Jan 2024 18:02:22 +0100

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

lukas-matyja pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new f5dcf69  [donau-tools] delete offline files
f5dcf69 is described below

commit f5dcf6938e4fe3dd6c9a08aac0374371b1b206d3
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Mon Jan 1 18:03:02 2024 +0100

    [donau-tools] delete offline files
---
 src/donau-tools/Makefile.am           |  21 +---
 src/donau-tools/donau-offline.c       | 223 ----------------------------------
 src/donau-tools/donau-offline.conf    |  15 ---
 src/donau-tools/taler-donau-offline.c | 183 ----------------------------
 src/testing/donau-unified-setup.sh    |  17 +--
 5 files changed, 4 insertions(+), 455 deletions(-)

diff --git a/src/donau-tools/Makefile.am b/src/donau-tools/Makefile.am
index 87fd4b6..3d38f93 100644
--- a/src/donau-tools/Makefile.am
+++ b/src/donau-tools/Makefile.am
@@ -5,7 +5,6 @@ pkgcfgdir = $(prefix)/share/taler/config.d/
 
 pkgcfg_DATA = \
   coins.conf \
-  donau-offline.conf
 
 if USE_COVERAGE
   AM_CFLAGS = --coverage -O0
@@ -13,25 +12,11 @@ if USE_COVERAGE
 endif
 
 bin_PROGRAMS = \
-  taler-donau-offline \
-  taler-donau-dbinit 
+  donau-dbinit 
 
-taler_donau_offline_SOURCES = \
-  taler-donau-offline.c
-taler_donau_offline_LDADD = \
-  $(LIBGCRYPT_LIBS) \
-  $(top_builddir)/src/lib/libtalerdonau.la \
-  $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libdonauutil.la \
-  -lgnunetjson \
-  -lgnunetcurl \
-  -ljansson \
-  -lgnunetutil \
-  $(XLIB)
-
-taler_donau_dbinit_SOURCES = \
+donau_dbinit_SOURCES = \
   taler-donau-dbinit.c
-taler_donau_dbinit_LDADD = \
+donau_dbinit_LDADD = \
   $(LIBGCRYPT_LIBS) \
   $(top_builddir)/src/util/libdonauutil.la \
   $(top_builddir)/src/pq/libtalerpq.la \
diff --git a/src/donau-tools/donau-offline.c b/src/donau-tools/donau-offline.c
deleted file mode 100644
index 3aa7f8c..0000000
--- a/src/donau-tools/donau-offline.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
-   This file is part of TALER
-   Copyright (C) 2020-2023 Taler Systems SA
-
-   TALER is free software; you can redistribute it and/or modify it under the
-   terms of the GNU General Public License as published by the Free Software
-   Foundation; either version 3, or (at your option) any later version.
-
-   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-   WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR
-   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License along with
-   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
- */
-/**
- * @file taler-donau-offline.c
- * @brief Support for operations involving the donau's offline master key.
- * @author Christian Grothoff
- */
-#include <taler/platform.h>
-#include <gnunet/gnunet_json_lib.h>
-#include <gnunet/gnunet_util_lib.h>
-#include "taler/taler_json_lib.h"
-#include "donau_service.h"
-#include "taler/taler_extensions.h"
-#include <regex.h>
-
-
-/**
- * Name of the input for the 'sign' and 'show' operation.
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_INPUT_KEYS "donau-input-keys-0"
-
-/**
- * Name of the operation to 'upload' key signatures
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_UPLOAD_SIGS "donau-upload-sigs-0"
-
-/**
- * Name of the operation to 'revoke-signkey'
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_REVOKE_SIGNKEY "donau-revoke-signkey-0"
-
-/**
- * Show the offline signing key.
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_SETUP "donau-setup-0"
-
-/**
- * Our context for making HTTP requests.
- */
-static struct GNUNET_CURL_Context *ctx;
-
-/**
- * Reschedule context for #ctx.
- */
-static struct GNUNET_CURL_RescheduleContext *rc;
-
-/**
- * Handle to the donau's configuration
- */
-static const struct GNUNET_CONFIGURATION_Handle *kcfg;
-
-/**
- * Age restriction configuration
- */
-static bool ar_enabled = false;
-static struct TALER_AgeRestrictionConfig ar_config = {0};
-
-/**
- * Return value from main().
- */
-static int global_ret;
-
-/**
- * Input to consume.
- */
-static json_t *in;
-
-/**
- * Array of actions to perform.
- */
-static json_t *out;
-
-/**
- * Currency we have configured.
- */
-static char *currency;
-
-/**
- * URL of the donau we are interacting with
- * as per our configuration.
- */
-static char *CFG_donau_url;
-
-/**
- * A subcommand supported by this program.
- */
-struct SubCommand
-{
-  /**
-   * Name of the command.
-   */
-  const char *name;
-
-  /**
-   * Help text for the command.
-   */
-  const char *help;
-
-  /**
-   * Function implementing the command.
-   *
-   * @param args subsequent command line arguments (char **)
-   */
-  void (*cb)(char *const *args);
-};
-
-
-/**
- * Data structure for signkey revocation requests.
- */
-struct SignkeyRevocationRequest
-{
-
-  /**
-   * Kept in a DLL.
-   */
-  struct SignkeyRevocationRequest *next;
-
-  /**
-   * Kept in a DLL.
-   */
-  struct SignkeyRevocationRequest *prev;
-
-  /**
-   * Operation handle.
-   */
-  struct DONAU_ManagementRevokeSigningKeyHandle *h;
-
-  /**
-   * Array index of the associated command.
-   */
-  size_t idx;
-};
-
-
-/**
- * Next work item to perform.
- */
-static struct GNUNET_SCHEDULER_Task *nxt;
-
-/**
- * Handle for #do_download.
- */
-static struct DONAU_ManagementGetKeysHandle *mgkh;
-
-/**
- * Active signkey revocation requests.
- */
-static struct SignkeyRevocationRequest *srr_head;
-
-/**
- * Active signkey revocation requests.
- */
-static struct SignkeyRevocationRequest *srr_tail;
-
-
-// /**
-//  * The main function of the taler-donau-offline tool.  This tool is used to
-//  * create the signing and denomination keys for the donau.  It uses the
-//  * long-term offline private key and generates signatures with it. It also
-//  * supports online operations with the donau to download its input data and
-//  * to upload its results. Those online operations should be performed on
-//  * another machine in production!
-//  *
-//  * @param argc number of arguments from the command line
-//  * @param argv command line arguments
-//  * @return 0 ok, 1 on error
-//  */
-int
-main (int argc,
-      char *const *argv)
-{
-  struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_END
-  };
-  enum GNUNET_GenericReturnValue ret;
-
-  /* force linker to link against libtalerutil; if we do
-     not do this, the linker may "optimize" libtalerutil
-     away and skip #TALER_OS_init(), which we do need */
-  // (void) TALER_project_data_default ();
-  if (GNUNET_OK !=
-      GNUNET_STRINGS_get_utf8_args (argc, argv,
-                                    &argc, &argv))
-    return EXIT_INVALIDARGUMENT;
-  // TALER_OS_init ();
-  // ret = GNUNET_PROGRAM_run (
-  //   argc, argv,
-  //   "taler-donau-offline",
-  //   gettext_noop ("Operations for offline signing for a Taler donau"),
-  //   options,
-  //   &run, NULL);
-  GNUNET_free_nz ((void *) argv);
-  if (GNUNET_SYSERR == ret)
-    return EXIT_INVALIDARGUMENT;
-  if (GNUNET_NO == ret)
-    return EXIT_SUCCESS;
-  return global_ret;
-}
-
-
-/* end of taler-donau-offline.c */
diff --git a/src/donau-tools/donau-offline.conf 
b/src/donau-tools/donau-offline.conf
deleted file mode 100644
index bdc68e1..0000000
--- a/src/donau-tools/donau-offline.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is in the public domain.
-#
-[donau-offline]
-
-# Where do we store the offline master private key of the donau?
-MASTER_PRIV_FILE = ${TALER_DATA_HOME}donau-offline/master.priv
-
-# Where do we store the TOFU key material?
-SECM_TOFU_FILE = ${TALER_DATA_HOME}donau-offline/secm_tofus.pub
-
-# Base32-encoded public key of the RSA helper.
-# SECM_DENOM_PUBKEY =
-
-# Base32-encoded public key of the EdDSA helper.
-# SECM_ESIGN_PUBKEY =
diff --git a/src/donau-tools/taler-donau-offline.c 
b/src/donau-tools/taler-donau-offline.c
deleted file mode 100644
index c20cd7a..0000000
--- a/src/donau-tools/taler-donau-offline.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-   This file is part of TALER
-   Copyright (C) 2020-2023 Taler Systems SA
-
-   TALER is free software; you can redistribute it and/or modify it under the
-   terms of the GNU General Public License as published by the Free Software
-   Foundation; either version 3, or (at your option) any later version.
-
-   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-   WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR
-   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License along with
-   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
- */
-/**
- * @file taler-donau-offline.c
- * @brief Support for operations involving the donau's offline master key.
- * @author Christian Grothoff
- */
-#include <taler/platform.h>
-#include <gnunet/gnunet_json_lib.h>
-#include <gnunet/gnunet_util_lib.h>
-#include "taler/taler_json_lib.h"
-#include "donau_service.h"
-#include "taler/taler_extensions.h"
-#include <regex.h>
-
-
-/**
- * Name of the input for the 'sign' and 'show' operation.
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_INPUT_KEYS "donau-input-keys-0"
-
-/**
- * Name of the operation to 'upload' key signatures
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_UPLOAD_SIGS "donau-upload-sigs-0"
-
-/**
- * Name of the operation to 'revoke-signkey'
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_REVOKE_SIGNKEY "donau-revoke-signkey-0"
-
-/**
- * Show the offline signing key.
- * The last component --by convention-- identifies the protocol version
- * and should be incremented whenever the JSON format of the 'argument' 
changes.
- */
-#define OP_SETUP "donau-setup-0"
-
-
-/**
- * Return value from main().
- */
-static int global_ret;
-
-/**
- * Input to consume.
- */
-// static json_t *in;
-
-/**
- * Array of actions to perform.
- */
-// static json_t *out;
-
-/**
- * Currency we have configured.
- */
-// static char *currency;
-
-/**
- * URL of the donau we are interacting with
- * as per our configuration.
- */
-// static char *CFG_donau_url;
-
-/**
- * A subcommand supported by this program.
- */
-struct SubCommand
-{
-  /**
-   * Name of the command.
-   */
-  const char *name;
-
-  /**
-   * Help text for the command.
-   */
-  const char *help;
-
-  /**
-   * Function implementing the command.
-   *
-   * @param args subsequent command line arguments (char **)
-   */
-  void (*cb)(char *const *args);
-};
-
-
-/**
- * Data structure for signkey revocation requests.
- */
-struct SignkeyRevocationRequest
-{
-
-  /**
-   * Kept in a DLL.
-   */
-  struct SignkeyRevocationRequest *next;
-
-  /**
-   * Kept in a DLL.
-   */
-  struct SignkeyRevocationRequest *prev;
-
-  /**
-   * Operation handle.
-   */
-  struct DONAU_ManagementRevokeSigningKeyHandle *h;
-
-  /**
-   * Array index of the associated command.
-   */
-  size_t idx;
-};
-
-
-// /**
-//  * The main function of the taler-donau-offline tool.  This tool is used to
-//  * create the signing and denomination keys for the donau.  It uses the
-//  * long-term offline private key and generates signatures with it. It also
-//  * supports online operations with the donau to download its input data and
-//  * to upload its results. Those online operations should be performed on
-//  * another machine in production!
-//  *
-//  * @param argc number of arguments from the command line
-//  * @param argv command line arguments
-//  * @return 0 ok, 1 on error
-//  */
-int
-main (int argc, char *const *argv)
-{
-  struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_END
-  };
-  (void) options; // delete me
-  enum GNUNET_GenericReturnValue ret;
-
-  /* force linker to link against libtalerutil; if we do
-     not do this, the linker may "optimize" libtalerutil
-     away and skip #TALER_OS_init(), which we do need */
-  // (void) TALER_project_data_default ();
-  if (GNUNET_OK !=
-      GNUNET_STRINGS_get_utf8_args (argc, argv,
-                                    &argc, &argv))
-    return EXIT_INVALIDARGUMENT;
-  // TALER_OS_init ();
-  // ret = GNUNET_PROGRAM_run (
-  //   argc, argv,
-  //   "taler-donau-offline",
-  //   gettext_noop ("Operations for offline signing for a Taler donau"),
-  //   options,
-  //   &run, NULL);
-  ret = 1; // delete me
-  GNUNET_free_nz ((void *) argv);
-  if (GNUNET_SYSERR == ret)
-    return EXIT_INVALIDARGUMENT;
-  if (GNUNET_NO == ret)
-    return EXIT_SUCCESS;
-  return global_ret;
-}
-
-
-/* end of taler-donau-offline.c */
diff --git a/src/testing/donau-unified-setup.sh 
b/src/testing/donau-unified-setup.sh
index 5a012dc..831bd84 100755
--- a/src/testing/donau-unified-setup.sh
+++ b/src/testing/donau-unified-setup.sh
@@ -470,22 +470,7 @@ then
     else
         DONAU_URL="http://localhost:${DONAU_PORT}/";
     fi
-    MASTER_PRIV_FILE=$(donau-config -f -c "${CONF}" -s "DONAU-OFFLINE" -o 
"MASTER_PRIV_FILE")
-    MASTER_PRIV_DIR=$(dirname "$MASTER_PRIV_FILE")
-    mkdir -p "${MASTER_PRIV_DIR}"
-    if [ ! -e "$MASTER_PRIV_FILE" ]
-    then
-        gnunet-ecc -g1 "$MASTER_PRIV_FILE" > /dev/null 2> /dev/null
-        echo -n "."
-    fi
-    MASTER_PUB=$(gnunet-ecc -p "${MASTER_PRIV_FILE}")
-    MPUB=$(donau-config -c "$CONF" -s donau -o MASTER_PUBLIC_KEY)
-    if [ "$MPUB" != "$MASTER_PUB" ]
-    then
-        echo -n " patching master_pub ($MASTER_PUB)..."
-        donau-config -c "$CONF" -s donau -o MASTER_PUBLIC_KEY -V "$MASTER_PUB"
-    fi
-    donau-dbinit -c "$CONF" --reset
+    taler-donau-dbinit -c "$CONF" --reset
     $USE_VALGRIND donau-secmod-eddsa -c "$CONF" -L "$LOGLEVEL" 2> 
donau-secmod-eddsa.log &
     $USE_VALGRIND donau-secmod-rsa -c "$CONF" -L "$LOGLEVEL" 2> 
donau-secmod-rsa.log &
     $USE_VALGRIND donau-secmod-cs -c "$CONF" -L "$LOGLEVEL" 2> 
donau-secmod-cs.log &

-- 
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]