Merge branch 'ar14' of ssh://git.kesim.org/taler/exchange into ar14
This commit is contained in:
commit
096834aa28
@ -588,19 +588,24 @@ TALER_EXCHANGE_verify_coin_history (
|
||||
}
|
||||
}
|
||||
|
||||
if (GNUNET_OK !=
|
||||
TALER_wallet_melt_verify (&amount,
|
||||
&fee,
|
||||
&rc,
|
||||
h_denom_pub,
|
||||
TALER_AgeCommitmentHash_isNullOrZero (
|
||||
&h_age_commitment) ?
|
||||
NULL : &h_age_commitment,
|
||||
coin_pub,
|
||||
&sig))
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
return GNUNET_SYSERR;
|
||||
const struct TALER_AgeCommitmentHash *ahc = &h_age_commitment;
|
||||
|
||||
if (TALER_AgeCommitmentHash_isNullOrZero (ahc))
|
||||
ahc = NULL;
|
||||
|
||||
if (GNUNET_OK !=
|
||||
TALER_wallet_melt_verify (&amount,
|
||||
&fee,
|
||||
&rc,
|
||||
h_denom_pub,
|
||||
ahc,
|
||||
coin_pub,
|
||||
&sig))
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
}
|
||||
add = GNUNET_YES;
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ TALER_EXCHANGE_refreshes_reveal (
|
||||
if (GNUNET_OK !=
|
||||
TALER_planchet_prepare (&md->fresh_pks[i],
|
||||
&md->fresh_coins[noreveal_index][i],
|
||||
NULL, /* FIXME-oec: struct TALER_AgeCommitmentHash * */
|
||||
NULL, /* FIXME-oec */
|
||||
&c_hash,
|
||||
&pd))
|
||||
{
|
||||
|
@ -88,12 +88,18 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info,
|
||||
GNUNET_memcmp (&d_hash,
|
||||
&coin_public_info->denom_pub_hash));
|
||||
#endif
|
||||
// FIXME-Oec: replace with function that
|
||||
// also hashes the age vector if we have
|
||||
// one!
|
||||
GNUNET_CRYPTO_hash (&coin_public_info->coin_pub,
|
||||
sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
|
||||
&c_hash.hash);
|
||||
{
|
||||
const struct TALER_AgeCommitmentHash *pahc =
|
||||
&coin_public_info->age_commitment_hash;
|
||||
|
||||
if (TALER_AgeCommitmentHash_isNullOrZero (pahc))
|
||||
pahc = NULL;
|
||||
|
||||
TALER_coin_pub_hash (&coin_public_info->coin_pub,
|
||||
pahc,
|
||||
&c_hash);
|
||||
}
|
||||
|
||||
if (GNUNET_OK !=
|
||||
TALER_denom_pub_verify (denom_pub,
|
||||
&coin_public_info->denom_sig,
|
||||
@ -330,7 +336,7 @@ TALER_coin_pub_hash (const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||
const struct TALER_AgeCommitmentHash *ach,
|
||||
struct TALER_CoinPubHash *coin_h)
|
||||
{
|
||||
if (NULL == ach)
|
||||
if (TALER_AgeCommitmentHash_isNullOrZero (ach))
|
||||
{
|
||||
/* No age commitment was set */
|
||||
GNUNET_CRYPTO_hash (&coin_pub->eddsa_pub,
|
||||
@ -395,7 +401,7 @@ TALER_age_restriction_derive (
|
||||
const uint32_t seed,
|
||||
const struct TALER_AgeCommitment *derived)
|
||||
{
|
||||
/* TODO */
|
||||
/* TODO oec */
|
||||
}
|
||||
|
||||
|
||||
@ -406,7 +412,7 @@ TALER_age_restriction_commit (
|
||||
const uint32_t seed,
|
||||
struct TALER_AgeCommitment *commitment)
|
||||
{
|
||||
/* TODO */
|
||||
/* TODO oec */
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user