summaryrefslogtreecommitdiff
path: root/src/lib/auditor_api_deposit_confirmation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-04 20:29:18 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-04 20:29:18 +0100
commit6cceb617af887df49df74729bb1813bbd75a1346 (patch)
tree867616e235e6a1d84790f6c7c73f60900cbe2bb7 /src/lib/auditor_api_deposit_confirmation.c
parent9b290fb26b2d18725858508bc14ae0933fff0250 (diff)
downloadexchange-6cceb617af887df49df74729bb1813bbd75a1346.tar.gz
exchange-6cceb617af887df49df74729bb1813bbd75a1346.tar.bz2
exchange-6cceb617af887df49df74729bb1813bbd75a1346.zip
centralize (most) offline signing/verifying operations into offline_signatures.c
Diffstat (limited to 'src/lib/auditor_api_deposit_confirmation.c')
-rw-r--r--src/lib/auditor_api_deposit_confirmation.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/lib/auditor_api_deposit_confirmation.c b/src/lib/auditor_api_deposit_confirmation.c
index ff65036e..bea5a78a 100644
--- a/src/lib/auditor_api_deposit_confirmation.c
+++ b/src/lib/auditor_api_deposit_confirmation.c
@@ -208,27 +208,18 @@ verify_signatures (const struct GNUNET_HashCode *h_wire,
return GNUNET_SYSERR;
}
}
+ if (GNUNET_OK !=
+ TALER_exchange_offline_signkey_validity_verify (
+ exchange_pub,
+ ep_start,
+ ep_expire,
+ ep_end,
+ master_pub,
+ master_sig))
{
- struct TALER_ExchangeSigningKeyValidityPS sv = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY),
- .purpose.size = htonl (sizeof (sv)),
- .master_public_key = *master_pub,
- .start = GNUNET_TIME_absolute_hton (ep_start),
- .expire = GNUNET_TIME_absolute_hton (ep_expire),
- .end = GNUNET_TIME_absolute_hton (ep_end),
- .signkey_pub = *exchange_pub
- };
-
- if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY,
- &sv,
- &master_sig->eddsa_signature,
- &master_pub->eddsa_pub))
- {
- GNUNET_break (0);
- TALER_LOG_WARNING ("Invalid signature on exchange signing key!\n");
- return GNUNET_SYSERR;
- }
+ GNUNET_break (0);
+ TALER_LOG_WARNING ("Invalid signature on exchange signing key!\n");
+ return GNUNET_SYSERR;
}
if (0 == GNUNET_TIME_absolute_get_remaining (ep_end).rel_value_us)
{