From 4a36ed7fbfcaa220d1b2605851b38fc1a386e7d3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 2 Oct 2022 22:47:28 +0200 Subject: complete taler-exchange-httpd_reserves_open.c logic (first pass, still without DB logic or tests) --- src/util/wallet_signatures.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/util') diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c index 4e4932a2b..c57506bd8 100644 --- a/src/util/wallet_signatures.c +++ b/src/util/wallet_signatures.c @@ -1342,14 +1342,9 @@ struct TALER_ReserveOpenDepositPS struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * When was the request created. - */ - struct GNUNET_TIME_TimestampNBO request_timestamp; - - /** - * Which reserve's opening should be paid for? + * Which reserve's opening signature should be paid for? */ - struct TALER_ReservePublicKeyP reserve_pub; + struct TALER_ReserveSignatureP reserve_sig; /** * Specifies how much of the coin's value should be spent on opening this @@ -1364,16 +1359,14 @@ GNUNET_NETWORK_STRUCT_END void TALER_wallet_reserve_open_deposit_sign ( const struct TALER_Amount *coin_contribution, - const struct TALER_ReservePublicKeyP *reserve_pub, - struct GNUNET_TIME_Timestamp request_timestamp, + const struct TALER_ReserveSignatureP *reserve_sig, const struct TALER_CoinSpendPrivateKeyP *coin_priv, struct TALER_CoinSpendSignatureP *coin_sig) { struct TALER_ReserveOpenDepositPS rod = { .purpose.size = htonl (sizeof (rod)), .purpose.purpose = htonl (TALER_SIGNATURE_WALLET_RESERVE_OPEN_DEPOSIT), - .request_timestamp = GNUNET_TIME_timestamp_hton (request_timestamp), - .reserve_pub = *reserve_pub + .reserve_sig = *reserve_sig }; TALER_amount_hton (&rod.coin_contribution, @@ -1388,16 +1381,14 @@ TALER_wallet_reserve_open_deposit_sign ( enum GNUNET_GenericReturnValue TALER_wallet_reserve_open_deposit_verify ( const struct TALER_Amount *coin_contribution, - const struct TALER_ReservePublicKeyP *reserve_pub, - struct GNUNET_TIME_Timestamp request_timestamp, + const struct TALER_ReserveSignatureP *reserve_sig, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendSignatureP *coin_sig) { struct TALER_ReserveOpenDepositPS rod = { .purpose.size = htonl (sizeof (rod)), .purpose.purpose = htonl (TALER_SIGNATURE_WALLET_RESERVE_OPEN_DEPOSIT), - .request_timestamp = GNUNET_TIME_timestamp_hton (request_timestamp), - .reserve_pub = *reserve_pub + .reserve_sig = *reserve_sig }; TALER_amount_hton (&rod.coin_contribution, -- cgit v1.2.3