summaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-09 16:11:04 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-09 16:11:04 +0200
commitd8922f82e5f6853c35a8a282e51471da908bdacf (patch)
tree191edb2430ea64987258dfd423051b4ae1db6c22 /src/json
parent676ccdc06589d4af329d016c04d79d71697092d1 (diff)
downloadexchange-d8922f82e5f6853c35a8a282e51471da908bdacf.tar.gz
exchange-d8922f82e5f6853c35a8a282e51471da908bdacf.tar.bz2
exchange-d8922f82e5f6853c35a8a282e51471da908bdacf.zip
-introduce 'struct TALER_WireSalt'
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json_wire.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index e8620728a..7ec21da65 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2018 Taler Systems SA
+ Copyright (C) 2018, 2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -37,13 +37,12 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
struct GNUNET_HashCode *hc)
{
const char *payto_uri;
- const char *salt;
- /* Current merchant backend will always make the salt
- a `struct GNUNET_HashCode`, but *we* do not insist
- on that. */
+ struct TALER_WireSalt salt;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("payto_uri", &payto_uri),
- GNUNET_JSON_spec_string ("salt", &salt),
+ GNUNET_JSON_spec_string ("payto_uri",
+ &payto_uri),
+ GNUNET_JSON_spec_fixed_auto ("salt",
+ &salt),
GNUNET_JSON_spec_end ()
};
@@ -73,7 +72,7 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
}
}
TALER_merchant_wire_signature_hash (payto_uri,
- salt,
+ &salt,
hc);
return GNUNET_OK;
}
@@ -95,8 +94,10 @@ TALER_JSON_exchange_wire_signature_check (
const char *payto_uri;
struct TALER_MasterSignatureP master_sig;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("payto_uri", &payto_uri),
- GNUNET_JSON_spec_fixed_auto ("master_sig", &master_sig),
+ GNUNET_JSON_spec_string ("payto_uri",
+ &payto_uri),
+ GNUNET_JSON_spec_fixed_auto ("master_sig",
+ &master_sig),
GNUNET_JSON_spec_end ()
};