From 8674f32aec8113ced6b2c2be625728b31158fff8 Mon Sep 17 00:00:00 2001 From: Gian Demarmels Date: Sat, 29 Jan 2022 12:57:25 +0100 Subject: [PATCH] denomination CIPHER field per denom --- src/auditor/generate-auditor-basedb.conf | 98 +++++++++++++++++++ src/benchmark/bank-benchmark.conf | 60 ++++++++++++ src/benchmark/benchmark.conf | 60 ++++++++++++ src/exchange/test_taler_exchange_httpd.conf | 36 +++++++ src/exchange/test_taler_exchange_unix.conf | 36 +++++++ ...st-taler-exchange-aggregator-postgres.conf | 12 +++ ...est-taler-exchange-wirewatch-postgres.conf | 12 +++ src/testing/test_auditor_api.conf | 60 ++++++++++++ src/testing/test_exchange_api.conf | 55 +++++++++++ ...test_exchange_api_keys_cherry_picking.conf | 12 +++ src/testing/test_kyc_api.conf | 60 ++++++++++++ src/util/taler-exchange-secmod-cs.c | 23 +++++ src/util/taler-exchange-secmod-rsa.c | 21 ++++ src/util/test_helper_cs.conf | 2 +- src/util/test_helper_rsa.conf | 1 + 15 files changed, 547 insertions(+), 1 deletion(-) diff --git a/src/auditor/generate-auditor-basedb.conf b/src/auditor/generate-auditor-basedb.conf index e5de0b592..205a04a26 100644 --- a/src/auditor/generate-auditor-basedb.conf +++ b/src/auditor/generate-auditor-basedb.conf @@ -106,6 +106,7 @@ fee_withdraw = TESTKUDOS:0.01 fee_deposit = TESTKUDOS:0.01 fee_refresh = TESTKUDOS:0.01 fee_refund = TESTKUDOS:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_ct_10] @@ -117,6 +118,7 @@ fee_withdraw = TESTKUDOS:0.01 fee_deposit = TESTKUDOS:0.01 fee_refresh = TESTKUDOS:0.03 fee_refund = TESTKUDOS:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_1] @@ -128,6 +130,7 @@ fee_withdraw = TESTKUDOS:0.02 fee_deposit = TESTKUDOS:0.02 fee_refresh = TESTKUDOS:0.03 fee_refund = TESTKUDOS:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_2] @@ -139,6 +142,7 @@ fee_withdraw = TESTKUDOS:0.03 fee_deposit = TESTKUDOS:0.03 fee_refresh = TESTKUDOS:0.04 fee_refund = TESTKUDOS:0.02 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_4] @@ -150,6 +154,7 @@ fee_withdraw = TESTKUDOS:0.03 fee_deposit = TESTKUDOS:0.03 fee_refresh = TESTKUDOS:0.04 fee_refund = TESTKUDOS:0.02 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_5] @@ -161,6 +166,7 @@ fee_withdraw = TESTKUDOS:0.01 fee_deposit = TESTKUDOS:0.01 fee_refresh = TESTKUDOS:0.03 fee_refund = TESTKUDOS:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_8] @@ -172,6 +178,7 @@ fee_withdraw = TESTKUDOS:0.05 fee_deposit = TESTKUDOS:0.02 fee_refresh = TESTKUDOS:0.03 fee_refund = TESTKUDOS:0.04 +CIPHER = RSA rsa_keysize = 1024 [coin_kudos_10] @@ -183,8 +190,99 @@ fee_withdraw = TESTKUDOS:0.01 fee_deposit = TESTKUDOS:0.01 fee_refresh = TESTKUDOS:0.03 fee_refund = TESTKUDOS:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_kudos_ct_1] +value = TESTKUDOS:0.01 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.01 +fee_deposit = TESTKUDOS:0.01 +fee_refresh = TESTKUDOS:0.01 +fee_refund = TESTKUDOS:0.01 +CIPHER = RSA +rsa_keysize = 1024 + +[coin_kudos_ct_10] +value = TESTKUDOS:0.10 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.01 +fee_deposit = TESTKUDOS:0.01 +fee_refresh = TESTKUDOS:0.03 +fee_refund = TESTKUDOS:0.01 +CIPHER = RSA +rsa_keysize = 1024 + +[coin_kudos_12] +value = TESTKUDOS:1 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.02 +fee_deposit = TESTKUDOS:0.02 +fee_refresh = TESTKUDOS:0.03 +fee_refund = TESTKUDOS:0.01 +CIPHER = CS + +[coin_kudos_21] +value = TESTKUDOS:2 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.03 +fee_deposit = TESTKUDOS:0.03 +fee_refresh = TESTKUDOS:0.04 +fee_refund = TESTKUDOS:0.02 +CIPHER = CS + +[coin_kudos_41] +value = TESTKUDOS:4 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.03 +fee_deposit = TESTKUDOS:0.03 +fee_refresh = TESTKUDOS:0.04 +fee_refund = TESTKUDOS:0.02 +CIPHER = CS + +[coin_kudos_51] +value = TESTKUDOS:5 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.01 +fee_deposit = TESTKUDOS:0.01 +fee_refresh = TESTKUDOS:0.03 +fee_refund = TESTKUDOS:0.01 +CIPHER = CS + +[coin_kudos_81] +value = TESTKUDOS:8 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.05 +fee_deposit = TESTKUDOS:0.02 +fee_refresh = TESTKUDOS:0.03 +fee_refund = TESTKUDOS:0.04 +CIPHER = CS + +[coin_kudos_111] +value = TESTKUDOS:10 +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = TESTKUDOS:0.01 +fee_deposit = TESTKUDOS:0.01 +fee_refresh = TESTKUDOS:0.03 +fee_refund = TESTKUDOS:0.01 +CIPHER = CS + [benchmark] BANK_DETAILS = bank_details.json MERCHANT_DETAILS = merchant_details.json diff --git a/src/benchmark/bank-benchmark.conf b/src/benchmark/bank-benchmark.conf index 1942d551b..c98b1374e 100644 --- a/src/benchmark/bank-benchmark.conf +++ b/src/benchmark/bank-benchmark.conf @@ -81,6 +81,7 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_ct_10] @@ -92,6 +93,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_1] @@ -103,6 +105,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_5] @@ -114,6 +117,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_10] @@ -125,4 +129,60 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 + +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + +[coin_eur_2] +value = EUR: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 +CIPHER = CS + +[coin_eur_6] +value = EUR: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 +CIPHER = RSA + +[coin_eur_11] +value = EUR: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 +CIPHER = CS diff --git a/src/benchmark/benchmark.conf b/src/benchmark/benchmark.conf index 5199ee872..375665a05 100644 --- a/src/benchmark/benchmark.conf +++ b/src/benchmark/benchmark.conf @@ -79,6 +79,7 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_ct_10] @@ -90,6 +91,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_1] @@ -101,6 +103,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_5] @@ -112,6 +115,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 [coin_eur_10] @@ -123,4 +127,60 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 2048 + +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + +[coin_eur_2] +value = EUR: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 +CIPHER = CS + +[coin_eur_6] +value = EUR: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 +CIPHER = RSA + +[coin_eur_11] +value = EUR: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 +CIPHER = CS \ No newline at end of file diff --git a/src/exchange/test_taler_exchange_httpd.conf b/src/exchange/test_taler_exchange_httpd.conf index 2adee5053..25938679b 100644 --- a/src/exchange/test_taler_exchange_httpd.conf +++ b/src/exchange/test_taler_exchange_httpd.conf @@ -79,6 +79,7 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_eur_ct_10] @@ -90,6 +91,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_eur_1] @@ -101,4 +103,38 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + +[coin_eur_2] +value = EUR: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 +CIPHER = CS diff --git a/src/exchange/test_taler_exchange_unix.conf b/src/exchange/test_taler_exchange_unix.conf index b9387f603..24e1a0fa4 100644 --- a/src/exchange/test_taler_exchange_unix.conf +++ b/src/exchange/test_taler_exchange_unix.conf @@ -79,6 +79,7 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_eur_ct_10] @@ -90,6 +91,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_eur_1] @@ -101,4 +103,38 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + +[coin_eur_2] +value = EUR: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 +CIPHER = CS \ No newline at end of file diff --git a/src/testing/test-taler-exchange-aggregator-postgres.conf b/src/testing/test-taler-exchange-aggregator-postgres.conf index 7f277629d..965f05b03 100644 --- a/src/testing/test-taler-exchange-aggregator-postgres.conf +++ b/src/testing/test-taler-exchange-aggregator-postgres.conf @@ -92,4 +92,16 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS \ No newline at end of file diff --git a/src/testing/test-taler-exchange-wirewatch-postgres.conf b/src/testing/test-taler-exchange-wirewatch-postgres.conf index d42f9d445..60d973c16 100644 --- a/src/testing/test-taler-exchange-wirewatch-postgres.conf +++ b/src/testing/test-taler-exchange-wirewatch-postgres.conf @@ -81,4 +81,16 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS \ No newline at end of file diff --git a/src/testing/test_auditor_api.conf b/src/testing/test_auditor_api.conf index 0b08d27ef..8e3cd28db 100644 --- a/src/testing/test_auditor_api.conf +++ b/src/testing/test_auditor_api.conf @@ -97,8 +97,20 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + [coin_eur_ct_10] value = EUR:0.10 duration_withdraw = 7 days @@ -108,8 +120,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + [coin_eur_1] value = EUR:1 duration_withdraw = 7 days @@ -119,8 +143,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_2] +value = EUR: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 +CIPHER = CS + [coin_eur_5] value = EUR:5 duration_withdraw = 7 days @@ -130,8 +166,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_6] +value = EUR: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 +CIPHER = CS + [coin_eur_10] value = EUR:10 duration_withdraw = 7 days @@ -141,4 +189,16 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_11] +value = EUR: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 +CIPHER = CS \ No newline at end of file diff --git a/src/testing/test_exchange_api.conf b/src/testing/test_exchange_api.conf index 48d5c2004..4f9f24f3c 100644 --- a/src/testing/test_exchange_api.conf +++ b/src/testing/test_exchange_api.conf @@ -94,8 +94,20 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + [coin_eur_ct_10] value = EUR:0.10 duration_withdraw = 7 days @@ -105,8 +117,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + [coin_eur_1] value = EUR:1 duration_withdraw = 7 days @@ -116,8 +140,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_2] +value = EUR: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 +CIPHER = CS + [coin_eur_5] value = EUR:5 duration_withdraw = 7 days @@ -127,8 +163,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_6] +value = EUR: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 +CIPHER = CS + [coin_eur_10] value = EUR:10 duration_withdraw = 7 days @@ -138,6 +186,7 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 [coin_eur_ct_1_age_restricted] @@ -151,6 +200,7 @@ fee_refresh = EUR:0.01 fee_refund = EUR:0.01 rsa_keysize = 1024 age_restricted = true +CIPHER = RSA [coin_eur_ct_10_age_restricted] value = EUR:0.10 @@ -163,6 +213,7 @@ fee_refresh = EUR:0.03 fee_refund = EUR:0.01 rsa_keysize = 1024 age_restricted = true +CIPHER = RSA [coin_eur_1_age_restricted] value = EUR:1 @@ -175,6 +226,7 @@ fee_refresh = EUR:0.03 fee_refund = EUR:0.01 rsa_keysize = 1024 age_restricted = true +CIPHER = RSA [coin_eur_5_age_restricted] value = EUR:5 @@ -187,6 +239,8 @@ fee_refresh = EUR:0.03 fee_refund = EUR:0.01 rsa_keysize = 1024 age_restricted = true +CIPHER = RSA + [coin_eur_10_age_restricted] value = EUR:10 @@ -199,3 +253,4 @@ fee_refresh = EUR:0.03 fee_refund = EUR:0.01 rsa_keysize = 1024 age_restricted = true +CIPHER = RSA diff --git a/src/testing/test_exchange_api_keys_cherry_picking.conf b/src/testing/test_exchange_api_keys_cherry_picking.conf index 14f897c5d..f4edaf429 100644 --- a/src/testing/test_exchange_api_keys_cherry_picking.conf +++ b/src/testing/test_exchange_api_keys_cherry_picking.conf @@ -103,4 +103,16 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_2] +value = EUR:1 +duration_withdraw = 5 s +duration_spend = 6 s +duration_legal = 7 s +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +fee_refund = EUR:0.01 +CIPHER = CS diff --git a/src/testing/test_kyc_api.conf b/src/testing/test_kyc_api.conf index 8ca6b74b8..2dce408b4 100644 --- a/src/testing/test_kyc_api.conf +++ b/src/testing/test_kyc_api.conf @@ -110,8 +110,20 @@ fee_withdraw = EUR:0.00 fee_deposit = EUR:0.00 fee_refresh = EUR:0.01 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_ct_2] +value = EUR: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 +CIPHER = CS + [coin_eur_ct_10] value = EUR:0.10 duration_withdraw = 7 days @@ -121,8 +133,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_ct_11] +value = EUR: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 +CIPHER = CS + [coin_eur_1] value = EUR:1 duration_withdraw = 7 days @@ -132,8 +156,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_2] +value = EUR: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 +CIPHER = CS + [coin_eur_5] value = EUR:5 duration_withdraw = 7 days @@ -143,8 +179,20 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 +[coin_eur_6] +value = EUR: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 +CIPHER = CS + [coin_eur_10] value = EUR:10 duration_withdraw = 7 days @@ -154,4 +202,16 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 fee_refund = EUR:0.01 +CIPHER = RSA rsa_keysize = 1024 + +[coin_eur_11] +value = EUR: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 +CIPHER = CS \ No newline at end of file diff --git a/src/util/taler-exchange-secmod-cs.c b/src/util/taler-exchange-secmod-cs.c index 8ff8dc79b..a47e9f220 100644 --- a/src/util/taler-exchange-secmod-cs.c +++ b/src/util/taler-exchange-secmod-cs.c @@ -43,6 +43,8 @@ #include +#define TALER_CFG_CIPHER_LEN 3 + /** * Information we keep per denomination. */ @@ -1360,6 +1362,7 @@ load_denominations (void *cls, struct LoadContext *ctx = cls; struct Denomination *denom; bool wake = true; + char *cipher; if ( (0 != strncasecmp (denomination_alias, "coin_", @@ -1368,6 +1371,26 @@ load_denominations (void *cls, "coin-", strlen ("coin-"))) ) return; /* not a denomination type definition */ + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (ctx->cfg, + denomination_alias, + "CIPHER", + &cipher)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + denomination_alias, + "CIPHER"); + return; + } + if (strlen (cipher) > TALER_CFG_CIPHER_LEN) + { + return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */ + } + if (0 != strcmp (cipher, "CS")) + { + return; /* Ignore denominations of other types than CS*/ + } + denom = GNUNET_new (struct Denomination); if (GNUNET_OK != parse_denomination_cfg (ctx->cfg, diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c index 433879299..fef20524d 100644 --- a/src/util/taler-exchange-secmod-rsa.c +++ b/src/util/taler-exchange-secmod-rsa.c @@ -41,6 +41,7 @@ #include "secmod_common.h" #include +#define TALER_CFG_CIPHER_LEN 3 /** * Information we keep per denomination. @@ -1340,6 +1341,7 @@ load_denominations (void *cls, struct LoadContext *ctx = cls; struct Denomination *denom; bool wake = true; + char *cipher; if ( (0 != strncasecmp (denomination_alias, "coin_", @@ -1348,6 +1350,25 @@ load_denominations (void *cls, "coin-", strlen ("coin-"))) ) return; /* not a denomination type definition */ + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (ctx->cfg, + denomination_alias, + "CIPHER", + &cipher)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + denomination_alias, + "CIPHER"); + return; + } + if (strlen (cipher) > TALER_CFG_CIPHER_LEN) + { + return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */ + } + if (0 != strcmp (cipher, "RSA")) + { + return; /* Ignore denominations of other types than CS */ + } denom = GNUNET_new (struct Denomination); if (GNUNET_OK != parse_denomination_cfg (ctx->cfg, diff --git a/src/util/test_helper_cs.conf b/src/util/test_helper_cs.conf index a5d1211a3..f3b5b834c 100644 --- a/src/util/test_helper_cs.conf +++ b/src/util/test_helper_cs.conf @@ -4,7 +4,7 @@ TALER_TEST_HOME = test_helper_cs_home/ [coin_1] DURATION_WITHDRAW = 1 minute -RSA_KEYSIZE = 2048 +CIPHER = CS [taler-exchange-secmod-cs] LOOKAHEAD_SIGN = 5 minutes diff --git a/src/util/test_helper_rsa.conf b/src/util/test_helper_rsa.conf index 6f445fc56..d50e64d95 100644 --- a/src/util/test_helper_rsa.conf +++ b/src/util/test_helper_rsa.conf @@ -4,6 +4,7 @@ TALER_TEST_HOME = test_helper_rsa_home/ [coin_1] DURATION_WITHDRAW = 1 minute +CIPHER = RSA RSA_KEYSIZE = 2048 [taler-exchange-secmod-rsa]