fix test_exchangedb denomkeys test

This commit is contained in:
Christian Grothoff 2017-04-10 17:01:20 +02:00
parent 17a74ee707
commit 58463df9d2
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 6 additions and 13 deletions

View File

@ -3535,7 +3535,6 @@ cleanup_files ()
} }
/** /**
* Main function for the testcase for the exchange API. * Main function for the testcase for the exchange API.
* *

View File

@ -145,7 +145,6 @@ main (int argc,
char *enc_read; char *enc_read;
size_t enc_read_size; size_t enc_read_size;
char *tmpfile; char *tmpfile;
char *tmpdir2;
char *tmpdir; char *tmpdir;
int ret; int ret;
struct GNUNET_TIME_Absolute start; struct GNUNET_TIME_Absolute start;
@ -193,17 +192,11 @@ main (int argc,
&dki_iter, &dki_iter,
&dki)); &dki));
GNUNET_asprintf (&tmpdir2,
"%s/%s/",
tmpdir,
TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS);
EXITIF (GNUNET_OK != EXITIF (GNUNET_OK !=
TALER_EXCHANGEDB_denomination_key_revoke (tmpdir2, TALER_EXCHANGEDB_denomination_key_revoke (tmpdir,
"cur-unit-uuid", "cur-unit-uuid",
&dki, &dki,
&master_priv)); &master_priv));
GNUNET_free (tmpdir2);
EXITIF (1 != EXITIF (1 !=
TALER_EXCHANGEDB_denomination_keys_iterate (tmpdir, TALER_EXCHANGEDB_denomination_keys_iterate (tmpdir,
&master_pub, &master_pub,
@ -221,10 +214,11 @@ main (int argc,
EXITIF_exit: EXITIF_exit:
GNUNET_free_non_null (enc); GNUNET_free_non_null (enc);
if (NULL != tmpfile) GNUNET_free_non_null (tmpfile);
if (NULL != tmpdir)
{ {
(void) GNUNET_DISK_directory_remove (tmpfile); (void) GNUNET_DISK_directory_remove (tmpdir);
GNUNET_free (tmpfile); GNUNET_free (tmpdir);
} }
GNUNET_free_non_null (enc_read); GNUNET_free_non_null (enc_read);
if (NULL != dki.denom_priv.rsa_private_key) if (NULL != dki.denom_priv.rsa_private_key)