This commit is contained in:
Christian Grothoff 2022-02-09 10:38:02 +01:00
parent 77eaa685b9
commit d559610da7
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 4 additions and 9 deletions

View File

@ -367,6 +367,9 @@ TALER_blinded_planchet_free (struct TALER_BlindedPlanchet *blinded_planchet)
GNUNET_free (blinded_planchet->details.rsa_blinded_planchet.blinded_msg); GNUNET_free (blinded_planchet->details.rsa_blinded_planchet.blinded_msg);
break; break;
case TALER_DENOMINATION_CS: case TALER_DENOMINATION_CS:
memset (blinded_planchet,
0,
sizeof (*blinded_planchet));
/* nothing to do for CS */ /* nothing to do for CS */
break; break;
default: default:

View File

@ -380,7 +380,6 @@ TALER_denom_pub_verify (const struct TALER_DenominationPublicKey *denom_pub,
GNUNET_break (0); GNUNET_break (0);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
switch (denom_pub->cipher) switch (denom_pub->cipher)
{ {
case TALER_DENOMINATION_INVALID: case TALER_DENOMINATION_INVALID:

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
(C) 2015, 2020, 2021 Taler Systems SA (C) 2015, 2020-2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the 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 terms of the GNU General Public License as published by the Free Software
@ -198,14 +198,11 @@ test_planchets_cs (void)
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG, GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG,
&ps, &ps,
sizeof (ps)); sizeof (ps));
GNUNET_assert (GNUNET_OK == GNUNET_assert (GNUNET_OK ==
TALER_denom_priv_create (&dk_priv, TALER_denom_priv_create (&dk_priv,
&dk_pub, &dk_pub,
TALER_DENOMINATION_CS)); TALER_DENOMINATION_CS));
alg_values.cipher = TALER_DENOMINATION_CS; alg_values.cipher = TALER_DENOMINATION_CS;
TALER_cs_withdraw_nonce_derive ( TALER_cs_withdraw_nonce_derive (
&ps, &ps,
&pd.blinded_planchet.details.cs_blinded_planchet.nonce); &pd.blinded_planchet.details.cs_blinded_planchet.nonce);
@ -214,14 +211,12 @@ test_planchets_cs (void)
&pd.blinded_planchet.details.cs_blinded_planchet.nonce, &pd.blinded_planchet.details.cs_blinded_planchet.nonce,
&dk_priv, &dk_priv,
&alg_values.details.cs_values.r_pub_pair)); &alg_values.details.cs_values.r_pub_pair));
TALER_planchet_setup_coin_priv (&ps, TALER_planchet_setup_coin_priv (&ps,
&alg_values, &alg_values,
&coin_priv); &coin_priv);
TALER_planchet_blinding_secret_create (&ps, TALER_planchet_blinding_secret_create (&ps,
&alg_values, &alg_values,
&bks); &bks);
GNUNET_assert (GNUNET_OK == GNUNET_assert (GNUNET_OK ==
TALER_planchet_prepare (&dk_pub, TALER_planchet_prepare (&dk_pub,
&alg_values, &alg_values,
@ -229,7 +224,6 @@ test_planchets_cs (void)
&coin_priv, &coin_priv,
&c_hash, &c_hash,
&pd)); &pd));
GNUNET_assert (GNUNET_OK == GNUNET_assert (GNUNET_OK ==
TALER_denom_sign_blinded (&blind_sig, TALER_denom_sign_blinded (&blind_sig,
&dk_priv, &dk_priv,
@ -243,7 +237,6 @@ test_planchets_cs (void)
&c_hash, &c_hash,
&alg_values, &alg_values,
&coin)); &coin));
TALER_blinded_denom_sig_free (&blind_sig); TALER_blinded_denom_sig_free (&blind_sig);
TALER_denom_sig_free (&coin.sig); TALER_denom_sig_free (&coin.sig);
TALER_denom_priv_free (&dk_priv); TALER_denom_priv_free (&dk_priv);