diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-12-21 23:57:23 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-12-21 23:57:23 +0100 |
commit | fa5582930e6198e2783ae9cad59d2d2b4ce2ee1a (patch) | |
tree | 12fc2dd1398e403d63dbabcef33ad7b62de0bf8d /src/exchange/taler-exchange-httpd_responses.h | |
parent | 98ca8478952ab57b3a9f3b8f9efc4a7bb11d2a53 (diff) | |
download | exchange-fa5582930e6198e2783ae9cad59d2d2b4ce2ee1a.tar.gz exchange-fa5582930e6198e2783ae9cad59d2d2b4ce2ee1a.tar.bz2 exchange-fa5582930e6198e2783ae9cad59d2d2b4ce2ee1a.zip |
[wip, #7267] more refined denomination conflict response during deposit
If a coin was known but with a different denomination, return to the
client an error response that contains the denomination's public key and
the corresponding signature of the provided coin.
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.h')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h index b10a72824..57aeefe42 100644 --- a/src/exchange/taler-exchange-httpd_responses.h +++ b/src/exchange/taler-exchange-httpd_responses.h @@ -162,6 +162,28 @@ TEH_RESPONSE_reply_coin_insufficient_funds ( /** * Send proof that a request is invalid to client because of + * an conflict with the provided denomination (the exchange had seen + * this coin before, signed by a different denomination). + * This function will create a message with the denomination's public key + * that was seen before. + * + * @param connection connection to the client + * @param ec error code to return + * @param coin_pub the public key of the coin + * @param prev_denom_pub the denomination of the coin, as seen previously + * @param prev_denom_sig the signature with the denomination key over the coin + * @return MHD result code + */ +MHD_RESULT +TEH_RESPONSE_reply_coin_denomination_conflict ( + struct MHD_Connection *connection, + enum TALER_ErrorCode ec, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_DenominationPublicKey *prev_denom_pub, + const struct TALER_DenominationSignature *prev_denom_sig); + +/** + * Send proof that a request is invalid to client because of * a conflicting value for the age commitment hash of a coin. * This function will create a message with the conflicting * hash value for the age commitment of the given coin. |