diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-03-24 13:06:04 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-03-24 13:06:04 +0100 |
commit | c782dfe2aadfd06e47ed354c1fb389fecc715433 (patch) | |
tree | a6acef08f5e15db421c20daf8ca0d1b35a581a21 /src/util | |
parent | 6ffc2c68a3af1a4321a8fcc7c1147b4967fabd68 (diff) |
first draft of service API for p2p payments
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/wallet_signatures.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c index 097b8ed8a..756856d2a 100644 --- a/src/util/wallet_signatures.c +++ b/src/util/wallet_signatures.c @@ -902,11 +902,17 @@ struct TALER_PurseDepositPS */ struct TALER_PurseContractPublicKeyP purse_pub; + /** + * Hash of the base URL of the exchange hosting the + * @e purse_pub. + */ + struct GNUNET_HashCode h_exchange_base_url; }; void TALER_wallet_purse_deposit_sign ( + const char *exchange_base_url, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_Amount *amount, const struct TALER_CoinSpendPrivateKeyP *coin_priv, @@ -918,6 +924,9 @@ TALER_wallet_purse_deposit_sign ( .purse_pub = *purse_pub, }; + GNUNET_CRYPTO_hash (exchange_base_url, + strlen (exchange_base_url) + 1, + &pm.h_exchange_base_url); TALER_amount_hton (&pm.coin_amount, amount); GNUNET_CRYPTO_eddsa_sign (&coin_priv->eddsa_priv, @@ -928,6 +937,7 @@ TALER_wallet_purse_deposit_sign ( enum GNUNET_GenericReturnValue TALER_wallet_purse_deposit_verify ( + const char *exchange_base_url, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_Amount *amount, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -939,6 +949,9 @@ TALER_wallet_purse_deposit_verify ( .purse_pub = *purse_pub, }; + GNUNET_CRYPTO_hash (exchange_base_url, + strlen (exchange_base_url) + 1, + &pm.h_exchange_base_url); TALER_amount_hton (&pm.coin_amount, amount); return GNUNET_CRYPTO_eddsa_verify ( |