summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_management_auditors.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_management_auditors.c')
-rw-r--r--src/exchange/taler-exchange-httpd_management_auditors.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/exchange/taler-exchange-httpd_management_auditors.c b/src/exchange/taler-exchange-httpd_management_auditors.c
index acb8f2c58..6d700d612 100644
--- a/src/exchange/taler-exchange-httpd_management_auditors.c
+++ b/src/exchange/taler-exchange-httpd_management_auditors.c
@@ -176,32 +176,20 @@ TEH_handler_management_auditors (
if (GNUNET_NO == res)
return MHD_YES; /* failure */
}
+ if (GNUNET_OK !=
+ TALER_exchange_offline_auditor_add_verify (
+ &aac.auditor_pub,
+ aac.auditor_url,
+ aac.validity_start,
+ &TEH_master_public_key,
+ &aac.master_sig))
{
- struct TALER_MasterAddAuditorPS aa = {
- .purpose.purpose = htonl (
- TALER_SIGNATURE_MASTER_ADD_AUDITOR),
- .purpose.size = htonl (sizeof (aa)),
- .start_date = GNUNET_TIME_absolute_hton (aac.validity_start),
- .auditor_pub = aac.auditor_pub
- };
-
- GNUNET_CRYPTO_hash (aac.auditor_url,
- strlen (aac.auditor_url) + 1,
- &aa.h_auditor_url);
- if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (
- TALER_SIGNATURE_MASTER_ADD_AUDITOR,
- &aa,
- &aac.master_sig.eddsa_signature,
- &TEH_master_public_key.eddsa_pub))
- {
- GNUNET_break_op (0);
- return TALER_MHD_reply_with_error (
- connection,
- MHD_HTTP_FORBIDDEN,
- TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_ADD_SIGNATURE_INVALID,
- NULL);
- }
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (
+ connection,
+ MHD_HTTP_FORBIDDEN,
+ TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_ADD_SIGNATURE_INVALID,
+ NULL);
}
qs = TEH_DB_run_transaction (connection,