gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: matching /refund re


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: matching /refund response against merchant pub too
Date: Tue, 04 Jul 2017 19:43:57 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 333ba7c  matching /refund response against merchant pub too
333ba7c is described below

commit 333ba7c144a3037240df56e7fbfc2ad5423bd4ec
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jul 4 19:43:38 2017 +0200

    matching /refund response against merchant pub too
---
 src/lib/test_merchant_api.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 5482918..b52349d 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -1248,12 +1248,15 @@ refund_lookup_cb (void *cls,
   struct TALER_Amount coin_amount;
   struct TALER_CoinSpendPublicKeyP coin_pub;
   struct TALER_CoinSpendPublicKeyP resp_coin_pub;
+  struct GNUNET_CRYPTO_EddsaPublicKey merchant_pub;
+  struct GNUNET_CRYPTO_EddsaPublicKey resp_merchant_pub;
   struct json_t *resp_element;
   const char *error_name;
   unsigned int error_line;
 
   struct GNUNET_JSON_Specification spec[] = {
    GNUNET_JSON_spec_fixed_auto ("coin_pub", &resp_coin_pub),
+   GNUNET_JSON_spec_fixed_auto ("merchant_pub", &resp_merchant_pub),
    TALER_JSON_spec_amount ("refund_amount", &resp_refund_amount),
    TALER_JSON_spec_amount ("refund_fee", &resp_refund_fee),
    GNUNET_JSON_spec_end ()  
@@ -1307,6 +1310,9 @@ refund_lookup_cb (void *cls,
                                                  spec,
                                                  &error_name,
                                                  &error_line));
+  GNUNET_CRYPTO_eddsa_key_get_public (instance_priv,
+                                      &merchant_pub);
+
   if (0 != memcmp (&refund_amount,
                    &resp_refund_amount,
                    sizeof (struct TALER_Amount)) ||
@@ -1315,7 +1321,10 @@ refund_lookup_cb (void *cls,
                    sizeof (struct TALER_Amount)) ||
       0 != memcmp (&coin_pub,
                    &resp_coin_pub,
-                   sizeof (struct TALER_CoinSpendPublicKeyP)))
+                   sizeof (struct TALER_CoinSpendPublicKeyP)) ||
+      0 != memcmp (&merchant_pub,
+                   &resp_merchant_pub,
+                   sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
                 "Bad refund given\n");

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]