gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 02/02: -add logic to purge SECM_TOFU_FILE when purging


From: gnunet
Subject: [taler-exchange] 02/02: -add logic to purge SECM_TOFU_FILE when purging secmod KEY_DIRS
Date: Fri, 30 Jul 2021 18:02:59 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

commit e7a9a2911cf0e5ddcf8b42a21da57b7096ece0d0
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Jul 30 18:02:29 2021 +0200

    -add logic to purge SECM_TOFU_FILE when purging secmod KEY_DIRS
---
 src/testing/testing_api_helpers_exchange.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/testing/testing_api_helpers_exchange.c 
b/src/testing/testing_api_helpers_exchange.c
index bc301d77..8a4d71c5 100644
--- a/src/testing/testing_api_helpers_exchange.c
+++ b/src/testing/testing_api_helpers_exchange.c
@@ -78,6 +78,29 @@ int
 TALER_TESTING_cleanup_files_cfg (void *cls,
                                  const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
+  char *dir;
+
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                               "exchange-offline",
+                                               "SECM_TOFU_FILE",
+                                               &dir))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               "exchange-offline",
+                               "SECM_TOFU_FILE");
+    return GNUNET_SYSERR;
+  }
+  if ( (0 != unlink (dir)) &&
+       (ENOENT != errno) )
+  {
+    GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+                              "unlink",
+                              dir);
+    GNUNET_free (dir);
+    return GNUNET_SYSERR;
+  }
+  GNUNET_free (dir);
   if (GNUNET_OK !=
       remove_dir (cfg,
                   "taler-exchange-secmod-eddsa",

-- 
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]