From c3b9ebc1effea652e3cdfc93fb6ed5b1cf83826a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 3 Mar 2019 00:35:21 +0100 Subject: fix format string issue in taler-wire, complete work on #5536 revocation file issue (shift location of revocation file and change content to include denom hash) --- src/exchangedb/exchangedb_auditorkeys.c | 2 +- src/exchangedb/exchangedb_denomkeys.c | 8 ++++++-- src/exchangedb/exchangedb_plugin.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/exchangedb') diff --git a/src/exchangedb/exchangedb_auditorkeys.c b/src/exchangedb/exchangedb_auditorkeys.c index 5f98743d3..38498d9b5 100644 --- a/src/exchangedb/exchangedb_auditorkeys.c +++ b/src/exchangedb/exchangedb_auditorkeys.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015, 2016, 2017 Inria & GNUnet e.V. + Copyright (C) 2014--2019 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/src/exchangedb/exchangedb_denomkeys.c b/src/exchangedb/exchangedb_denomkeys.c index 9dfb0e855..418a1074b 100644 --- a/src/exchangedb/exchangedb_denomkeys.c +++ b/src/exchangedb/exchangedb_denomkeys.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2017 Inria & GNUnet e.V. + Copyright (C) 2014-2019 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -386,7 +386,7 @@ revocations_iterate_cb (void *cls, struct TALER_MasterDenominationKeyRevocationPS rm; /* Check if revocation is valid... */ - if (sizeof (rm) != + if (sizeof (rf) != GNUNET_DISK_fn_read (filename, &rf, sizeof (rf))) @@ -443,6 +443,10 @@ TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir, .master_pub = master_pub }; + if (GNUNET_OK != + GNUNET_DISK_directory_create (revocation_dir)) + return 0; /* directory doesn't exist and we couldn't even create it, + clearly means there are no revocations there */ return GNUNET_DISK_directory_scan (revocation_dir, &revocations_iterate_cb, &ric); diff --git a/src/exchangedb/exchangedb_plugin.c b/src/exchangedb/exchangedb_plugin.c index ec8f25fa2..50394c6e3 100644 --- a/src/exchangedb/exchangedb_plugin.c +++ b/src/exchangedb/exchangedb_plugin.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2015 GNUnet e.V. + Copyright (C) 2015 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software -- cgit v1.2.3