-towards CS in refresh (incomplete, FTBFS)

This commit is contained in:
Christian Grothoff 2022-02-07 13:23:20 +01:00
parent b2e6fcae1a
commit 169d684342
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 11 additions and 12 deletions

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
Copyright (C) 2014-2019, 2021 Taler Systems SA Copyright (C) 2014-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 Affero General Public License as published by the Free Software terms of the GNU Affero General Public License as published by the Free Software
@ -384,9 +384,8 @@ resolve_refreshes_reveal_denominations (struct MHD_Connection *connection,
{ {
struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrc = &rrcs[i]; struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrc = &rrcs[i];
struct GNUNET_JSON_Specification spec[] = { struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_varsize (NULL, TALER_JSON_spec_blinded_planchet (NULL,
&rrc->coin_ev, &rrc->blinded_planchet),
&rrc->coin_ev_size),
GNUNET_JSON_spec_end () GNUNET_JSON_spec_end ()
}; };
enum GNUNET_GenericReturnValue res; enum GNUNET_GenericReturnValue res;
@ -399,12 +398,12 @@ resolve_refreshes_reveal_denominations (struct MHD_Connection *connection,
if (GNUNET_OK != res) if (GNUNET_OK != res)
{ {
for (unsigned int j = 0; j<i; j++) for (unsigned int j = 0; j<i; j++)
GNUNET_free (rrcs[j].coin_ev); TALER_blinded_planchet_free (&rrcs[j].blinded_planchet);
return (GNUNET_NO == res) ? MHD_YES : MHD_NO; return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
} }
GNUNET_CRYPTO_hash (rrc->coin_ev, TALER_coin_ev_hash (&rrc->blinded_planchet,
rrc->coin_ev_size, &rrcs[i].h_denom_pub,
&rrc->coin_envelope_hash.hash); &rrc->coin_envelope_hash);
} }
/* lookup old_coin_pub in database */ /* lookup old_coin_pub in database */
@ -577,7 +576,7 @@ cleanup:
struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrc = &rrcs[i]; struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrc = &rrcs[i];
TALER_blinded_denom_sig_free (&rrc->coin_sig); TALER_blinded_denom_sig_free (&rrc->coin_sig);
GNUNET_free (rrc->coin_ev); TALER_blinded_planchet_free (&rrc->blinded_planchet);
} }
return ret; return ret;
} }

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
Copyright (C) 2014, 2015, 2016, 2021 Taler Systems SA Copyright (C) 2014, 2015, 2016, 2021, 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
@ -252,7 +252,7 @@ TALER_JSON_spec_denom_pub (const char *field,
* Generate line in parser specification for denomination signature. * Generate line in parser specification for denomination signature.
* *
* @param field name of the field * @param field name of the field
* @param sig the signature to initialize * @param[out] sig the signature to initialize
* @return corresponding field spec * @return corresponding field spec
*/ */
struct GNUNET_JSON_Specification struct GNUNET_JSON_Specification
@ -265,7 +265,7 @@ TALER_JSON_spec_denom_sig (const char *field,
* blinded denomination signature. * blinded denomination signature.
* *
* @param field name of the field * @param field name of the field
* @param sig the blinded signature to initialize * @param[out] sig the blinded signature to initialize
* @return corresponding field spec * @return corresponding field spec
*/ */
struct GNUNET_JSON_Specification struct GNUNET_JSON_Specification