aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-tools
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-02-24 16:12:08 +0100
committerChristian Grothoff <christian@grothoff.org>2021-02-24 16:12:08 +0100
commit70d4b0054b3eea652eb3eafd2b7715289848a50f (patch)
tree0567bce9a33374235d366adabde78139f235d458 /src/exchange-tools
parent8860796d8129f7fb13bef8fdbb8ecbad2edad6de (diff)
use PUBLIC_KEY from configuration in upload step
Diffstat (limited to 'src/exchange-tools')
-rw-r--r--src/exchange-tools/taler-auditor-offline.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/exchange-tools/taler-auditor-offline.c b/src/exchange-tools/taler-auditor-offline.c
index d3a50f991..e20efde1f 100644
--- a/src/exchange-tools/taler-auditor-offline.c
+++ b/src/exchange-tools/taler-auditor-offline.c
@@ -539,6 +539,37 @@ do_upload (char *const *args)
{
char *exchange_url;
+ if (GNUNET_YES == GNUNET_is_zero (&TALER_ARL_auditor_pub))
+ {
+ /* private key not available, try configuration for public key */
+ char *auditor_public_key_str;
+
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (c,
+ "auditor",
+ "PUBLIC_KEY",
+ &auditor_public_key_str))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "auditor",
+ "PUBLIC_KEY");
+ return GNUNET_SYSERR;
+ }
+ if (GNUNET_OK !=
+ GNUNET_CRYPTO_eddsa_public_key_from_string (
+ auditor_public_key_str,
+ strlen (auditor_public_key_str),
+ &auditor_pub.eddsa_pub))
+ {
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ "auditor",
+ "PUBLIC_KEY",
+ "invalid key");
+ GNUNET_free (auditor_public_key_str);
+ return GNUNET_SYSERR;
+ }
+ GNUNET_free (auditor_public_key_str);
+ }
if (NULL != in)
{
fprintf (stderr,