summaryrefslogtreecommitdiff
path: root/src/exchange-tools/taler-exchange-keycheck.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-07 12:58:40 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-07 12:58:40 +0100
commit962990c7ceb405639f6e5284234abef473bc07b3 (patch)
tree697543d44693815c45e06ba8ac718493c099cebf /src/exchange-tools/taler-exchange-keycheck.c
parent20a7d8fc081c71d83d77b39c681dbfd9337aa97a (diff)
downloadexchange-962990c7ceb405639f6e5284234abef473bc07b3.tar.gz
exchange-962990c7ceb405639f6e5284234abef473bc07b3.tar.bz2
exchange-962990c7ceb405639f6e5284234abef473bc07b3.zip
share master private key verification logic between taler-exchange-wire and taler-exchange-keyup
Diffstat (limited to 'src/exchange-tools/taler-exchange-keycheck.c')
-rw-r--r--src/exchange-tools/taler-exchange-keycheck.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/exchange-tools/taler-exchange-keycheck.c b/src/exchange-tools/taler-exchange-keycheck.c
index 5094f60c9..7c0785808 100644
--- a/src/exchange-tools/taler-exchange-keycheck.c
+++ b/src/exchange-tools/taler-exchange-keycheck.c
@@ -95,8 +95,9 @@ signkeys_iter (void *cls,
filename);
return GNUNET_SYSERR;
}
- printf ("Signing key `%s' valid\n",
- filename);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Signing key `%s' valid\n",
+ filename);
return GNUNET_OK;
}
@@ -182,10 +183,10 @@ denomkeys_iter (void *cls,
alias);
return GNUNET_SYSERR;
}
- printf ("Denomination key `%s' (%s) is valid\n",
- alias,
- GNUNET_h2s (&hc));
-
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Denomination key `%s' (%s) is valid\n",
+ alias,
+ GNUNET_h2s (&hc));
return GNUNET_OK;
}
@@ -212,7 +213,6 @@ exchange_denomkeys_check ()
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchange",
"master_public_key");
- global_ret = 1;
return GNUNET_NO;
}
if (0 > TALER_EXCHANGEDB_denomination_keys_iterate (exchange_directory,
@@ -271,12 +271,17 @@ run (void *cls,
* @return 0 ok, 1 on error
*/
int
-main (int argc, char *const *argv)
+main (int argc,
+ char *const *argv)
{
const struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
+ /* force linker to link against libtalerutil; if we do
+ not do this, the linker may "optimize" libtalerutil
+ away and skip #TALER_OS_init(), which we do need */
+ (void) TALER_project_data_default ();
GNUNET_assert (GNUNET_OK ==
GNUNET_log_setup ("taler-exchange-keycheck",
"WARNING",