diff options
Diffstat (limited to 'src/util/test_helper_cs.c')
-rw-r--r-- | src/util/test_helper_cs.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/src/util/test_helper_cs.c b/src/util/test_helper_cs.c index 22f39b34f..5a41c7fa1 100644 --- a/src/util/test_helper_cs.c +++ b/src/util/test_helper_cs.c @@ -268,9 +268,11 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh) bool success = false; struct TALER_PlanchetSecretsP ps; struct TALER_CoinPubHash c_hash; - struct TALER_ExchangeWithdrawValues values; + struct TALER_ExchangeWithdrawValues alg_values; - TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS); + alg_values.cipher = TALER_DENOMINATION_CS; + TALER_planchet_setup_random (&ps, + &alg_values); for (unsigned int i = 0; i<MAX_KEYS; i++) { struct TALER_PlanchetDetail pd; @@ -288,7 +290,7 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh) "Requesting R derivation with key %s\n", GNUNET_h2s (&keys[i].h_cs.hash)); - values.details.cs_values.r_pub + alg_values.details.cs_values.r_pub = TALER_CRYPTO_helper_cs_r_derive (dh, &keys[i].h_cs, &pd.blinded_planchet. @@ -323,11 +325,10 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh) GNUNET_h2s (&keys[i].h_cs.hash)); TALER_planchet_blinding_secret_create (&ps, - TALER_DENOMINATION_CS, - &values); + &alg_values); GNUNET_assert (GNUNET_OK == TALER_planchet_prepare (&keys[i].denom_pub, - &values, + &alg_values, &ps, &c_hash, &pd)); @@ -409,10 +410,11 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh) bool success = false; struct TALER_PlanchetSecretsP ps; struct TALER_CoinPubHash c_hash; - struct TALER_ExchangeWithdrawValues values; + struct TALER_ExchangeWithdrawValues alg_values; - - TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS); + alg_values.cipher = TALER_DENOMINATION_CS; + TALER_planchet_setup_random (&ps, + &alg_values); for (unsigned int i = 0; i<MAX_KEYS; i++) { if (! keys[i].valid) @@ -425,7 +427,7 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh) TALER_cs_withdraw_nonce_derive (&ps.coin_priv, &pd.blinded_planchet.details. cs_blinded_planchet.nonce); - values.details.cs_values.r_pub + alg_values.details.cs_values.r_pub = TALER_CRYPTO_helper_cs_r_derive (dh, &keys[i].h_cs, &pd.blinded_planchet. @@ -433,12 +435,11 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh) cs_blinded_planchet.nonce, &ec); TALER_planchet_blinding_secret_create (&ps, - TALER_DENOMINATION_CS, - &values); + &alg_values); GNUNET_assert (GNUNET_YES == TALER_planchet_prepare (&keys[i].denom_pub, - &values, + &alg_values, &ps, &c_hash, &pd)); @@ -479,7 +480,7 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh) &ds, &ps, &c_hash, - &values, + &alg_values, &coin)) { GNUNET_break (0); @@ -534,7 +535,7 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh) pd.blinded_planchet.cipher = TALER_DENOMINATION_CS; GNUNET_assert (GNUNET_YES == TALER_planchet_prepare (&keys[0].denom_pub, - &values, + &alg_values, &ps, &c_hash, &pd)); @@ -573,8 +574,11 @@ perf_signing (struct TALER_CRYPTO_CsDenominationHelper *dh, enum TALER_ErrorCode ec; struct GNUNET_TIME_Relative duration; struct TALER_PlanchetSecretsP ps; + struct TALER_ExchangeWithdrawValues alg_values; - TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS); + alg_values.cipher = TALER_DENOMINATION_CS; + TALER_planchet_setup_random (&ps, + &alg_values); duration = GNUNET_TIME_UNIT_ZERO; TALER_CRYPTO_helper_cs_poll (dh); for (unsigned int j = 0; j<NUM_SIGN_PERFS;) @@ -596,7 +600,6 @@ perf_signing (struct TALER_CRYPTO_CsDenominationHelper *dh, { struct TALER_CoinPubHash c_hash; struct TALER_PlanchetDetail pd; - struct TALER_ExchangeWithdrawValues values; pd.blinded_planchet.cipher = TALER_DENOMINATION_CS; @@ -604,7 +607,7 @@ perf_signing (struct TALER_CRYPTO_CsDenominationHelper *dh, &pd.blinded_planchet.details. cs_blinded_planchet.nonce); - values.details.cs_values.r_pub + alg_values.details.cs_values.r_pub = TALER_CRYPTO_helper_cs_r_derive (dh, &keys[i].h_cs, &pd.blinded_planchet. @@ -612,12 +615,11 @@ perf_signing (struct TALER_CRYPTO_CsDenominationHelper *dh, cs_blinded_planchet.nonce, &ec); TALER_planchet_blinding_secret_create (&ps, - TALER_DENOMINATION_CS, - &values); + &alg_values); GNUNET_assert (GNUNET_YES == TALER_planchet_prepare (&keys[i].denom_pub, - &values, + &alg_values, &ps, &c_hash, &pd)); |