commit ed02edd8e2e906c1ef25a15ea382f97e1d30aaf3
parent a2438f668d4e7a2968a083da52f1b593bc892f0d
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 4 Aug 2026 15:00:03 +0200
update GANA
Diffstat:
3 files changed, 278 insertions(+), 25 deletions(-)
diff --git a/src/include/taler/taler_error_codes.h b/src/include/taler/taler_error_codes.h
@@ -3194,7 +3194,7 @@ enum TALER_ErrorCode
/**
- * The order was already paid, but completing a different choice than the one given in this request. The request does not describe the payment that was made; the client should use the choice the order was actually paid with.
+ * The order was already paid, but completing a different choice than the one given in this request. The client should use the choice the order was actually paid with.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
*/
@@ -3454,8 +3454,8 @@ enum TALER_ErrorCode
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
*/
- TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE =
- 2500,
+ TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE = 2500
+ ,
/**
@@ -3592,8 +3592,8 @@ enum TALER_ErrorCode
* Returned with an HTTP status code of #MHD_HTTP_GONE (410).
* (A value of 0 indicates that the error is generated client-side).
*/
- TALER_EC_MERCHANT_PRIVATE_GET_STATISTICS_REPORT_GRANULARITY_UNAVAILABLE =
- 2525,
+ TALER_EC_MERCHANT_PRIVATE_GET_STATISTICS_REPORT_GRANULARITY_UNAVAILABLE = 2525
+ ,
/**
@@ -3617,8 +3617,8 @@ enum TALER_ErrorCode
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
* (A value of 0 indicates that the error is generated client-side).
*/
- TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT =
- 2532,
+ TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT = 2532
+ ,
/**
@@ -3675,8 +3675,8 @@ enum TALER_ErrorCode
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
*/
- TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_ALREADY_EXISTS =
- 2539,
+ TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_ALREADY_EXISTS = 2539
+ ,
/**
@@ -5147,6 +5147,126 @@ enum TALER_ErrorCode
/**
+ * The wallet does not have a purchase for the requested order.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_PURCHASE_NOT_FOUND = 7051,
+
+
+ /**
+ * The wallet does not have a transaction with the requested transaction identifier.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_TRANSACTION_NOT_FOUND = 7052,
+
+
+ /**
+ * The requested action is not supported for this type of transaction.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_TRANSACTION_ACTION_UNSUPPORTED = 7053,
+
+
+ /**
+ * The operation would exceed a limit imposed by the exchange that the user cannot raise by completing a KYC process.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_KYC_LIMIT_EXCEEDED = 7054,
+
+
+ /**
+ * The wallet does not know an exchange that can be used for this operation. Check that an exchange for the requested currency has been added to the wallet.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_NO_SUITABLE_EXCHANGE = 7055,
+
+
+ /**
+ * The wallet does not have a known bank account with the requested identifier.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_BANK_ACCOUNT_NOT_FOUND = 7056,
+
+
+ /**
+ * The exchange does not know the contract of this peer-to-peer payment. It may have expired.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_PEER_CONTRACT_NOT_FOUND = 7057,
+
+
+ /**
+ * The purse of this peer-to-peer push payment is gone. The sender likely aborted the payment.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_PEER_PUSH_CREDIT_PURSE_GONE = 7058,
+
+
+ /**
+ * This invoice has already been paid, possibly by another wallet.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_PEER_PULL_DEBIT_ALREADY_PAID = 7059,
+
+
+ /**
+ * The tokens can not be deleted, as at least one of them is currently being used in a transaction.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_TOKENS_IN_USE = 7060,
+
+
+ /**
+ * The operation is not supported by the database backend that the wallet is currently running on.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_DB_BACKEND_UNSUPPORTED = 7061,
+
+
+ /**
+ * The wallet could not use the mailbox service.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_MAILBOX_UNAVAILABLE = 7062,
+
+
+ /**
+ * The wallet could not register an alias with the directory service.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_ALIAS_REGISTRATION_FAILED = 7063,
+
+
+ /**
+ * The contract terms use a feature that this version of the wallet does not support. Updating the wallet may help.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_CONTRACT_TERMS_UNSUPPORTED = 7064,
+
+
+ /**
+ * The exchange served data that is not correctly signed by its master key. The wallet refuses to use this exchange.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_WALLET_EXCHANGE_SIGNATURE_INVALID = 7065,
+
+
+ /**
* We encountered a timeout with our payment backend.
* Returned with an HTTP status code of #MHD_HTTP_GATEWAY_TIMEOUT (504).
* (A value of 0 indicates that the error is generated client-side).
@@ -5876,7 +5996,7 @@ enum TALER_ErrorCode
/**
* The grant is unknown to the service (it could also have expired).
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
TALER_EC_CHALLENGER_GRANT_UNKNOWN = 9753,
@@ -5884,7 +6004,7 @@ enum TALER_ErrorCode
/**
* The code given is not even well-formed.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE = 9754,
@@ -5892,7 +6012,7 @@ enum TALER_ErrorCode
/**
* The service is not aware of the referenced validation process.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
TALER_EC_CHALLENGER_GENERIC_VALIDATION_UNKNOWN = 9755,
@@ -6011,6 +6131,14 @@ enum TALER_ErrorCode
/**
+ * The website specified in the request is not acceptable for this backend. Somehow the client must have specified an invalid website which is not configured for this Paivana reverse proxy and thus not eligible as a target for the redirect. A developer should check how the client computed the fulfillment_url of the order and fix it.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_PAIVANA_INVALID_TARGET = 9809,
+
+
+ /**
* End of error code range.
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
* (A value of 0 indicates that the error is generated client-side).
diff --git a/src/include/taler/taler_signatures.h b/src/include/taler/taler_signatures.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2026 Taler Systems SA
+ Copyright (C) 2014-2022 Taler Systems SA
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
@@ -413,13 +413,13 @@
/**
- * Signature used to register a prepared transfer identified by the respective authorization key.
+ * Signature used to set an account public key as new target of a given wire transfer subject identified by the respective authorization key. Used when shortening wire transfer subjects as per DD80. The public keypair used for signing corresponds to the wire transfer subject, while the account key is the reserve public key or the merchant public key the wire transfer should be mapped to. Note that despite its name, this signature is not only created by wallets, but also by merchant backends.
*/
#define TALER_SIGNATURE_WALLET_PREPARED_TRANSFER_REGISTER 1224
/**
- * Signature used to unregister a prepared transfer identified by the respective authorization key.
+ * FIXME-Antoine.
*/
#define TALER_SIGNATURE_WALLET_PREPARED_TRANSFER_UNREGISTER 1225
diff --git a/src/util/taler_error_codes.c b/src/util/taler_error_codes.c
@@ -2916,8 +2916,8 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
{
/* 2166 */
- .ec =
- TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_WIRE_FEE_ADDITION_FAILED,
+ .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_WIRE_FEE_ADDITION_FAILED
+ ,
.hint =
"The exchange of the deposited coin charges a wire fee that could not be added to the total (total amount too high).",
.http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
@@ -3141,8 +3141,8 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
{
/* 2254 */
- .ec =
- TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE,
+ .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE
+ ,
.hint =
"The payment was already completed and thus cannot be aborted anymore.",
.http_code = MHD_HTTP_PRECONDITION_FAILED
@@ -3409,8 +3409,8 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
{
/* 2510 */
- .ec =
- TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT,
+ .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT
+ ,
.hint = "One of the paths to forget is malformed.",
.http_code = MHD_HTTP_BAD_REQUEST
},
@@ -4952,6 +4952,123 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ /* 7051 */
+ .ec = TALER_EC_WALLET_PURCHASE_NOT_FOUND,
+ .hint = "The wallet does not have a purchase for the requested order.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7052 */
+ .ec = TALER_EC_WALLET_TRANSACTION_NOT_FOUND,
+ .hint =
+ "The wallet does not have a transaction with the requested transaction identifier.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7053 */
+ .ec = TALER_EC_WALLET_TRANSACTION_ACTION_UNSUPPORTED,
+ .hint =
+ "The requested action is not supported for this type of transaction.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7054 */
+ .ec = TALER_EC_WALLET_KYC_LIMIT_EXCEEDED,
+ .hint =
+ "The operation would exceed a limit imposed by the exchange that the user cannot raise by completing a KYC process.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7055 */
+ .ec = TALER_EC_WALLET_NO_SUITABLE_EXCHANGE,
+ .hint =
+ "The wallet does not know an exchange that can be used for this operation. Check that an exchange for the requested currency has been added to the wallet.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7056 */
+ .ec = TALER_EC_WALLET_BANK_ACCOUNT_NOT_FOUND,
+ .hint =
+ "The wallet does not have a known bank account with the requested identifier.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7057 */
+ .ec = TALER_EC_WALLET_PEER_CONTRACT_NOT_FOUND,
+ .hint =
+ "The exchange does not know the contract of this peer-to-peer payment. It may have expired.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7058 */
+ .ec = TALER_EC_WALLET_PEER_PUSH_CREDIT_PURSE_GONE,
+ .hint =
+ "The purse of this peer-to-peer push payment is gone. The sender likely aborted the payment.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7059 */
+ .ec = TALER_EC_WALLET_PEER_PULL_DEBIT_ALREADY_PAID,
+ .hint = "This invoice has already been paid, possibly by another wallet.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7060 */
+ .ec = TALER_EC_WALLET_TOKENS_IN_USE,
+ .hint =
+ "The tokens can not be deleted, as at least one of them is currently being used in a transaction.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7061 */
+ .ec = TALER_EC_WALLET_DB_BACKEND_UNSUPPORTED,
+ .hint =
+ "The operation is not supported by the database backend that the wallet is currently running on.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7062 */
+ .ec = TALER_EC_WALLET_MAILBOX_UNAVAILABLE,
+ .hint = "The wallet could not use the mailbox service.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7063 */
+ .ec = TALER_EC_WALLET_ALIAS_REGISTRATION_FAILED,
+ .hint =
+ "The wallet could not register an alias with the directory service.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7064 */
+ .ec = TALER_EC_WALLET_CONTRACT_TERMS_UNSUPPORTED,
+ .hint =
+ "The contract terms use a feature that this version of the wallet does not support. Updating the wallet may help.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ /* 7065 */
+ .ec = TALER_EC_WALLET_EXCHANGE_SIGNATURE_INVALID,
+ .hint =
+ "The exchange served data that is not correctly signed by its master key. The wallet refuses to use this exchange.",
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
/* 8000 */
.ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_TIMEOUT,
.hint = "We encountered a timeout with our payment backend.",
@@ -5630,21 +5747,21 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
/* 9753 */
.ec = TALER_EC_CHALLENGER_GRANT_UNKNOWN,
.hint = "The grant is unknown to the service (it could also have expired).",
- .http_code = MHD_HTTP_UNAUTHORIZED
+ .http_code = MHD_HTTP_BAD_REQUEST
},
{
/* 9754 */
.ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE,
.hint = "The code given is not even well-formed.",
- .http_code = MHD_HTTP_UNAUTHORIZED
+ .http_code = MHD_HTTP_BAD_REQUEST
},
{
/* 9755 */
.ec = TALER_EC_CHALLENGER_GENERIC_VALIDATION_UNKNOWN,
.hint = "The service is not aware of the referenced validation process.",
- .http_code = MHD_HTTP_UNAUTHORIZED
+ .http_code = MHD_HTTP_BAD_REQUEST
},
{
@@ -5757,6 +5874,14 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ /* 9809 */
+ .ec = TALER_EC_PAIVANA_INVALID_TARGET,
+ .hint =
+ "The website specified in the request is not acceptable for this backend. Somehow the client must have specified an invalid website which is not configured for this Paivana reverse proxy and thus not eligible as a target for the redirect. A developer should check how the client computed the fulfillment_url of the order and fix it.",
+ .http_code = MHD_HTTP_CONFLICT
+ },
+
+ {
/* 9999 */
.ec = TALER_EC_END,
.hint = "End of error code range.",
@@ -5770,7 +5895,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
/**
* The length of @e code_hint_pairs.
*/
-static const unsigned int code_hint_pairs_length = 745;
+static const unsigned int code_hint_pairs_length = 761;
const char *