diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-04-01 23:43:55 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-04-01 23:43:55 +0200 |
commit | b293bda4acfe01f6254670779b8ac97e8b55990c (patch) | |
tree | bdbabdacf686d5529218b84ec18ee09ea251994c /src/exchange-lib | |
parent | c329b92ccf1c461e4032e75164b6ffa6bb509a69 (diff) | |
download | exchange-b293bda4acfe01f6254670779b8ac97e8b55990c.tar.xz |
implement DB plugin function to obtain reserve information, migrate logic to simplified API spec (#3887); use plugin API in /payback DB implementation
Diffstat (limited to 'src/exchange-lib')
-rw-r--r-- | src/exchange-lib/exchange_api_payback.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/exchange-lib/exchange_api_payback.c b/src/exchange-lib/exchange_api_payback.c index 600e0d682..b08fe3b68 100644 --- a/src/exchange-lib/exchange_api_payback.c +++ b/src/exchange-lib/exchange_api_payback.c @@ -95,14 +95,13 @@ verify_payback_signature_ok (const struct TALER_EXCHANGE_PaybackHandle *ph, struct TALER_ExchangeSignatureP exchange_sig; struct TALER_Amount amount; struct GNUNET_TIME_Absolute deadline; - const char *wire_subject; const struct TALER_EXCHANGE_Keys *key_state; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("exchange_sig", &exchange_sig), GNUNET_JSON_spec_fixed_auto ("exchange_pub", &exchange_pub), TALER_JSON_spec_amount ("amount", &amount), GNUNET_JSON_spec_absolute_time ("payback_deadline", &deadline), - GNUNET_JSON_spec_string ("wire_subject", &wire_subject), + GNUNET_JSON_spec_fixed_auto ("reserve_pub", &pc.reserve_pub), GNUNET_JSON_spec_end() }; @@ -128,9 +127,6 @@ verify_payback_signature_ok (const struct TALER_EXCHANGE_PaybackHandle *ph, TALER_amount_hton (&pc.payback_amount, &amount); pc.coin_pub = ph->coin_pub; - GNUNET_CRYPTO_hash (wire_subject, - strlen (wire_subject), - &pc.h_wire_subject); if (GNUNET_OK != GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_CONFIRM_PAYBACK, &pc.purpose, @@ -145,7 +141,7 @@ verify_payback_signature_ok (const struct TALER_EXCHANGE_PaybackHandle *ph, TALER_EC_NONE, &amount, deadline, - wire_subject, + &pc.reserve_pub, json); return GNUNET_OK; } |