summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-05 21:33:30 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-05 21:33:30 +0100
commite0b62b0a49672bd259ed47c9448b78c9be8823f7 (patch)
treec4c78b825f88ed6c01b2b2b5b9f78970f3a75f7a /src/exchange
parent719779577a4c336126f0bbb77f947ea892a3cdd3 (diff)
downloadexchange-e0b62b0a49672bd259ed47c9448b78c9be8823f7.tar.gz
exchange-e0b62b0a49672bd259ed47c9448b78c9be8823f7.tar.bz2
exchange-e0b62b0a49672bd259ed47c9448b78c9be8823f7.zip
towards offline tool uploading /management/keys
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-httpd_management_post_keys.c40
1 files changed, 13 insertions, 27 deletions
diff --git a/src/exchange/taler-exchange-httpd_management_post_keys.c b/src/exchange/taler-exchange-httpd_management_post_keys.c
index 43ca5f8c..cc52f5cf 100644
--- a/src/exchange/taler-exchange-httpd_management_post_keys.c
+++ b/src/exchange/taler-exchange-httpd_management_post_keys.c
@@ -164,34 +164,20 @@ add_keys (void *cls,
/* check signature is valid */
{
- struct TALER_DenominationKeyValidityPS dkv = {
- .purpose.purpose = htonl (
- TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY),
- .purpose.size = htonl (sizeof (dkv)),
- .master = TEH_master_public_key,
- .start = GNUNET_TIME_absolute_hton (meta.start),
- .expire_withdraw = GNUNET_TIME_absolute_hton (meta.expire_withdraw),
- .expire_deposit = GNUNET_TIME_absolute_hton (meta.expire_deposit),
- .expire_legal = GNUNET_TIME_absolute_hton (meta.expire_legal),
- .denom_hash = akc->d_sigs[i].h_denom_pub
- };
-
- TALER_amount_hton (&dkv.value,
- &meta.value);
- TALER_amount_hton (&dkv.fee_withdraw,
- &meta.fee_withdraw);
- TALER_amount_hton (&dkv.fee_deposit,
- &meta.fee_deposit);
- TALER_amount_hton (&dkv.fee_refresh,
- &meta.fee_refresh);
- TALER_amount_hton (&dkv.fee_refund,
- &meta.fee_refund);
if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (
- TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY,
- &dkv,
- &akc->d_sigs[i].master_sig.eddsa_signature,
- &TEH_master_public_key.eddsa_pub))
+ TALER_exchange_offline_denomkey_validity_verify (
+ &akc->d_sigs[i].h_denom_pub,
+ meta.start,
+ meta.expire_withdraw,
+ meta.expire_deposit,
+ meta.expire_legal,
+ &meta.value,
+ &meta.fee_withdraw,
+ &meta.fee_deposit,
+ &meta.fee_refresh,
+ &meta.fee_refund,
+ &TEH_master_public_key,
+ &akc->d_sigs[i].master_sig))
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (