diff options
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/test_exchange_api_twisted.c | 6 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_insert_deposit.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_refresh.c | 36 |
3 files changed, 23 insertions, 21 deletions
diff --git a/src/testing/test_exchange_api_twisted.c b/src/testing/test_exchange_api_twisted.c index 150d3b12..f8cfa64b 100644 --- a/src/testing/test_exchange_api_twisted.c +++ b/src/testing/test_exchange_api_twisted.c @@ -124,7 +124,7 @@ run (void *cls, TALER_TESTING_cmd_withdraw_amount ("refresh-withdraw-coin", "refresh-create-reserve", "EUR:5", - 0, /* age */ + 0, /* age restriction off */ MHD_HTTP_OK), TALER_TESTING_cmd_deposit ("refresh-deposit-partial", "refresh-withdraw-coin", @@ -165,7 +165,7 @@ run (void *cls, TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-r1", "create-reserve-r1", "EUR:5", - 0, /* age */ + 0, /* age restriction off */ MHD_HTTP_OK), TALER_TESTING_cmd_deposit ("deposit-refund-1", "withdraw-coin-r1", @@ -235,7 +235,7 @@ run (void *cls, TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-r2", "create-reserve-r2", "EUR:5", - 0, /* age */ + 0, /* age restriction off */ MHD_HTTP_OK), TALER_TESTING_cmd_end () }; diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c index 5247ccd7..b1e73297 100644 --- a/src/testing/testing_api_cmd_insert_deposit.c +++ b/src/testing/testing_api_cmd_insert_deposit.c @@ -212,7 +212,7 @@ insert_deposit_run (void *cls, GNUNET_assert (GNUNET_OK == TALER_denom_blind (&dpk, &bks, - NULL, /* FIXME-Oec */ + NULL, /* no age restriction active */ &deposit.coin.coin_pub, &alg_values, &c_hash, diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c index a2fb4f15..29ad9d2f 100644 --- a/src/testing/testing_api_cmd_refresh.c +++ b/src/testing/testing_api_cmd_refresh.c @@ -836,6 +836,7 @@ refresh_link_run (void *cls, /* finally, use private key from withdraw sign command */ rls->rlh = TALER_EXCHANGE_link (is->exchange, coin_priv, + rms->age_commitment, &link_cb, rls); @@ -1149,28 +1150,29 @@ melt_run (void *cls, rms->refresh_data.melt_pk = *melt_denom_pub; rms->refresh_data.fresh_pks = rms->fresh_pks; rms->refresh_data.fresh_pks_len = num_fresh_coins; -/* FIXME-oec: is this needed _here_? + rms->refresh_data.age_commitment = NULL; + + GNUNET_assert (age_restricted == + (NULL != rms->age_commitment)); + + if (NULL != rms->age_commitment) { - struct TALER_AgeCommitment *ac = NULL; + struct TALER_AgeCommitment *ac; + uint32_t seed; - GNUNET_assert (age_restricted == (NULL != rms->age_commitment)); + ac = GNUNET_new (struct TALER_AgeCommitment); + seed = GNUNET_CRYPTO_random_u32 ( + GNUNET_CRYPTO_QUALITY_WEAK, + UINT32_MAX); - if (NULL != rms->age_commitment) - { - uint32_t seed = GNUNET_CRYPTO_random_u32 ( - GNUNET_CRYPTO_QUALITY_WEAK, - UINT32_MAX); - - GNUNET_assert (GNUNET_OK == - TALER_age_commitment_derive ( - rms->age_commitment, - seed, - ac)); - } + GNUNET_assert (GNUNET_OK == + TALER_age_commitment_derive ( + rms->age_commitment, + seed, + ac)); - rms->refresh_data.age_commitment = ac + rms->refresh_data.age_commitment = ac; } -*/ rms->rmh = TALER_EXCHANGE_melt (is->exchange, &rms->rms, |