aboutsummaryrefslogtreecommitdiff
path: root/src/mint-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-08-14 22:42:19 +0200
committerChristian Grothoff <christian@grothoff.org>2015-08-14 22:42:19 +0200
commita8f65175f46cbada28d801d144e8be71b268dd50 (patch)
treecb74a510094b0d6af61a3f7111ed94b551754e07 /src/mint-lib
parent3d1627daa7b62a30b8bb2d201829b1a6034e85be (diff)
adapt code to match (updated) spec
Diffstat (limited to 'src/mint-lib')
-rw-r--r--src/mint-lib/mint_api_refresh.c24
-rw-r--r--src/mint-lib/test_mint_api.c2
2 files changed, 19 insertions, 7 deletions
diff --git a/src/mint-lib/mint_api_refresh.c b/src/mint-lib/mint_api_refresh.c
index 92535263a..e09c0d32f 100644
--- a/src/mint-lib/mint_api_refresh.c
+++ b/src/mint-lib/mint_api_refresh.c
@@ -1718,19 +1718,31 @@ struct TALER_MINT_RefreshRevealHandle
* to the application via the callback.
*
* @param rrh operation handle
- * @param jsona reply from the mint
+ * @param json reply from the mint
* @param[out] coin_privs array of length `num_fresh_coins`, initialized to contain private keys
* @param[out] sigs array of length `num_fresh_coins`, initialized to cointain RSA signatures
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
*/
static int
refresh_reveal_ok (struct TALER_MINT_RefreshRevealHandle *rrh,
- json_t *jsona,
+ json_t *json,
struct TALER_CoinSpendPrivateKeyP *coin_privs,
struct TALER_DenominationSignature *sigs)
{
unsigned int i;
+ json_t *jsona;
+ struct MAJ_Specification spec[] = {
+ MAJ_spec_json ("ev_sigs", &jsona),
+ MAJ_spec_end
+ };
+ if (GNUNET_OK !=
+ MAJ_parse_json (json,
+ spec))
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
if (! json_is_array (jsona))
{
/* We expected an array of coins */
@@ -1747,7 +1759,7 @@ refresh_reveal_ok (struct TALER_MINT_RefreshRevealHandle *rrh,
{
const struct FreshCoin *fc;
struct TALER_DenominationPublicKey *pk;
- json_t *json;
+ json_t *jsonai;
struct GNUNET_CRYPTO_rsa_Signature *blind_sig;
struct GNUNET_CRYPTO_rsa_Signature *sig;
struct TALER_CoinSpendPublicKeyP coin_pub;
@@ -1760,11 +1772,11 @@ refresh_reveal_ok (struct TALER_MINT_RefreshRevealHandle *rrh,
fc = &rrh->md->fresh_coins[rrh->noreveal_index][i];
pk = &rrh->md->fresh_pks[i];
- json = json_array_get (jsona, i);
- GNUNET_assert (NULL != json);
+ jsonai = json_array_get (jsona, i);
+ GNUNET_assert (NULL != jsonai);
if (GNUNET_OK !=
- MAJ_parse_json (json,
+ MAJ_parse_json (jsonai,
spec))
{
GNUNET_break_op (0);
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c
index bbe81d5a4..86797586c 100644
--- a/src/mint-lib/test_mint_api.c
+++ b/src/mint-lib/test_mint_api.c
@@ -2019,7 +2019,7 @@ run (void *cls,
GNUNET_assert (NULL != mint);
shutdown_task
= GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 5),
+ (GNUNET_TIME_UNIT_SECONDS, 30),
&do_shutdown, is);
}