diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-12-11 13:48:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-12-11 13:48:44 +0100 |
commit | 58983d7455dd0529be0b7e6ba599845956c75ea4 (patch) | |
tree | ef8816e298d4c4d144dfe11044457763ab4be7af /src/exchange/taler-exchange-httpd_keys.c | |
parent | e682f4213e4798593fcbc39b778d231be35bf6f9 (diff) |
add asset_type to /keys response
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_keys.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c index b37c68d9..b11832e7 100644 --- a/src/exchange/taler-exchange-httpd_keys.c +++ b/src/exchange/taler-exchange-httpd_keys.c @@ -457,6 +457,11 @@ static struct GNUNET_SCHEDULER_Task *keys_tt; static struct GNUNET_TIME_Relative signkey_legal_duration; /** + * What type of asset are we dealing with here? + */ +static char *asset_type; + +/** * RSA security module public key, all zero if not known. */ static struct TALER_SecurityModulePublicKeyP denom_rsa_sm_pub; @@ -1279,6 +1284,17 @@ TEH_keys_init () "SIGNKEY_LEGAL_DURATION"); return GNUNET_SYSERR; } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (TEH_cfg, + "exchange", + "ASSET_TYPE", + &asset_type)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, + "exchange", + "ASSET_TYPE"); + asset_type = GNUNET_strdup ("fiat"); + } keys_eh = TEH_plugin->event_listen (TEH_plugin->cls, GNUNET_TIME_UNIT_FOREVER_REL, &es, @@ -1856,6 +1872,8 @@ create_krd (struct TEH_KeyStateHandle *ksh, TEH_base_url), GNUNET_JSON_pack_string ("currency", TEH_currency), + GNUNET_JSON_pack_string ("asset_type", + asset_type), GNUNET_JSON_pack_data_auto ("master_public_key", &TEH_master_public_key), GNUNET_JSON_pack_time_rel ("reserve_closing_delay", |