summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-16 12:56:35 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-16 12:56:35 +0100
commit96b4c139ee9997f827e9559a186c9684a5978f4b (patch)
tree483f6bf7bd2a5f4a253921c7586432d831e1b8d3 /src/testing
parent18c12f62347c2c3767a36577f352fc39df532801 (diff)
downloadexchange-96b4c139ee9997f827e9559a186c9684a5978f4b.tar.gz
exchange-96b4c139ee9997f827e9559a186c9684a5978f4b.tar.bz2
exchange-96b4c139ee9997f827e9559a186c9684a5978f4b.zip
add auditor-enable /-disable commands to taler-exchange-offline tool
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_auditor_add.c23
-rw-r--r--src/testing/testing_api_cmd_auditor_del.c15
2 files changed, 9 insertions, 29 deletions
diff --git a/src/testing/testing_api_cmd_auditor_add.c b/src/testing/testing_api_cmd_auditor_add.c
index 5acb5c1e0..2c59f4194 100644
--- a/src/testing/testing_api_cmd_auditor_add.c
+++ b/src/testing/testing_api_cmd_auditor_add.c
@@ -117,24 +117,11 @@ auditor_add_run (void *cls,
}
else
{
-
- /* now sign */
- {
- struct TALER_MasterAddAuditorPS kv = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MASTER_ADD_AUDITOR),
- .purpose.size = htonl (sizeof (kv)),
- .start_date = GNUNET_TIME_absolute_hton (now),
- .auditor_pub = is->auditor_pub,
- };
-
- GNUNET_CRYPTO_hash (is->auditor_url,
- strlen (is->auditor_url) + 1,
- &kv.h_auditor_url);
- /* Finally sign ... */
- GNUNET_CRYPTO_eddsa_sign (&is->master_priv.eddsa_priv,
- &kv,
- &master_sig.eddsa_signature);
- }
+ TALER_exchange_offline_auditor_add_sign (&is->auditor_pub,
+ is->auditor_url,
+ now,
+ &is->master_priv,
+ &master_sig);
}
ds->dh = TALER_EXCHANGE_management_enable_auditor (
is->ctx,
diff --git a/src/testing/testing_api_cmd_auditor_del.c b/src/testing/testing_api_cmd_auditor_del.c
index fd75e8268..71525a10e 100644
--- a/src/testing/testing_api_cmd_auditor_del.c
+++ b/src/testing/testing_api_cmd_auditor_del.c
@@ -117,17 +117,10 @@ auditor_del_run (void *cls,
}
else
{
- struct TALER_MasterDelAuditorPS kv = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MASTER_DEL_AUDITOR),
- .purpose.size = htonl (sizeof (kv)),
- .end_date = GNUNET_TIME_absolute_hton (now),
- .auditor_pub = is->auditor_pub,
- };
-
- /* Finally sign ... */
- GNUNET_CRYPTO_eddsa_sign (&is->master_priv.eddsa_priv,
- &kv,
- &master_sig.eddsa_signature);
+ TALER_exchange_offline_auditor_del_sign (&is->auditor_pub,
+ now,
+ &is->master_priv,
+ &master_sig);
}
ds->dh = TALER_EXCHANGE_management_disable_auditor (
is->ctx,