-add logic to purge SECM_TOFU_FILE when purging secmod KEY_DIRS

This commit is contained in:
Christian Grothoff 2021-07-30 18:02:29 +02:00
parent 12e7f40564
commit e7a9a2911c
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -78,6 +78,29 @@ int
TALER_TESTING_cleanup_files_cfg (void *cls, TALER_TESTING_cleanup_files_cfg (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg) 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 != if (GNUNET_OK !=
remove_dir (cfg, remove_dir (cfg,
"taler-exchange-secmod-eddsa", "taler-exchange-secmod-eddsa",