-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,
&bds,
&bks,
&c_hash,
&alg_values,
&denom_pub));
TALER_blinded_denom_sig_free (&bds);
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_PlanchetSecretsP ps;
struct TALER_ExchangeWithdrawValues alg_values;
struct TALER_PlanchetDetail pd;
struct TALER_CoinPubHash c_hash;
/* parse reply */
if (GNUNET_OK !=
@ -132,28 +134,6 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
TALER_planchet_blinding_secret_create (&ps,
&alg_values,
&bks);
/* extract coin and signature */
if (GNUNET_OK !=
TALER_denom_sig_unblind (sig,
&bsig,
&bks,
&rpub))
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
/* 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_BlindedCoinHash coin_envelope_hash;
GNUNET_CRYPTO_eddsa_key_get_public (&lh->coin_priv.eddsa_priv,
&old_coin_pub.eddsa_pub);
// TODO: implement cipher handling
alg_values.cipher = TALER_DENOMINATION_RSA;
if (GNUNET_OK !=
TALER_planchet_prepare (&rpub,
&alg_values,
@ -166,6 +146,25 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
GNUNET_JSON_parse_free (spec);
return GNUNET_SYSERR;
}
/* extract coin and signature */
if (GNUNET_OK !=
TALER_denom_sig_unblind (sig,
&bsig,
&bks,
&c_hash,
&alg_values,
&rpub))
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
/* verify link_sig */
{
struct TALER_CoinSpendPublicKeyP old_coin_pub;
struct TALER_BlindedCoinHash coin_envelope_hash;
GNUNET_CRYPTO_eddsa_key_get_public (&lh->coin_priv.eddsa_priv,
&old_coin_pub.eddsa_pub);
TALER_coin_ev_hash (&pd.blinded_planchet,
&pd.denom_pub_hash,
&coin_envelope_hash);

View File

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