-fix fTBFS

This commit is contained in:
Christian Grothoff 2022-02-09 15:33:20 +01:00
parent 12290af845
commit d05c561e4f
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 20 additions and 17 deletions

View File

@ -542,6 +542,8 @@ run (void *cls,
TALER_denom_sig_unblind (&denom_sig, TALER_denom_sig_unblind (&denom_sig,
&bds, &bds,
&bks, &bks,
&c_hash,
&alg_values,
&denom_pub)); &denom_pub));
TALER_blinded_denom_sig_free (&bds); TALER_blinded_denom_sig_free (&bds);
TALER_denom_pub_free (&denom_pub); TALER_denom_pub_free (&denom_pub);

View File

@ -107,6 +107,8 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
struct TALER_TransferSecretP secret; struct TALER_TransferSecretP secret;
struct TALER_PlanchetSecretsP ps; struct TALER_PlanchetSecretsP ps;
struct TALER_ExchangeWithdrawValues alg_values; struct TALER_ExchangeWithdrawValues alg_values;
struct TALER_PlanchetDetail pd;
struct TALER_CoinPubHash c_hash;
/* parse reply */ /* parse reply */
if (GNUNET_OK != if (GNUNET_OK !=
@ -132,11 +134,25 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
TALER_planchet_blinding_secret_create (&ps, TALER_planchet_blinding_secret_create (&ps,
&alg_values, &alg_values,
&bks); &bks);
if (GNUNET_OK !=
TALER_planchet_prepare (&rpub,
&alg_values,
&bks,
coin_priv,
&c_hash,
&pd))
{
GNUNET_break (0);
GNUNET_JSON_parse_free (spec);
return GNUNET_SYSERR;
}
/* extract coin and signature */ /* extract coin and signature */
if (GNUNET_OK != if (GNUNET_OK !=
TALER_denom_sig_unblind (sig, TALER_denom_sig_unblind (sig,
&bsig, &bsig,
&bks, &bks,
&c_hash,
&alg_values,
&rpub)) &rpub))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
@ -144,28 +160,11 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
} }
/* verify link_sig */ /* verify link_sig */
{ {
struct TALER_ExchangeWithdrawValues alg_values;
struct TALER_PlanchetDetail pd;
struct TALER_CoinPubHash c_hash;
struct TALER_CoinSpendPublicKeyP old_coin_pub; struct TALER_CoinSpendPublicKeyP old_coin_pub;
struct TALER_BlindedCoinHash coin_envelope_hash; struct TALER_BlindedCoinHash coin_envelope_hash;
GNUNET_CRYPTO_eddsa_key_get_public (&lh->coin_priv.eddsa_priv, GNUNET_CRYPTO_eddsa_key_get_public (&lh->coin_priv.eddsa_priv,
&old_coin_pub.eddsa_pub); &old_coin_pub.eddsa_pub);
// TODO: implement cipher handling
alg_values.cipher = TALER_DENOMINATION_RSA;
if (GNUNET_OK !=
TALER_planchet_prepare (&rpub,
&alg_values,
&bks,
coin_priv,
&c_hash,
&pd))
{
GNUNET_break (0);
GNUNET_JSON_parse_free (spec);
return GNUNET_SYSERR;
}
TALER_coin_ev_hash (&pd.blinded_planchet, TALER_coin_ev_hash (&pd.blinded_planchet,
&pd.denom_pub_hash, &pd.denom_pub_hash,
&coin_envelope_hash); &coin_envelope_hash);

View File

@ -226,6 +226,8 @@ insert_deposit_run (void *cls,
TALER_denom_sig_unblind (&deposit.coin.denom_sig, TALER_denom_sig_unblind (&deposit.coin.denom_sig,
&bds, &bds,
&bks, &bks,
&c_hash,
&alg_values,
&dpk)); &dpk));
TALER_blinded_denom_sig_free (&bds); TALER_blinded_denom_sig_free (&bds);
} }