[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated (658dc77 -> 57b4438)
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated (658dc77 -> 57b4438) |
Date: |
Sat, 29 Aug 2020 14:03:01 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a change to branch master
in repository anastasis.
from 658dc77 Merge branch 'master' of ssh://git.taler.net/anastasis into
master
new c7c0147 fix conditional jump on unintiaksed value
new 27b42bf fix payment secret issue
new d40d08d fixed taler error codes
new 4ceb2e0 config file for anastasis-httpd and merchant-httpd to test cli
new a6a7528 fix variable
new 57b4438 fix test config file to work with 'make check'
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/backend/anastasis-httpd_policy.c | 10 +-
src/backend/anastasis-httpd_policy_upload.c | 9 +-
src/backend/anastasis-httpd_truth_upload.c | 2 +-
src/cli/anastasis-cli-splitter.c | 15 ++-
.../test_anastasis_cli.conf} | 118 ++++++++++++---------
src/lib/anastasis.c | 2 +-
src/lib/test_anastasis_api.conf | 18 +++-
src/stasis/plugin_anastasis_postgres.c | 6 +-
8 files changed, 113 insertions(+), 67 deletions(-)
copy src/{lib/test_anastasis_api.conf => cli/test_anastasis_cli.conf} (73%)
diff --git a/src/backend/anastasis-httpd_policy.c
b/src/backend/anastasis-httpd_policy.c
index 2717783..cc853a4 100644
--- a/src/backend/anastasis-httpd_policy.c
+++ b/src/backend/anastasis-httpd_policy.c
@@ -118,19 +118,19 @@ AH_return_policy (struct MHD_Connection *connection,
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_HARD_FETCH_ERROR,
"hard database failure");
case ANASTASIS_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_SOFT_FETCH_ERROR,
"soft database failure");
case ANASTASIS_DB_STATUS_NO_RESULTS:
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+
TALER_EC_SYNC_DB_INCONSISTENT_FETCH_ERROR,
"unexpected empty result set (try
again?)");
case ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT:
/* interesting case below */
@@ -234,13 +234,13 @@ AH_policy_get (struct MHD_Connection *connection,
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_HARD_FETCH_ERROR,
"hard database failure");
case ANASTASIS_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_SOFT_FETCH_ERROR,
"soft database failure");
case ANASTASIS_DB_STATUS_NO_RESULTS:
{
diff --git a/src/backend/anastasis-httpd_policy_upload.c
b/src/backend/anastasis-httpd_policy_upload.c
index 6ac6158..e12506a 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -725,8 +725,11 @@ AH_handler_policy_post (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- // FIXME: ANASTASIS error c
- TALER_EC_SYNC_BAD_CONTENT_LENGTH,
+ (NULL == lens)
+ ?
+ TALER_EC_SYNC_MISSING_CONTENT_LENGTH
+ :
+
TALER_EC_SYNC_MALFORMED_CONTENT_LENGTH,
(NULL == lens)
? "Content-length value missing"
: "Content-length value malformed");
@@ -736,7 +739,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_PAYLOAD_TOO_LARGE,
- TALER_EC_SYNC_BAD_CONTENT_LENGTH,
+
TALER_EC_SYNC_MALFORMED_CONTENT_LENGTH,
"Content-length value not
acceptable");
}
puc->upload = GNUNET_malloc_large (len);
diff --git a/src/backend/anastasis-httpd_truth_upload.c
b/src/backend/anastasis-httpd_truth_upload.c
index 645e4e0..41f5366 100644
--- a/src/backend/anastasis-httpd_truth_upload.c
+++ b/src/backend/anastasis-httpd_truth_upload.c
@@ -158,7 +158,7 @@ AH_handler_truth_post (struct MHD_Connection *connection,
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+
TALER_EC_SYNC_DB_INCONSISTENT_FETCH_ERROR,
"database failure");
}
}
diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index 47f884a..34bca71 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -1273,7 +1273,6 @@ read_keyboard_command (void *cls)
GNUNET_SCHEDULER_shutdown ();
return;
}
- // core secret here is just for testing, if payment is needed
if (characters > strlen ("publish"))
{
char *token_start = &buffer[strlen ("publish ")];
@@ -1288,7 +1287,7 @@ read_keyboard_command (void *cls)
(char *) sss->core_secret);
sss->http_status = MHD_HTTP_NO_CONTENT;
}
-
+ // core secret here is just for testing, if payment is needed
// FIXME: avoid uploading recovery document like this
if (characters == strlen ("publish"))
{
@@ -1317,6 +1316,18 @@ read_keyboard_command (void *cls)
free (buffer);
buffer = (char *) NULL;
}
+ /** FIXME: Shall we delete order_id/payment secret if not given during
second 'publish' command?
+ * Shall we even ask for payment secret, if given before? Or shall the
user have the option
+ * to use a different payment secret for second/further 'publish'
command/s?
+ */
+ else
+ {
+ if (pds[i]->payment_order_id)
+ {
+ GNUNET_free (pds[i]->payment_order_id);
+ pds[i]->payment_order_id = NULL;
+ }
+ }
printf ("\n");
}
sss->pds = (const struct ANASTASIS_PaymentDetails **) pds;
diff --git a/src/lib/test_anastasis_api.conf b/src/cli/test_anastasis_cli.conf
similarity index 73%
copy from src/lib/test_anastasis_api.conf
copy to src/cli/test_anastasis_cli.conf
index 560b005..f15392b 100644
--- a/src/lib/test_anastasis_api.conf
+++ b/src/cli/test_anastasis_cli.conf
@@ -15,11 +15,14 @@ TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
[taler]
# What currency do we use?
-currency = EUR
-CURRENCY_ROUND_UNIT = EUR:0.01
+#currency = EUR
+currency = TESTKUDOS
+#CURRENCY_ROUND_UNIT = EUR:0.01
+#CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
[bank]
HTTP_PORT = 8082
+#BASE_URL = https://bank.test.taler.net/
##########################################
# Configuration for Anastasis #
@@ -37,11 +40,13 @@ DB = postgres
PAYMENT_BACKEND_URL = http://localhost:8080/
# Annual fee we charge.
-ANNUAL_FEE = EUR:4.99
+#ANNUAL_FEE = EUR:4.99
+ANNUAL_FEE = TESTKUDOS:4.99
#ANNUAL_FEE = EUR:0
# Cost of authentication by question
-QUESTION_COST = EUR:0
+#QUESTION_COST = EUR:0
+QUESTION_COST = TESTKUDOS:0
# Upload limit
UPLOAD_LIMIT_MB = 1
@@ -72,10 +77,10 @@ WIRE_TRANSFER_DELAY = 0 s
DB = postgres
# Default choice for maximum wire fee.
-DEFAULT_MAX_WIRE_FEE = EUR:0.10
+DEFAULT_MAX_WIRE_FEE = TESTKUDOS:0.10
# Default choice for maximum deposit fee.
-DEFAULT_MAX_DEPOSIT_FEE = EUR:0.10
+DEFAULT_MAX_DEPOSIT_FEE = TESTKUDOS:0.10
# This specifies which database the postgres backend uses.
@@ -106,13 +111,23 @@ ACTIVE_default = YES
# Sections starting with "exchange-" specify trusted exchanges
# (by the merchant)
[merchant-exchange-default]
-MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-EXCHANGE_BASE_URL = http://localhost:8081/
-CURRENCY = EUR
+#MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
+#EXCHANGE_BASE_URL = http://localhost:8081/
+MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
+EXCHANGE_BASE_URL = https://exchange.test.taler.net/
+#CURRENCY = EUR
+CURRENCY = TESTKUDOS
+
+
# only fixes skips.
[auditor]
BASE_URL = http://the.auditor/
+#BASE_URL = https://auditor.test.taler.net/
+#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
+# If currency does not match [TALER] section, the auditor
+# will be ignored!
+CURRENCY = TESTKUDOS
# Auditors must be in sections "auditor-", the rest of the section
# name could be anything.
@@ -129,7 +144,7 @@ URL = http://taler.ezb.eu/
PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
# Which currency is this auditor trusted for?
-CURRENCY = EUR
+CURRENCY = TESTKUDOS
###################################################
@@ -158,13 +173,14 @@ lookahead_provide = 4 weeks 1 day
DB = postgres
# HTTP port the exchange listens to
-PORT = 8081
+#PORT = 8081
# Our public key
MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
# Base URL of the exchange.
BASE_URL = "http://localhost:8081/"
+#BASE_URL = https://exchange.test.taler.net/
##############################################################
@@ -215,68 +231,68 @@ ENABLE_CREDIT = YES
# Fees for the forseeable future...
# If you see this after 2018, update to match the next 10 years...
-WIRE-FEE-2018 = EUR:0.01
-WIRE-FEE-2019 = EUR:0.01
-WIRE-FEE-2020 = EUR:0.01
-WIRE-FEE-2021 = EUR:0.01
-WIRE-FEE-2022 = EUR:0.01
-WIRE-FEE-2023 = EUR:0.01
-WIRE-FEE-2024 = EUR:0.01
-WIRE-FEE-2025 = EUR:0.01
-WIRE-FEE-2026 = EUR:0.01
-WIRE-FEE-2027 = EUR:0.01
-CLOSING-FEE-2018 = EUR:0.01
-CLOSING-FEE-2019 = EUR:0.01
-CLOSING-FEE-2020 = EUR:0.01
-CLOSING-FEE-2021 = EUR:0.01
-CLOSING-FEE-2022 = EUR:0.01
-CLOSING-FEE-2023 = EUR:0.01
-CLOSING-FEE-2024 = EUR:0.01
-CLOSING-FEE-2025 = EUR:0.01
-CLOSING-FEE-2026 = EUR:0.01
-CLOSING-FEE-2027 = EUR:0.01
+WIRE-FEE-2018 = TESTKUDOS:0.01
+WIRE-FEE-2019 = TESTKUDOS:0.01
+WIRE-FEE-2020 = TESTKUDOS:0.01
+WIRE-FEE-2021 = TESTKUDOS:0.01
+WIRE-FEE-2022 = TESTKUDOS:0.01
+WIRE-FEE-2023 = TESTKUDOS:0.01
+WIRE-FEE-2024 = TESTKUDOS:0.01
+WIRE-FEE-2025 = TESTKUDOS:0.01
+WIRE-FEE-2026 = TESTKUDOS:0.01
+WIRE-FEE-2027 = TESTKUDOS:0.01
+CLOSING-FEE-2018 = TESTKUDOS:0.01
+CLOSING-FEE-2019 = TESTKUDOS:0.01
+CLOSING-FEE-2020 = TESTKUDOS:0.01
+CLOSING-FEE-2021 = TESTKUDOS:0.01
+CLOSING-FEE-2022 = TESTKUDOS:0.01
+CLOSING-FEE-2023 = TESTKUDOS:0.01
+CLOSING-FEE-2024 = TESTKUDOS:0.01
+CLOSING-FEE-2025 = TESTKUDOS:0.01
+CLOSING-FEE-2026 = TESTKUDOS:0.01
+CLOSING-FEE-2027 = TESTKUDOS:0.01
[coin_eur_ct_1]
-value = EUR:0.01
+value = TESTKUDOS:0.01
duration_withdraw = 7 days
duration_spend = 2 years
duration_legal = 3 years
-fee_withdraw = EUR:0.00
-fee_deposit = EUR:0.00
-fee_refresh = EUR:0.01
-fee_refund = EUR:0.01
+fee_withdraw = TESTKUDOS:0.00
+fee_deposit = TESTKUDOS:0.00
+fee_refresh = TESTKUDOS:0.01
+fee_refund = TESTKUDOS:0.01
rsa_keysize = 1024
[coin_eur_ct_10]
-value = EUR:0.10
+value = TESTKUDOS:0.10
duration_withdraw = 7 days
duration_spend = 2 years
duration_legal = 3 years
-fee_withdraw = EUR:0.01
-fee_deposit = EUR:0.01
-fee_refresh = EUR:0.03
-fee_refund = EUR:0.01
+fee_withdraw = TESTKUDOS:0.01
+fee_deposit = TESTKUDOS:0.01
+fee_refresh = TESTKUDOS:0.03
+fee_refund = TESTKUDOS:0.01
rsa_keysize = 1024
[coin_eur_1]
-value = EUR:1
+value = TESTKUDOS:1
duration_withdraw = 7 days
duration_spend = 2 years
duration_legal = 3 years
-fee_withdraw = EUR:0.01
-fee_deposit = EUR:0.01
-fee_refresh = EUR:0.03
-fee_refund = EUR:0.01
+fee_withdraw = TESTKUDOS:0.01
+fee_deposit = TESTKUDOS:0.01
+fee_refresh = TESTKUDOS:0.03
+fee_refund = TESTKUDOS:0.01
rsa_keysize = 1024
[coin_eur_5]
-value = EUR:5
+value = TESTKUDOS:5
duration_withdraw = 7 days
duration_spend = 2 years
duration_legal = 3 years
-fee_withdraw = EUR:0.01
-fee_deposit = EUR:0.01
-fee_refresh = EUR:0.03
-fee_refund = EUR:0.01
+fee_withdraw = TESTKUDOS:0.01
+fee_deposit = TESTKUDOS:0.01
+fee_refresh = TESTKUDOS:0.03
+fee_refund = TESTKUDOS:0.01
rsa_keysize = 1024
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index 5adc9d8..e943284 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -418,7 +418,7 @@ ANASTASIS_get_challenge (struct ANASTASIS_Challenge
*challenge,
ci->url = challenge->url;
ci->nonce = &challenge->nonce;
ci->instructions = challenge->instructions;
- ci->solved = &challenge->solved;
+ ci->solved = challenge->solved;
ci->challenge = challenge;
challenge->cc (ci,
200);
diff --git a/src/lib/test_anastasis_api.conf b/src/lib/test_anastasis_api.conf
index 560b005..93c6f06 100644
--- a/src/lib/test_anastasis_api.conf
+++ b/src/lib/test_anastasis_api.conf
@@ -15,11 +15,14 @@ TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
[taler]
# What currency do we use?
+#currency = EUR
currency = EUR
-CURRENCY_ROUND_UNIT = EUR:0.01
+#CURRENCY_ROUND_UNIT = EUR:0.01
+#CURRENCY_ROUND_UNIT = EUR:0.01
[bank]
HTTP_PORT = 8082
+#BASE_URL = https://bank.test.taler.net/
##########################################
# Configuration for Anastasis #
@@ -37,10 +40,12 @@ DB = postgres
PAYMENT_BACKEND_URL = http://localhost:8080/
# Annual fee we charge.
+#ANNUAL_FEE = EUR:4.99
ANNUAL_FEE = EUR:4.99
#ANNUAL_FEE = EUR:0
# Cost of authentication by question
+#QUESTION_COST = EUR:0
QUESTION_COST = EUR:0
# Upload limit
@@ -108,11 +113,21 @@ ACTIVE_default = YES
[merchant-exchange-default]
MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
EXCHANGE_BASE_URL = http://localhost:8081/
+#MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
+#EXCHANGE_BASE_URL = https://exchange.test.taler.net/
+#CURRENCY = EUR
CURRENCY = EUR
+
+
# only fixes skips.
[auditor]
BASE_URL = http://the.auditor/
+#BASE_URL = https://auditor.test.taler.net/
+#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
+# If currency does not match [TALER] section, the auditor
+# will be ignored!
+CURRENCY = EUR
# Auditors must be in sections "auditor-", the rest of the section
# name could be anything.
@@ -165,6 +180,7 @@ MASTER_PUBLIC_KEY =
T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
# Base URL of the exchange.
BASE_URL = "http://localhost:8081/"
+#BASE_URL = https://exchange.test.taler.net/
##############################################################
diff --git a/src/stasis/plugin_anastasis_postgres.c
b/src/stasis/plugin_anastasis_postgres.c
index 28f8ef9..0fe5831 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -520,9 +520,6 @@ postgres_store_recovery_document (void *cls,
"postcounter_select",
params,
rs);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Post counter from db: %i\n",
- postcounter);
}
switch (qs)
@@ -538,6 +535,9 @@ postgres_store_recovery_document (void *cls,
rollback (pg);
return ANASTASIS_DB_STATUS_HARD_ERROR;
case ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT:
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Post counter from db: %i\n",
+ postcounter);
break;
default:
// FIXME: Some Action
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-anastasis] branch master updated (658dc77 -> 57b4438),
gnunet <=
- [taler-anastasis] 02/06: fix payment secret issue, gnunet, 2020/08/29
- [taler-anastasis] 01/06: fix conditional jump on unintiaksed value, gnunet, 2020/08/29
- [taler-anastasis] 03/06: fixed taler error codes, gnunet, 2020/08/29
- [taler-anastasis] 06/06: fix test config file to work with 'make check', gnunet, 2020/08/29
- [taler-anastasis] 04/06: config file for anastasis-httpd and merchant-httpd to test cli, gnunet, 2020/08/29
- [taler-anastasis] 05/06: fix variable, gnunet, 2020/08/29