summaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-01 23:00:06 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-01 23:00:06 +0200
commitb21705882156f73c6623f76b719fcaadc3d26555 (patch)
treeea2dbddc17b8e465d03aa4e4d967ee00134ebc0f /src/exchange-lib
parentfdec8e482e67b49b54c212e07bf3d17ea61960d3 (diff)
downloadexchange-b21705882156f73c6623f76b719fcaadc3d26555.tar.gz
exchange-b21705882156f73c6623f76b719fcaadc3d26555.tar.bz2
exchange-b21705882156f73c6623f76b719fcaadc3d26555.zip
add version to keydata returned by libtalerexchange (#5035)
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/exchange_api_handle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c
index 1caa6962d..6ed868f74 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -503,7 +503,10 @@ decode_keys_json (const json_t *resp_obj,
hash_context = GNUNET_CRYPTO_hash_context_start ();
/* parse the master public key and issue date of the response */
{
+ const char *ver;
struct GNUNET_JSON_Specification spec[] = {
+ GNUNET_JSON_spec_string ("version",
+ &ver),
GNUNET_JSON_spec_fixed_auto ("master_public_key",
&key_data->master_pub),
GNUNET_JSON_spec_fixed_auto ("eddsa_sig",
@@ -519,6 +522,7 @@ decode_keys_json (const json_t *resp_obj,
GNUNET_JSON_parse (resp_obj,
spec,
NULL, NULL));
+ key_data->version = GNUNET_strdup (ver);
}
/* parse the signing keys */
@@ -643,6 +647,8 @@ free_key_data (struct TALER_EXCHANGE_Keys *key_data)
GNUNET_array_grow (key_data->auditors,
key_data->num_auditors,
0);
+ GNUNET_free_non_null (key_data->version);
+ key_data->version = NULL;
}