summaryrefslogtreecommitdiff
path: root/src/json/json_wire.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-19 22:31:00 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-19 22:31:00 +0200
commitab752e95910fe5a077be9e4807b2d8536ce3fc70 (patch)
treed4faf0f7e59fc7ad2cfee65ccc99f8e58a93d2c7 /src/json/json_wire.c
parent7a46b3fb1a177506dcc5b462df8a1d2a9c5b99c5 (diff)
downloadexchange-ab752e95910fe5a077be9e4807b2d8536ce3fc70.tar.gz
exchange-ab752e95910fe5a077be9e4807b2d8536ce3fc70.tar.bz2
exchange-ab752e95910fe5a077be9e4807b2d8536ce3fc70.zip
also validate merchant IBANs before signing
Diffstat (limited to 'src/json/json_wire.c')
-rw-r--r--src/json/json_wire.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 8fd99ab6d..f05808194 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -414,6 +414,11 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
+ if (GNUNET_SYSERR == validate_payto (payto_uri))
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
TALER_merchant_wire_signature_hash (payto_uri,
salt,
hc);
@@ -430,9 +435,9 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
* @return #GNUNET_OK if signature is valid
*/
int
-TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
- const struct
- TALER_MasterPublicKeyP *master_pub)
+TALER_JSON_exchange_wire_signature_check (
+ const json_t *wire_s,
+ const struct TALER_MasterPublicKeyP *master_pub)
{
const char *payto_uri;
struct TALER_MasterSignatureP master_sig;
@@ -471,9 +476,9 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
* @return NULL if @a payto_uri is malformed
*/
json_t *
-TALER_JSON_exchange_wire_signature_make (const char *payto_uri,
- const struct
- TALER_MasterPrivateKeyP *master_priv)
+TALER_JSON_exchange_wire_signature_make (
+ const char *payto_uri,
+ const struct TALER_MasterPrivateKeyP *master_priv)
{
struct TALER_MasterSignatureP master_sig;