oops, first parse JSON

This commit is contained in:
Florian Dold 2019-06-27 00:47:42 +02:00
parent 19e0b66f87
commit 7cce2fd62c
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -113,13 +113,6 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
GNUNET_JSON_spec_end () 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 != if (GNUNET_OK !=
GNUNET_JSON_parse (wire_s, GNUNET_JSON_parse (wire_s,
spec, spec,
@ -128,6 +121,14 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
GNUNET_break_op (0); GNUNET_break_op (0);
return GNUNET_SYSERR; 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, return TALER_exchange_wire_signature_check (payto_url,
master_pub, master_pub,
&master_sig); &master_sig);