summaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-06-27 00:47:42 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-06-27 00:47:42 +0200
commit7cce2fd62c010bd32f698d474f21d06fc2f32f58 (patch)
tree66e0d674568a013ed29baaeaca5ddf31e27c7e6d /src/json
parent19e0b66f8780f97f15f0a40a739eb277244750f1 (diff)
downloadexchange-7cce2fd62c010bd32f698d474f21d06fc2f32f58.tar.gz
exchange-7cce2fd62c010bd32f698d474f21d06fc2f32f58.tar.bz2
exchange-7cce2fd62c010bd32f698d474f21d06fc2f32f58.zip
oops, first parse JSON
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json_wire.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 0ce4aa8b..91e502c1 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -113,13 +113,6 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
GNUNET_JSON_spec_end ()
};
- if (0 != GNUNET_memcmp (&master_pub_from_wire, master_pub))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "wire signature has an unexpected master public key\n");
- return GNUNET_SYSERR;
- }
-
if (GNUNET_OK !=
GNUNET_JSON_parse (wire_s,
spec,
@@ -128,6 +121,14 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
+
+ if (0 != GNUNET_memcmp (&master_pub_from_wire, master_pub))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "wire signature has an unexpected master public key\n");
+ return GNUNET_SYSERR;
+ }
+
return TALER_exchange_wire_signature_check (payto_url,
master_pub,
&master_sig);