gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (370ee3a4 -> 4199e443)


From: gnunet
Subject: [taler-exchange] branch master updated (370ee3a4 -> 4199e443)
Date: Sat, 07 May 2022 23:21:41 +0200

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

grothoff pushed a change to branch master
in repository exchange.

    from 370ee3a4 -fix leaks
     new 8c9d5d61 document required packages
     new 4199e443 rename function that is for the merchant signature to have 
merchant in the name

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/pp/README                                |  2 +-
 contrib/tos/README                               |  2 +-
 src/exchange/taler-exchange-httpd_deposits_get.c |  2 +-
 src/include/taler_crypto_lib.h                   |  4 +-
 src/lib/exchange_api_deposits_get.c              |  2 +-
 src/util/exchange_signatures.c                   | 88 ------------------------
 src/util/merchant_signatures.c                   | 88 ++++++++++++++++++++++++
 7 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/contrib/pp/README b/contrib/pp/README
index e03b8a05..17a17c58 100644
--- a/contrib/pp/README
+++ b/contrib/pp/README
@@ -9,7 +9,7 @@ Generating a new Privacy Policy requires Sphinx, LaTeX with 
babel
 packages for all supported languages.  On Debian, you should
 at least install:
 
-$ apt install python3-sphinx sphinx-intl texlive-lang-german 
texlive-lang-english
+$ apt install python3-sphinx sphinx-intl texlive-lang-german 
texlive-lang-english latexmk texlive-latex-recommended texlive-latex-extra
 
 (NOTE: List may be incomplete.)
 
diff --git a/contrib/tos/README b/contrib/tos/README
index fde5305b..dd78024c 100644
--- a/contrib/tos/README
+++ b/contrib/tos/README
@@ -9,7 +9,7 @@ Generating new Terms of Service requires Sphinx, LaTeX with 
babel
 packages for all supported languages.  On Debian, you should
 at least install:
 
-$ apt install python3-sphinx sphinx-intl texlive-lang-german 
texlive-lang-english
+$ apt install python3-sphinx sphinx-intl texlive-lang-german 
texlive-lang-english latexmk texlive-latex-recommended texlive-latex-extra
 
 (NOTE: List may be incomplete.)
 
diff --git a/src/exchange/taler-exchange-httpd_deposits_get.c 
b/src/exchange/taler-exchange-httpd_deposits_get.c
index 509b8a21..97618a94 100644
--- a/src/exchange/taler-exchange-httpd_deposits_get.c
+++ b/src/exchange/taler-exchange-httpd_deposits_get.c
@@ -329,7 +329,7 @@ TEH_handler_deposits_get (struct TEH_RequestContext *rc,
   TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA]++;
   {
     if (GNUNET_OK !=
-        TALER_exchange_deposit_verify (&ctx.merchant,
+        TALER_merchant_deposit_verify (&ctx.merchant,
                                        &ctx.coin_pub,
                                        &ctx.h_contract_terms,
                                        &ctx.h_wire,
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 3530f736..1ee080ab 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -3383,7 +3383,7 @@ TALER_merchant_refund_verify (
  * @param[out] merchant_sig where to write the signature
  */
 void
-TALER_exchange_deposit_sign (
+TALER_merchant_deposit_sign (
   const struct TALER_PrivateContractHashP *h_contract_terms,
   const struct TALER_MerchantWireHashP *h_wire,
   const struct TALER_CoinSpendPublicKeyP *coin_pub,
@@ -3402,7 +3402,7 @@ TALER_exchange_deposit_sign (
  * @return #GNUNET_OK if the signature is valid
  */
 enum GNUNET_GenericReturnValue
-TALER_exchange_deposit_verify (
+TALER_merchant_deposit_verify (
   const struct TALER_MerchantPublicKeyP *merchant,
   const struct TALER_CoinSpendPublicKeyP *coin_pub,
   const struct TALER_PrivateContractHashP *h_contract_terms,
diff --git a/src/lib/exchange_api_deposits_get.c 
b/src/lib/exchange_api_deposits_get.c
index 6a212de3..f7219f12 100644
--- a/src/lib/exchange_api_deposits_get.c
+++ b/src/lib/exchange_api_deposits_get.c
@@ -320,7 +320,7 @@ TALER_EXCHANGE_deposits_get (
   }
   GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv->eddsa_priv,
                                       &merchant.eddsa_pub);
-  TALER_exchange_deposit_sign (h_contract_terms,
+  TALER_merchant_deposit_sign (h_contract_terms,
                                h_wire,
                                coin_pub,
                                &merchant,
diff --git a/src/util/exchange_signatures.c b/src/util/exchange_signatures.c
index e211e16e..d6214ab3 100644
--- a/src/util/exchange_signatures.c
+++ b/src/util/exchange_signatures.c
@@ -23,94 +23,6 @@
 #include "taler_signatures.h"
 
 
-GNUNET_NETWORK_STRUCT_BEGIN
-
-/**
- * @brief Format used to generate the signature on a request to obtain
- * the wire transfer identifier associated with a deposit.
- */
-struct TALER_DepositTrackPS
-{
-  /**
-   * Purpose must be #TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION.
-   */
-  struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-
-  /**
-   * Hash over the proposal data of the contract for which this deposit is 
made.
-   */
-  struct TALER_PrivateContractHashP h_contract_terms GNUNET_PACKED;
-
-  /**
-   * Hash over the wiring information of the merchant.
-   */
-  struct TALER_MerchantWireHashP h_wire GNUNET_PACKED;
-
-  /**
-   * The Merchant's public key.  The deposit inquiry request is to be
-   * signed by the corresponding private key (using EdDSA).
-   */
-  struct TALER_MerchantPublicKeyP merchant;
-
-  /**
-   * The coin's public key.  This is the value that must have been
-   * signed (blindly) by the Exchange.
-   */
-  struct TALER_CoinSpendPublicKeyP coin_pub;
-
-};
-
-GNUNET_NETWORK_STRUCT_END
-
-
-void
-TALER_exchange_deposit_sign (
-  const struct TALER_PrivateContractHashP *h_contract_terms,
-  const struct TALER_MerchantWireHashP *h_wire,
-  const struct TALER_CoinSpendPublicKeyP *coin_pub,
-  const struct TALER_MerchantPublicKeyP *merchant_pub,
-  const struct TALER_MerchantPrivateKeyP *merchant_priv,
-  struct TALER_MerchantSignatureP *merchant_sig)
-{
-  struct TALER_DepositTrackPS dtp = {
-    .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION),
-    .purpose.size = htonl (sizeof (dtp)),
-    .h_contract_terms = *h_contract_terms,
-    .h_wire = *h_wire,
-    .merchant = *merchant_pub,
-    .coin_pub = *coin_pub
-  };
-  GNUNET_CRYPTO_eddsa_sign (&merchant_priv->eddsa_priv,
-                            &dtp,
-                            &merchant_sig->eddsa_sig);
-}
-
-
-enum GNUNET_GenericReturnValue
-TALER_exchange_deposit_verify (
-  const struct TALER_MerchantPublicKeyP *merchant,
-  const struct TALER_CoinSpendPublicKeyP *coin_pub,
-  const struct TALER_PrivateContractHashP *h_contract_terms,
-  const struct TALER_MerchantWireHashP *h_wire,
-  const struct TALER_MerchantSignatureP *merchant_sig)
-{
-  struct TALER_DepositTrackPS tps = {
-    .purpose.size = htonl (sizeof (tps)),
-    .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION),
-    .merchant = *merchant,
-    .coin_pub = *coin_pub,
-    .h_contract_terms = *h_contract_terms,
-    .h_wire = *h_wire
-  };
-
-  return
-    GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION,
-                                &tps,
-                                &merchant_sig->eddsa_sig,
-                                &tps.merchant.eddsa_pub);
-}
-
-
 GNUNET_NETWORK_STRUCT_BEGIN
 
 /**
diff --git a/src/util/merchant_signatures.c b/src/util/merchant_signatures.c
index 1ad94e00..112f9225 100644
--- a/src/util/merchant_signatures.c
+++ b/src/util/merchant_signatures.c
@@ -23,6 +23,94 @@
 #include "taler_signatures.h"
 
 
+GNUNET_NETWORK_STRUCT_BEGIN
+
+/**
+ * @brief Format used to generate the signature on a request to obtain
+ * the wire transfer identifier associated with a deposit.
+ */
+struct TALER_DepositTrackPS
+{
+  /**
+   * Purpose must be #TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION.
+   */
+  struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+  /**
+   * Hash over the proposal data of the contract for which this deposit is 
made.
+   */
+  struct TALER_PrivateContractHashP h_contract_terms GNUNET_PACKED;
+
+  /**
+   * Hash over the wiring information of the merchant.
+   */
+  struct TALER_MerchantWireHashP h_wire GNUNET_PACKED;
+
+  /**
+   * The Merchant's public key.  The deposit inquiry request is to be
+   * signed by the corresponding private key (using EdDSA).
+   */
+  struct TALER_MerchantPublicKeyP merchant;
+
+  /**
+   * The coin's public key.  This is the value that must have been
+   * signed (blindly) by the Exchange.
+   */
+  struct TALER_CoinSpendPublicKeyP coin_pub;
+
+};
+
+GNUNET_NETWORK_STRUCT_END
+
+
+void
+TALER_merchant_deposit_sign (
+  const struct TALER_PrivateContractHashP *h_contract_terms,
+  const struct TALER_MerchantWireHashP *h_wire,
+  const struct TALER_CoinSpendPublicKeyP *coin_pub,
+  const struct TALER_MerchantPublicKeyP *merchant_pub,
+  const struct TALER_MerchantPrivateKeyP *merchant_priv,
+  struct TALER_MerchantSignatureP *merchant_sig)
+{
+  struct TALER_DepositTrackPS dtp = {
+    .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION),
+    .purpose.size = htonl (sizeof (dtp)),
+    .h_contract_terms = *h_contract_terms,
+    .h_wire = *h_wire,
+    .merchant = *merchant_pub,
+    .coin_pub = *coin_pub
+  };
+  GNUNET_CRYPTO_eddsa_sign (&merchant_priv->eddsa_priv,
+                            &dtp,
+                            &merchant_sig->eddsa_sig);
+}
+
+
+enum GNUNET_GenericReturnValue
+TALER_merchant_deposit_verify (
+  const struct TALER_MerchantPublicKeyP *merchant,
+  const struct TALER_CoinSpendPublicKeyP *coin_pub,
+  const struct TALER_PrivateContractHashP *h_contract_terms,
+  const struct TALER_MerchantWireHashP *h_wire,
+  const struct TALER_MerchantSignatureP *merchant_sig)
+{
+  struct TALER_DepositTrackPS tps = {
+    .purpose.size = htonl (sizeof (tps)),
+    .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION),
+    .merchant = *merchant,
+    .coin_pub = *coin_pub,
+    .h_contract_terms = *h_contract_terms,
+    .h_wire = *h_wire
+  };
+
+  return
+    GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION,
+                                &tps,
+                                &merchant_sig->eddsa_sig,
+                                &tps.merchant.eddsa_pub);
+}
+
+
 /**
  * @brief Format used to generate the signature on a request to refund
  * a coin into the account of the customer.

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