gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] 02/02: towards #5777, adding todos/notes


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 02/02: towards #5777, adding todos/notes
Date: Mon, 15 Jul 2019 22:01:10 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

commit 4785bcb4bbdd6055cd54b3d461909e6b071811f5
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jul 15 22:01:06 2019 +0200

    towards #5777, adding todos/notes
---
 src/include/taler_crypto_lib.h       | 22 ++++++++++++++++++++++
 src/include/taler_exchange_service.h | 10 ++++++----
 src/include/taler_testing_lib.h      |  2 ++
 src/lib/testing_api_cmd_refresh.c    | 13 ++++++++++++-
 4 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 18c214e1..4024123b 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -434,6 +434,28 @@ struct TALER_PlanchetSecretsP
 
 };
 
+
+/**
+ * Header for serializations of coin-specific information about the fresh
+ * coins we generate from refresh.  These are the secrets that arise during
+ * planchet generation, which is the first stage of creating a new coin from
+ * refresh.
+ */
+struct TALER_RefreshPlanchetSecretsP
+{
+
+  /**
+   * Private key of the coin.
+   */
+  struct TALER_CoinSpendPrivateKeyP coin_priv;
+
+  /**
+   * XXX. See #5777~0014690 - need a solution for this first!
+   */
+  struct TALER_TransferPrivateKeyP transfer_priv;
+
+};
+
 GNUNET_NETWORK_STRUCT_END
 
 
diff --git a/src/include/taler_exchange_service.h 
b/src/include/taler_exchange_service.h
index 880e6038..eebbf6c5 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -1130,7 +1130,7 @@ struct TALER_EXCHANGE_ReserveWithdrawHandle;
 typedef void
 (*TALER_EXCHANGE_ReserveWithdrawResultCallback) (void *cls,
                                                  unsigned int http_status,
-                                                enum TALER_ErrorCode ec,
+                                                 enum TALER_ErrorCode ec,
                                                  const struct 
TALER_DenominationSignature *sig,
                                                  const json_t *full_response);
 
@@ -1287,8 +1287,8 @@ struct TALER_EXCHANGE_RefreshMeltHandle;
 typedef void
 (*TALER_EXCHANGE_RefreshMeltCallback) (void *cls,
                                        unsigned int http_status,
-                                      enum TALER_ErrorCode ec,
-                                      uint32_t noreveal_index,
+                                       enum TALER_ErrorCode ec,
+                                       uint32_t noreveal_index,
                                        const struct TALER_ExchangePublicKeyP 
*sign_key,
                                        const json_t *full_response);
 
@@ -1354,8 +1354,10 @@ TALER_EXCHANGE_refresh_melt_cancel (struct 
TALER_EXCHANGE_RefreshMeltHandle *rmh
 typedef void
 (*TALER_EXCHANGE_RefreshRevealCallback) (void *cls,
                                          unsigned int http_status,
-                                        enum TALER_ErrorCode ec,
+                                         enum TALER_ErrorCode ec,
                                          unsigned int num_coins,
+                                         /* TODO (#5777): possibly replace
+                                            by a `struct 
TALER_RefreshPlanchetSecretsP` */
                                          const struct 
TALER_CoinSpendPrivateKeyP *coin_privs,
                                          const struct 
TALER_DenominationSignature *sigs,
                                          const json_t *full_response);
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 2753b36c..20641002 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -1950,6 +1950,8 @@ TALER_TESTING_get_trait_uint
 /**
  * Information about a fresh coin generated by the refresh
  * operation. FIXME: should go away from here!
+ *
+ * FIXME: should be renamed, easily confused with `struct TALER_FreshCoin`!
  */
 struct FreshCoin
 {
diff --git a/src/lib/testing_api_cmd_refresh.c 
b/src/lib/testing_api_cmd_refresh.c
index 3a4de783..3fb52d83 100644
--- a/src/lib/testing_api_cmd_refresh.c
+++ b/src/lib/testing_api_cmd_refresh.c
@@ -799,7 +799,7 @@ do_melt_retry (void *cls)
 static void
 melt_cb (void *cls,
          unsigned int http_status,
-        enum TALER_ErrorCode ec,
+         enum TALER_ErrorCode ec,
          uint32_t noreveal_index,
          const struct TALER_ExchangePublicKeyP *exchange_pub,
          const json_t *full_response)
@@ -1201,6 +1201,17 @@ refresh_reveal_traits (void *cls,
     traits[(num_coins * 2) + i]
       = TALER_TESTING_make_trait_denom_sig
         (i, &rrs->fresh_coins[i].sig);
+#if 0
+  /* FIXME: need *some* trait for #5777 here, but we don't have
+     the blinding keys at hand, and #5777 asks for the transfer
+     private keys, which according to bugnote 14690 is a bad idea.
+     So what should we do here? */
+  /* blinding key traits */
+  for (unsigned int i=0; i<num_coins; i++)
+    traits[(num_coins * 3) + i]
+      = TALER_TESTING_make_trait_blinding_key (i,
+                                               
&rrs->fresh_coins[i].blinding_key),
+#endif
 
   /* number of fresh coins */
   traits[(num_coins * 3)] = TALER_TESTING_make_trait_uint

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



reply via email to

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