summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_common_deposit.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-06-30 11:14:33 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-06-30 11:14:33 +0200
commite0e69fd72e804e14b4f2ef497b3b0fb2661ec2ef (patch)
tree3f031d3cdfbf31a8c28922ae7c7f238861688533 /src/exchange/taler-exchange-httpd_common_deposit.c
parentaba04fe6beed9f53b346843325903194eab57c93 (diff)
downloadexchange-e0e69fd72e804e14b4f2ef497b3b0fb2661ec2ef.tar.gz
exchange-e0e69fd72e804e14b4f2ef497b3b0fb2661ec2ef.tar.bz2
exchange-e0e69fd72e804e14b4f2ef497b3b0fb2661ec2ef.zip
-new error codes for purse deposit failures
Diffstat (limited to 'src/exchange/taler-exchange-httpd_common_deposit.c')
-rw-r--r--src/exchange/taler-exchange-httpd_common_deposit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd_common_deposit.c b/src/exchange/taler-exchange-httpd_common_deposit.c
index cfa15fccb..7e9774208 100644
--- a/src/exchange/taler-exchange-httpd_common_deposit.c
+++ b/src/exchange/taler-exchange-httpd_common_deposit.c
@@ -224,13 +224,13 @@ TEH_common_deposit_check_purse_deposit (
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- /* FIXME: other error code? */
- TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH,
+ TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT,
"mismatch of attest and age_commitment");
}
if (coin->cpi.no_age_commitment)
return GNUNET_OK; /* unrestricted coin */
+
/* age attestation must be valid */
if (GNUNET_OK !=
TALER_age_commitment_verify (&coin->age_commitment,
@@ -241,7 +241,7 @@ TEH_common_deposit_check_purse_deposit (
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
/* FIXME: other error code? */
- TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH,
+ TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE,
"invalid attest for minimum age");
}
return GNUNET_OK;
@@ -259,7 +259,7 @@ TEH_common_purse_deposit_free_coin (struct TEH_PurseDepositedCoin *coin)
{
TALER_denom_sig_free (&coin->cpi.denom_sig);
if (! coin->cpi.no_age_commitment)
- TALER_age_commitment_free (&coin->age_commitment);
+ GNUNET_free (coin->age_commitment.keys); /* Only the keys have been allocated */
}