aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_handle.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-03-21 14:40:59 +0100
committerChristian Grothoff <christian@grothoff.org>2016-03-21 14:40:59 +0100
commit6a80c0bfa2da80a8f1efd600ee3c94f31d31b21d (patch)
tree42e06c619a46fb11bb602e94cb46707c40a93083 /src/exchange-lib/exchange_api_handle.c
parent3cb188e8a7ffa30a6b264355011f45f594725741 (diff)
parent553d6eb23e3ac1001dd6c4e0523cddb88bc5e723 (diff)
Merge branch 'master' of git+ssh://git.taler.net/var/git/exchange
Diffstat (limited to 'src/exchange-lib/exchange_api_handle.c')
-rw-r--r--src/exchange-lib/exchange_api_handle.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c
index c3dd0d4cb..65597126c 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -360,16 +360,18 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor,
unsigned int len;
unsigned int off;
unsigned int i;
+ const char *auditor_url;
struct TALER_ExchangeKeyValidityPS kv;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("auditor_pub",
- &auditor->auditor_pub),
+ &auditor->auditor_pub),
+ GNUNET_JSON_spec_string ("auditor_url",
+ &auditor_url),
GNUNET_JSON_spec_json ("denomination_keys",
- &keys),
+ &keys),
GNUNET_JSON_spec_end()
};
- auditor->auditor_url = NULL; /* #3987 */
if (GNUNET_OK !=
GNUNET_JSON_parse (auditor_obj,
spec,
@@ -378,8 +380,12 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
+ auditor->auditor_url = GNUNET_strdup (auditor_url);
kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS);
kv.purpose.size = htonl (sizeof (struct TALER_ExchangeKeyValidityPS));
+ GNUNET_CRYPTO_hash (auditor_url,
+ strlen (auditor_url) + 1,
+ &kv.auditor_url_hash);
kv.master = key_data->master_pub;
len = json_array_size (keys);
auditor->denom_keys = GNUNET_new_array (len,