diff options
author | Lucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch> | 2021-12-31 15:24:41 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:33:09 +0100 |
commit | cf4fd36cc481d3af369a059df213ef00212046d5 (patch) | |
tree | f284f4333baf80f7282b2d2dcf371e7a29bb0f54 /src/util/test_crypto.c | |
parent | 4bcbd704df54515789239962ffe6d09864c285b0 (diff) | |
download | exchange-cf4fd36cc481d3af369a059df213ef00212046d5.tar.xz |
remove varargs in cs crypto implementation
Diffstat (limited to 'src/util/test_crypto.c')
-rw-r--r-- | src/util/test_crypto.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c index 760ec0fa3..513fbbad8 100644 --- a/src/util/test_crypto.c +++ b/src/util/test_crypto.c @@ -146,9 +146,6 @@ test_planchets_cs (void) struct TALER_DenominationPublicKey dk_pub; struct TALER_PlanchetDetail pd; struct TALER_CoinPubHash c_hash; - struct TALER_WithdrawNonce nonce; - struct TALER_DenominationCsPublicR r_pub; - struct TALER_DenominationCsPublicR r_pub_blind; struct TALER_BlindedDenominationSignature blind_sig; struct TALER_FreshCoin coin; @@ -158,37 +155,37 @@ test_planchets_cs (void) TALER_DENOMINATION_CS)); TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS); - TALER_cs_withdraw_nonce_derive (&ps.coin_priv, &nonce); + TALER_cs_withdraw_nonce_derive (&ps.coin_priv, + &pd.blinded_planchet.details. + cs_blinded_planchet.nonce); GNUNET_assert (GNUNET_OK == - TALER_denom_cs_derive_r_public (&nonce, - &dk_priv, - &r_pub)); + TALER_denom_cs_derive_r_public ( + &pd.blinded_planchet.details.cs_blinded_planchet.nonce, + &dk_priv, + &ps.cs_r_pub)); + // TODO: eliminate r_pubs parameter TALER_blinding_secret_create (&ps.blinding_key, TALER_DENOMINATION_CS, &ps.coin_priv, - &r_pub); + &ps.cs_r_pub); GNUNET_assert (GNUNET_OK == TALER_planchet_prepare (&dk_pub, &ps, &c_hash, - &pd, - &r_pub, - &r_pub_blind)); + &pd)); GNUNET_assert (GNUNET_OK == TALER_denom_sign_blinded (&blind_sig, &dk_priv, - &pd.blinded_planchet, - &nonce)); + &pd.blinded_planchet)); GNUNET_assert (GNUNET_OK == TALER_planchet_to_coin (&dk_pub, &blind_sig, &ps, &c_hash, - &coin, - &r_pub_blind)); + &coin)); TALER_blinded_denom_sig_free (&blind_sig); TALER_denom_sig_free (&coin.sig); |