gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: use PUBLIC_KEY from configuratio


From: gnunet
Subject: [taler-exchange] branch master updated: use PUBLIC_KEY from configuration in upload step
Date: Wed, 24 Feb 2021 16:12:11 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 70d4b005 use PUBLIC_KEY from configuration in upload step
70d4b005 is described below

commit 70d4b0054b3eea652eb3eafd2b7715289848a50f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Feb 24 16:12:08 2021 +0100

    use PUBLIC_KEY from configuration in upload step
---
 src/exchange-tools/taler-auditor-offline.c | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/exchange-tools/taler-auditor-offline.c 
b/src/exchange-tools/taler-auditor-offline.c
index d3a50f99..e20efde1 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,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]