[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: have taler-exchange
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: have taler-exchange-wire check master public key matches |
Date: |
Wed, 26 Jun 2019 21:06:37 +0200 |
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 0f43ab72 have taler-exchange-wire check master public key matches
0f43ab72 is described below
commit 0f43ab72ae142c34e07a5d640a58bc1081982e8a
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Jun 26 21:06:35 2019 +0200
have taler-exchange-wire check master public key matches
---
src/exchange-tools/taler-exchange-wire.c | 39 ++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/exchange-tools/taler-exchange-wire.c
b/src/exchange-tools/taler-exchange-wire.c
index 28cad1cc..9af4c491 100644
--- a/src/exchange-tools/taler-exchange-wire.c
+++ b/src/exchange-tools/taler-exchange-wire.c
@@ -132,6 +132,9 @@ run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa_priv;
+ char *masters;
+ struct GNUNET_CRYPTO_EddsaPublicKey mpub;
+ struct GNUNET_CRYPTO_EddsaPublicKey mpub_cfg;
if ( (NULL == masterkeyfile) &&
(GNUNET_OK !=
@@ -160,6 +163,42 @@ run (void *cls,
return;
}
master_priv.eddsa_priv = *eddsa_priv;
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ "exchange",
+ "MASTER_PUBLIC_KEY",
+ &masters))
+ {
+ fprintf (stderr,
+ "Master public key option missing in configuration\n");
+ global_ret = 1;
+ return;
+ }
+ GNUNET_CRYPTO_eddsa_key_get_public (eddsa_priv,
+ &mpub);
+ if (GNUNET_OK !=
+ GNUNET_STRINGS_string_to_data (masters,
+ strlen (masters),
+ &mpub_cfg,
+ sizeof (mpub_cfg)))
+ {
+ fprintf (stderr,
+ "Master public key `%s' in configuration is not a valid key\n",
+ masters);
+ GNUNET_free (masters);
+ global_ret = 1;
+ return;
+ }
+ GNUNET_free (masters);
+ if (0 != GNUNET_memcmp (&mpub,
+ &mpub_cfg))
+ {
+ fprintf (stderr,
+ "Master public key `%s' in configuration does not match our
master private key!\n",
+ masters);
+ global_ret = 1;
+ return;
+ }
TALER_EXCHANGEDB_find_accounts (cfg,
&sign_account_data,
NULL);
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: have taler-exchange-wire check master public key matches,
gnunet <=