summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-08 15:46:51 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-08 15:46:51 +0200
commit97dfbec0811b1a0b92618f195e228c43376e4828 (patch)
tree38cd327fcc2a7113dfcdd53b627152f82b7a6a32 /src/lib
parent1ca062fc7a303202130f194a15739ea7ce6c2dc2 (diff)
downloadexchange-97dfbec0811b1a0b92618f195e228c43376e4828.tar.gz
exchange-97dfbec0811b1a0b92618f195e228c43376e4828.tar.bz2
exchange-97dfbec0811b1a0b92618f195e228c43376e4828.zip
add h_denom_pub to deposit signatures
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_common.c2
-rw-r--r--src/lib/exchange_api_deposit.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 52c0e20ac..27dbbb86c 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -523,6 +523,8 @@ TALER_EXCHANGE_verify_coin_history (
&dr.h_contract_terms),
GNUNET_JSON_spec_fixed_auto ("h_wire",
&dr.h_wire),
+ GNUNET_JSON_spec_fixed_auto ("h_denom_pub",
+ &dr.h_denom_pub),
TALER_JSON_spec_absolute_time_nbo ("timestamp",
&dr.wallet_timestamp),
TALER_JSON_spec_absolute_time_nbo ("refund_deadline",
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c
index bb56ce1c9..ba3ba48e0 100644
--- a/src/lib/exchange_api_deposit.c
+++ b/src/lib/exchange_api_deposit.c
@@ -432,6 +432,7 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
.purpose.size = htonl (sizeof (dr)),
.h_contract_terms = *h_contract_terms,
.h_wire = *h_wire,
+ .h_denom_pub = *denom_pub_hash,
.wallet_timestamp = GNUNET_TIME_absolute_hton (timestamp),
.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline),
.merchant = *merchant_pub,
@@ -497,6 +498,7 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
* @param deposit_fee the deposit fee we expect to pay
* @param h_wire hash of the merchant’s account details
* @param h_contract_terms hash of the contact of the merchant with the customer (further details are never disclosed to the exchange)
+ * @param h_denom_pub hash of the coin denomination's public key
* @param coin_priv coin’s private key
* @param wallet_timestamp timestamp when the contract was finalized, must not be too far in the future
* @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests)
@@ -509,6 +511,7 @@ TALER_EXCHANGE_deposit_permission_sign (
const struct TALER_Amount *deposit_fee,
const struct GNUNET_HashCode *h_wire,
const struct GNUNET_HashCode *h_contract_terms,
+ const struct GNUNET_HashCode *h_denom_pub,
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
struct GNUNET_TIME_Absolute wallet_timestamp,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -522,6 +525,7 @@ TALER_EXCHANGE_deposit_permission_sign (
(TALER_SIGNATURE_WALLET_COIN_DEPOSIT),
.h_contract_terms = *h_contract_terms,
.h_wire = *h_wire,
+ .h_denom_pub = *h_denom_pub,
.wallet_timestamp = GNUNET_TIME_absolute_hton (wallet_timestamp),
.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline),
.merchant = *merchant_pub