summaryrefslogtreecommitdiff
path: root/src/json/json_wire.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json/json_wire.c')
-rw-r--r--src/json/json_wire.c78
1 files changed, 2 insertions, 76 deletions
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 8f7fd6bb6..9d22d28ea 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -26,10 +26,10 @@
enum GNUNET_GenericReturnValue
TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
- struct TALER_MerchantWireHash *hc)
+ struct TALER_MerchantWireHashP *hc)
{
const char *payto_uri;
- struct TALER_WireSalt salt;
+ struct TALER_WireSaltP salt;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("payto_uri",
&payto_uri),
@@ -70,80 +70,6 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
}
-enum GNUNET_GenericReturnValue
-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;
- 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_end ()
- };
-
- if (GNUNET_OK !=
- GNUNET_JSON_parse (wire_s,
- spec,
- NULL, NULL))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
-
- {
- char *err;
-
- err = TALER_payto_validate (payto_uri);
- if (NULL != err)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "URI `%s' ill-formed: %s\n",
- payto_uri,
- err);
- GNUNET_free (err);
- return GNUNET_SYSERR;
- }
- }
-
- return TALER_exchange_wire_signature_check (payto_uri,
- master_pub,
- &master_sig);
-}
-
-
-json_t *
-TALER_JSON_exchange_wire_signature_make (
- const char *payto_uri,
- const struct TALER_MasterPrivateKeyP *master_priv)
-{
- struct TALER_MasterSignatureP master_sig;
- char *err;
-
- if (NULL !=
- (err = TALER_payto_validate (payto_uri)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Invalid payto URI `%s': %s\n",
- payto_uri,
- err);
- GNUNET_free (err);
- return NULL;
- }
- TALER_exchange_wire_signature_make (payto_uri,
- master_priv,
- &master_sig);
- return GNUNET_JSON_PACK (
- GNUNET_JSON_pack_string ("payto_uri",
- payto_uri),
- GNUNET_JSON_pack_data_auto ("master_sig",
- &master_sig));
-}
-
-
char *
TALER_JSON_wire_to_payto (const json_t *wire_s)
{