aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mint-lib/mint_api_handle.c2
-rw-r--r--src/mint-lib/test_mint_api.c30
2 files changed, 30 insertions, 2 deletions
diff --git a/src/mint-lib/mint_api_handle.c b/src/mint-lib/mint_api_handle.c
index 11c0b793a..1ce18569b 100644
--- a/src/mint-lib/mint_api_handle.c
+++ b/src/mint-lib/mint_api_handle.c
@@ -761,6 +761,8 @@ TALER_MINT_connect (struct TALER_MINT_Context *ctx,
mint = GNUNET_new (struct TALER_MINT_Handle);
mint->ctx = ctx;
mint->url = GNUNET_strdup (url);
+ mint->cert_cb = cert_cb;
+ mint->cert_cb_cls = cert_cb_cls;
kr = GNUNET_new (struct KeysRequest);
kr->mint = mint;
kr->url = MAH_path_to_url (mint, "/keys");
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c
index e37c54cd2..8015d5c5a 100644
--- a/src/mint-lib/test_mint_api.c
+++ b/src/mint-lib/test_mint_api.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2014, 2015 Christian Grothoff (and other contributing authors)
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
@@ -18,22 +18,45 @@
* @file mint/test_mint_api.c
* @brief testcase to test mint's HTTP API interface
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
+ * @author Christian Grothoff
*/
#include "platform.h"
#include "taler_util.h"
#include "taler_mint_service.h"
+/**
+ * Main execution context for the main loop.
+ */
static struct TALER_MINT_Context *ctx;
+/**
+ * Handle to access the mint.
+ */
static struct TALER_MINT_Handle *mint;
+/**
+ * Task run on shutdown.
+ */
static struct GNUNET_SCHEDULER_Task *shutdown_task;
+/**
+ * Task that runs the main event loop.
+ */
static struct GNUNET_SCHEDULER_Task *ctx_task;
+/**
+ * Result of the testcases, #GNUNET_OK on success
+ */
static int result;
+/**
+ * Function run when the test terminates (good or bad).
+ * Cleans up our state.
+ *
+ * @param cls NULL
+ * @param tc unused
+ */
static void
do_shutdown (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -82,7 +105,8 @@ cert_cb (void *cls,
keys->num_denom_keys);
#undef ERR
/* TODO: start running rest of test suite here! */
- return;
+ result = GNUNET_OK;
+ GNUNET_SCHEDULER_shutdown ();
}
@@ -195,3 +219,5 @@ main (int argc,
return 3;
return (GNUNET_OK == result) ? 0 : 1;
}
+
+/* end of test_mint_api.c */