diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2022-04-17 04:59:01 -0400 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2022-04-17 04:59:01 -0400 |
commit | 0bd63c1394e73d4eba97145724e953d16d3029c0 (patch) | |
tree | aae880d9187f7b711067236ea2900e964919a093 /src/lib/merchant_api_post_order_pay.c | |
parent | 58f1ae25c69e0e378af2c45b929c8bbf7d5c1b2a (diff) | |
download | merchant-0bd63c1394e73d4eba97145724e953d16d3029c0.tar.gz merchant-0bd63c1394e73d4eba97145724e953d16d3029c0.tar.bz2 merchant-0bd63c1394e73d4eba97145724e953d16d3029c0.zip |
Use new exchange funcs: TALER_merchant_pay_{sign,verify}
* src/backend/taler-merchant-httpd_post-orders-ID-paid.c
(TMH_post_orders_ID_paid): Rework to use ‘TALER_merchant_pay_verify’.
* src/backend/taler-merchant-httpd_post-orders-ID-pay.c
(execute_pay_transaction): Rework to use ‘TALER_merchant_pay_sign’.
* src/lib/merchant_api_post_order_pay.c
(handle_pay_finished): Rework to use ‘TALER_merchant_pay_verify’.
Diffstat (limited to 'src/lib/merchant_api_post_order_pay.c')
-rw-r--r-- | src/lib/merchant_api_post_order_pay.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/merchant_api_post_order_pay.c b/src/lib/merchant_api_post_order_pay.c index fc188a98..c246a1d4 100644 --- a/src/lib/merchant_api_post_order_pay.c +++ b/src/lib/merchant_api_post_order_pay.c @@ -265,11 +265,6 @@ handle_pay_finished (void *cls, if (oph->am_wallet) { /* Here we can (and should) verify the merchant's signature */ - struct TALER_PaymentResponsePS pr = { - .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_PAYMENT_OK), - .purpose.size = htonl (sizeof (pr)), - .h_contract_terms = oph->h_contract_terms - }; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("sig", &merchant_sig), @@ -289,10 +284,9 @@ handle_pay_finished (void *cls, } if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_PAYMENT_OK, - &pr, - &merchant_sig.eddsa_sig, - &oph->merchant_pub.eddsa_pub)) + TALER_merchant_pay_verify (&oph->h_contract_terms, + &oph->merchant_pub, + &merchant_sig)) { GNUNET_break_op (0); hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; |