fix merge conflict

This commit is contained in:
Christian Grothoff 2020-01-19 17:04:35 +01:00
commit b6543b8f9a
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
40 changed files with 124 additions and 150 deletions

View File

@ -79,7 +79,7 @@ CURRENCY = TESTKUDOS
[account-1]
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
url = payto://x-taler-bank/localhost/Exchange
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
METHOD = x-taler-bank
enable_debit = yes
enable_credit = yes
@ -89,7 +89,7 @@ USERNAME = Exchange
PASSWORD = x
[account-merchant]
URL = payto://x-taler-bank/localhost/42
PAYTO_URI = payto://x-taler-bank/localhost/42
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/account-3.json
METHOD = x-taler-bank
HONOR_default = YES

View File

@ -1076,10 +1076,10 @@ wire_out_cb (void *cls,
return GNUNET_OK;
}
{
char *payto_url;
char *payto_uri;
payto_url = TALER_JSON_wire_to_payto (wire);
if (0 != strcasecmp (payto_url,
payto_uri = TALER_JSON_wire_to_payto (wire);
if (0 != strcasecmp (payto_uri,
roi->details.credit_account_url))
{
/* Destination bank account is wrong in actual wire transfer, so
@ -1112,10 +1112,10 @@ wire_out_cb (void *cls,
TALER_amount_add (&total_bad_amount_out_minus,
&total_bad_amount_out_minus,
amount));
GNUNET_free (payto_url);
GNUNET_free (payto_uri);
goto cleanup;
}
GNUNET_free (payto_url);
GNUNET_free (payto_uri);
}
if (0 != TALER_amount_cmp (&roi->details.amount,
amount))

View File

@ -4,7 +4,7 @@ TINY_AMOUNT = TESTKUDOS:0.01
[account-1]
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
url = payto://x-taler-bank/localhost/Exchange
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
METHOD = x-taler-bank
enable_debit = yes
enable_credit = yes

View File

@ -218,7 +218,7 @@ main (int argc, char *const *argv)
(GNUNET_GETOPT_option_string ('C',
"credit",
"ACCOUNT",
"payto URL of the bank account to credit",
"payto URI of the bank account to credit",
&credit_account)),
GNUNET_GETOPT_option_mandatory
(GNUNET_GETOPT_option_string ('s',

View File

@ -45,7 +45,7 @@ USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42
[account-2]
# What is the payto://-URL of the exchange (to generate wire response)
URL = "payto://x-taler-bank/localhost:8082/2"
PAYTO_URI = "payto://x-taler-bank/localhost:8082/2"
# What is the bank account (with the "Taler Bank" demo system)? Must end with "/".
WIRE_GATEWAY_URL = http://localhost:8082/2/
# This is the response we give out for the /wire request. It provides

View File

@ -92,7 +92,7 @@ static struct TALER_TESTING_ExchangeConfiguration ec;
/**
* Hold information about a user at the bank.
*/
static char *user_payto_url;
static char *user_payto_uri;
/**
* Time snapshot taken right before executing the CMDs.
@ -189,7 +189,7 @@ CMD_TRANSFER_TO_EXCHANGE (char *label, char *amount)
(TALER_TESTING_cmd_admin_add_incoming (label,
amount,
&exchange_bank_account,
user_payto_url));
user_payto_uri));
}
@ -322,12 +322,11 @@ run (void *cls,
(TALER_TESTING_cmd_deposit ("deposit",
withdraw_label,
0, /* Index of the one withdrawn coin in the traits. */
user_payto_url,
user_payto_uri,
order_enc,
GNUNET_TIME_UNIT_ZERO,
amount_1,
MHD_HTTP_OK));
if (eval_probability (refresh_rate / 100.0))
{
char *melt_label;
@ -817,7 +816,7 @@ main (int argc,
GNUNET_CONFIGURATION_get_value_string (cfg,
"benchmark",
"USER_PAYTO_URI",
&user_payto_url))
&user_payto_uri))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"benchmark",

View File

@ -72,7 +72,7 @@ sign_account_data (void *cls,
return;
}
wire = TALER_JSON_exchange_wire_signature_make (ai->payto_url,
wire = TALER_JSON_exchange_wire_signature_make (ai->payto_uri,
&master_priv);
GNUNET_assert (NULL != wire);
json_out = json_dumps (wire,

View File

@ -110,13 +110,13 @@ load_account (void *cls,
return;
}
if (0 != strcasecmp (url,
ai->payto_url))
ai->payto_uri))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"URL in Wire response file `%s' does not match URL in configuration (%s vs %s)!\n",
ai->wire_response_filename,
url,
ai->payto_url);
ai->payto_uri);
json_decref (wire_s);
GNUNET_free (url);
*ret = GNUNET_SYSERR;
@ -146,7 +146,7 @@ load_account (void *cls,
*ret = GNUNET_SYSERR;
return;
}
method = TALER_payto_get_method (ai->payto_url);
method = TALER_payto_get_method (ai->payto_uri);
if (GNUNET_OK ==
load_fee (method))
{

View File

@ -47,18 +47,11 @@ IDLE_RESERVE_EXPIRATION_TIME = 4 weeks
CONFIG = "postgres:///talercheck"
[account-1]
# What is the main website of the bank?
URL = "payto://x-taler-bank/localhost:8082/3"
PAYTO_URI = "payto://x-taler-bank/localhost:8082/3"
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
METHOD = "x-taler-bank"
ENABLE_DEBIT = YES
ENABLE_CREDIT = YES
TALER_BANK_AUTH_METHOD = NONE

View File

@ -62,7 +62,7 @@ check_for_account (void *cls,
{
struct FindAccountContext *ctx = cls;
char *method;
char *payto_url;
char *payto_uri;
char *wire_response_filename;
struct TALER_EXCHANGEDB_AccountInfo ai;
@ -73,12 +73,12 @@ check_for_account (void *cls,
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (ctx->cfg,
section,
"URL",
&payto_url))
"PAYTO_URI",
&payto_uri))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
section,
"URL");
"PAYTO_URI");
return;
}
if (GNUNET_OK !=
@ -90,7 +90,7 @@ check_for_account (void *cls,
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
section,
"METHOD");
GNUNET_free (payto_url);
GNUNET_free (payto_uri);
return;
}
if (GNUNET_OK !=
@ -101,7 +101,7 @@ check_for_account (void *cls,
wire_response_filename = NULL;
ai.section_name = section;
ai.method = method;
ai.payto_url = payto_url;
ai.payto_uri = payto_uri;
ai.wire_response_filename = wire_response_filename;
ai.debit_enabled = (GNUNET_YES ==
@ -114,7 +114,7 @@ check_for_account (void *cls,
"ENABLE_CREDIT"));
ctx->cb (ctx->cb_cls,
&ai);
GNUNET_free (payto_url);
GNUNET_free (payto_uri);
GNUNET_free (method);
GNUNET_free_non_null (wire_response_filename);
}

View File

@ -760,7 +760,7 @@ cb_wt_check (void *cls,
GNUNET_assert (0 == GNUNET_memcmp (merchant_pub,
&merchant_pub_wt));
GNUNET_assert (0 == strcmp (json_string_value (json_object_get (wire,
"url")),
"payto_uri")),
"payto://sepa/DE67830654080004822650"));
GNUNET_assert (0 == GNUNET_memcmp (h_wire,
&h_wire_wt));
@ -1257,7 +1257,7 @@ test_wire_out (struct TALER_EXCHANGEDB_Session *session,
json_t *wire_out_account;
wire_out_account = json_pack ("{s:s,s:s}",
"url",
"payto_uri",
"payto://x-taler-bank/localhost:8080/1",
"salt", "this-is-my-salt");
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
@ -1473,7 +1473,7 @@ run (void *cls)
session = NULL;
deposit.coin.denom_sig.rsa_signature = NULL;
wire = json_pack ("{s:s, s:s}",
"url", "payto://sepa/DE67830654080004822650",
"payto_uri", "payto://sepa/DE67830654080004822650",
"salt", "this-is-a-salt-value");
ZR_BLK (&cbc);
ZR_BLK (&cbc2);

View File

@ -741,24 +741,24 @@ TALER_refresh_get_commitment (struct TALER_RefreshCommitmentP *rc,
* Compute the hash of the given wire details. The resulting
* hash is what is put into the contract.
*
* @param payto_url bank account
* @param payto_uri bank account
* @param[out] hc set to the hash
*/
void
TALER_exchange_wire_signature_hash (const char *payto_url,
TALER_exchange_wire_signature_hash (const char *payto_uri,
struct GNUNET_HashCode *hc);
/**
* Check the signature in @a wire_s.
*
* @param payto_url URL that is signed
* @param payto_uri URL that is signed
* @param master_pub master public key of the exchange
* @param master_sig signature of the exchange
* @return #GNUNET_OK if signature is valid
*/
int
TALER_exchange_wire_signature_check (const char *payto_url,
TALER_exchange_wire_signature_check (const char *payto_uri,
const struct
TALER_MasterPublicKeyP *master_pub,
const struct
@ -768,12 +768,12 @@ TALER_exchange_wire_signature_check (const char *payto_url,
/**
* Create a signed wire statement for the given account.
*
* @param payto_url account specification
* @param payto_uri account specification
* @param master_priv private key to sign with
* @param[out] master_sig where to write the signature
*/
void
TALER_exchange_wire_signature_make (const char *payto_url,
TALER_exchange_wire_signature_make (const char *payto_uri,
const struct
TALER_MasterPrivateKeyP *master_priv,
struct TALER_MasterSignatureP *master_sig);
@ -783,12 +783,12 @@ TALER_exchange_wire_signature_make (const char *payto_url,
* Compute the hash of the given wire details. The resulting
* hash is what is put into the contract.
*
* @param payto_url bank account
* @param payto_uri bank account
* @param salt salt used to eliminate brute-force inversion
* @param[out] hc set to the hash
*/
void
TALER_merchant_wire_signature_hash (const char *payto_url,
TALER_merchant_wire_signature_hash (const char *payto_uri,
const char *salt,
struct GNUNET_HashCode *hc);
@ -796,14 +796,14 @@ TALER_merchant_wire_signature_hash (const char *payto_url,
/**
* Check the signature in @a wire_s.
*
* @param payto_url URL that is signed
* @param salt the salt used to salt the @a payto_url when hashing
* @param payto_uri URL that is signed
* @param salt the salt used to salt the @a payto_uri when hashing
* @param merch_pub public key of the merchant
* @param merch_sig signature of the merchant
* @return #GNUNET_OK if signature is valid
*/
int
TALER_merchant_wire_signature_check (const char *payto_url,
TALER_merchant_wire_signature_check (const char *payto_uri,
const char *salt,
const struct
TALER_MerchantPublicKeyP *merch_pub,
@ -814,13 +814,13 @@ TALER_merchant_wire_signature_check (const char *payto_url,
/**
* Create a signed wire statement for the given account.
*
* @param payto_url account specification
* @param salt the salt used to salt the @a payto_url when hashing
* @param payto_uri account specification
* @param salt the salt used to salt the @a payto_uri when hashing
* @param merch_priv private key to sign with
* @param[out] merch_sig where to write the signature
*/
void
TALER_merchant_wire_signature_make (const char *payto_url,
TALER_merchant_wire_signature_make (const char *payto_uri,
const char *salt,
const struct
TALER_MerchantPrivateKeyP *merch_priv,

View File

@ -628,9 +628,9 @@ struct TALER_EXCHANGE_WireAggregateFees
struct TALER_EXCHANGE_WireAccount
{
/**
* payto://-URL of the exchange.
* payto://-URI of the exchange.
*/
const char *url;
const char *payto_uri;
/**
* Signature of the exchange over the account (was checked by the API).
@ -639,7 +639,7 @@ struct TALER_EXCHANGE_WireAccount
/**
* Linked list of wire fees the exchange charges for
* accounts of the wire method matching @e url.
* accounts of the wire method matching @e payto_uri.
*/
const struct TALER_EXCHANGE_WireAggregateFees *fees;

View File

@ -401,7 +401,7 @@ struct TALER_EXCHANGEDB_AccountInfo
/**
* payto://-URL of the account.
*/
const char *payto_url;
const char *payto_uri;
/**
* Filename containing the signed /wire response, or NULL

View File

@ -170,11 +170,11 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
/**
* Create a signed wire statement for the given account.
*
* @param payto_url account specification
* @param payto_uri account specification
* @param master_priv private key to sign with, NULL to not sign
*/
json_t *
TALER_JSON_exchange_wire_signature_make (const char *payto_url,
TALER_JSON_exchange_wire_signature_make (const char *payto_uri,
const struct
TALER_MasterPrivateKeyP *master_priv);

View File

@ -237,13 +237,13 @@ TALER_url_absolute_mhd (struct MHD_Connection *connection,
/**
* Obtain the payment method from a @a payto_url
* Obtain the payment method from a @a payto_uri
*
* @param payto_url the URL to parse
* @return NULL on error (malformed @a payto_url)
* @param payto_uri the URL to parse
* @return NULL on error (malformed @a payto_uri)
*/
char *
TALER_payto_get_method (const char *payto_url);
TALER_payto_get_method (const char *payto_uri);
/**

View File

@ -367,10 +367,10 @@ int
TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
struct GNUNET_HashCode *hc)
{
const char *payto_url;
const char *payto_uri;
const char *salt;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("url", &payto_url),
GNUNET_JSON_spec_string ("payto_uri", &payto_uri),
GNUNET_JSON_spec_string ("salt", &salt),
GNUNET_JSON_spec_end ()
};
@ -383,7 +383,7 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
TALER_merchant_wire_signature_hash (payto_url,
TALER_merchant_wire_signature_hash (payto_uri,
salt,
hc);
return GNUNET_OK;
@ -402,10 +402,10 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
const struct
TALER_MasterPublicKeyP *master_pub)
{
const char *payto_url;
const char *payto_uri;
struct TALER_MasterSignatureP master_sig;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("url", &payto_url),
GNUNET_JSON_spec_string ("payto_uri", &payto_uri),
GNUNET_JSON_spec_fixed_auto ("master_sig", &master_sig),
GNUNET_JSON_spec_end ()
};
@ -419,13 +419,13 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
return GNUNET_SYSERR;
}
if (GNUNET_SYSERR == validate_payto_iban (payto_url))
if (GNUNET_SYSERR == validate_payto_iban (payto_uri))
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
return TALER_exchange_wire_signature_check (payto_url,
return TALER_exchange_wire_signature_check (payto_uri,
master_pub,
&master_sig);
}
@ -434,21 +434,21 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
/**
* Create a signed wire statement for the given account.
*
* @param payto_url account specification
* @param payto_uri account specification
* @param master_priv private key to sign with, NULL to not sign
*/
json_t *
TALER_JSON_exchange_wire_signature_make (const char *payto_url,
TALER_JSON_exchange_wire_signature_make (const char *payto_uri,
const struct
TALER_MasterPrivateKeyP *master_priv)
{
struct TALER_MasterSignatureP master_sig;
TALER_exchange_wire_signature_make (payto_url,
TALER_exchange_wire_signature_make (payto_uri,
master_priv,
&master_sig);
return json_pack ("{s:s, s:o}",
"url", payto_url,
"payto_uri", payto_uri,
"master_sig", GNUNET_JSON_from_data_auto (&master_sig));
}
@ -467,7 +467,7 @@ TALER_JSON_wire_to_payto (const json_t *wire_s)
const char *payto_str;
payto_o = json_object_get (wire_s,
"url");
"payto_uri");
if ( (NULL == payto_o) ||
(NULL == (payto_str = json_string_value (payto_o))) )
{
@ -493,7 +493,7 @@ TALER_JSON_wire_to_method (const json_t *wire_s)
const char *payto_str;
payto_o = json_object_get (wire_s,
"url");
"payto_uri");
if ( (NULL == payto_o) ||
(NULL == (payto_str = json_string_value (payto_o))) )
{

View File

@ -1534,7 +1534,7 @@ deserialize_data (struct TALER_EXCHANGE_Handle *exchange,
&version),
GNUNET_JSON_spec_json ("keys",
&keys),
GNUNET_JSON_spec_string ("url",
GNUNET_JSON_spec_string ("exchange_url",
&url),
GNUNET_JSON_spec_absolute_time ("expire",
&expire),
@ -1829,7 +1829,7 @@ TALER_EXCHANGE_serialize_data
(json_int_t) TALER_SERIALIZATION_FORMAT_VERSION,
"expire",
GNUNET_JSON_from_time_abs (exchange->key_data_expiration),
"url",
"exchange_url",
exchange->url,
"keys",
keys);

View File

@ -271,7 +271,7 @@ handle_wire_finished (void *cls,
struct TALER_EXCHANGE_WireAccount *wa = &was[i];
json_t *account;
struct GNUNET_JSON_Specification spec_account[] = {
GNUNET_JSON_spec_string ("url", &wa->url),
GNUNET_JSON_spec_string ("payto_uri", &wa->payto_uri),
GNUNET_JSON_spec_fixed_auto ("master_sig", &wa->master_sig),
GNUNET_JSON_spec_end ()
};
@ -300,7 +300,7 @@ handle_wire_finished (void *cls,
ec = TALER_EC_SERVER_JSON_INVALID;
break;
}
if (NULL == (method = TALER_payto_get_method (wa->url)))
if (NULL == (method = TALER_payto_get_method (wa->payto_uri)))
{
/* bogus reply */
GNUNET_break_op (0);

View File

@ -57,7 +57,7 @@ LEGAL_RESERVE_EXPIRATION_TIME = 7 years
[account-1]
# What is the account URL?
URL = "payto://x-taler-bank/localhost/2"
PAYTO_URI = "payto://x-taler-bank/localhost/2"
WIRE_GATEWAY_URL = "http://localhost:8082/2/"
WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = Exchange

View File

@ -46,7 +46,7 @@ PORT = 8083
[account-1]
# What is the account URL?
URL = "payto://x-taler-bank/localhost/2"
PAYTO_URI = "payto://x-taler-bank/localhost/2"
WIRE_GATEWAY_URL = "http://localhost:8082/2/"
WIRE_GATEWAY_AUTH_METHOD = basic

View File

@ -59,7 +59,7 @@ CONFIG = "postgres:///talercheck"
# advertised in /wire.
[account-1]
# What is the URL of our account?
URL = "payto://x-taler-bank/localhost/42"
PAYTO_URI = "payto://x-taler-bank/localhost/42"
WIRE_GATEWAY_URL = "http://localhost:8082/42/"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.
@ -76,7 +76,7 @@ HTTP_PORT = 8082
[account-2]
# What is the bank account (with the "Taler Bank" demo system)?
WIRE_GATEWAY_URL = "http://localhost:8082/2/"
URL = "payto://x-taler-bank/localhost/2"
PAYTO_URI = "payto://x-taler-bank/localhost/2"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.

View File

@ -4,7 +4,7 @@
currency = KUDOS
[account-2]
URL = payto://x-taler-bank/localhost/2
PAYTO_URI = payto://x-taler-bank/localhost/2
METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:8081/2/"
WIRE_GATEWAY_AUTH_METHOD = basic

View File

@ -28,7 +28,7 @@ http_port = 8081
database = postgres:///talercheck
[account-1]
URL = payto://x-taler-bank/localhost:8081/1
PAYTO_URI = payto://x-taler-bank/localhost:8081/1
[account-2]
URL = payto://x-taler-bank/localhost:8081/2
PAYTO_URI = payto://x-taler-bank/localhost:8081/2

View File

@ -4,7 +4,7 @@
currency = KUDOS
[account-2]
URL = payto://x-taler-bank/localhost/Exchange
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:8081/taler-wire-gateway/Exchange/"
WIRE_GATEWAY_AUTH_METHOD = basic

View File

@ -30,11 +30,11 @@ database = postgres:///talercheck
[account-1]
URL = payto://x-taler-bank/localhost/1
PAYTO_URI = payto://x-taler-bank/localhost/1
[account-2]
URL = payto://x-taler-bank/localhost/Exchange
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:8888/taler-wire-gateway/Exchange/"
WIRE_GATEWAY_AUTH_METHOD = basic

View File

@ -60,7 +60,7 @@ CONFIG = "postgres:///talercheck"
# advertised in /wire.
[account-1]
# What is the URL of our account?
URL = "payto://x-taler-bank/localhost/42"
PAYTO_URI = "payto://x-taler-bank/localhost/42"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
@ -74,7 +74,7 @@ WIRE_GATEWAY_URL = "http://localhost:9081/42/"
[account-2]
# What is the bank account (with the "Taler Bank" demo system)?
URL = "payto://x-taler-bank/localhost/2"
PAYTO_URI = "payto://x-taler-bank/localhost/2"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.

View File

@ -1,5 +0,0 @@
{
"url": "payto://sepa/CH9300762011623852957",
"salt": "N83T9J9202WCC8TQFDMJDWEGZNBEKA33C1ZM241VNYH88RZNTHPW509Y1M2YF7Y098R8VRESWQ05H03BK1SPAZCWE54KARDCKT5N8AG",
"master_sig": "D4V5GJ998YK7D6N0N56AD0J6MZNFEW6MRZT2CFPVQ5ME3NMQ59AA2007CXYESSFGRN70CNCFM06858QSSENCWTZM8VHEJ93YQ20ZJ1R"
}

View File

@ -1,4 +1,4 @@
{
"url": "payto://x-taler-bank/localhost/2",
"payto_uri": "payto://x-taler-bank/localhost/2",
"master_sig": "HEWC1XDS0QZ53YQR451VRKD4N968NXWGZXS30HJ59MJ0PESACK1ZYPYCAT15P08WD58C7D7F6EVN26D59JKA75XEBDQCM8VYFETK82R"
}

View File

@ -1,8 +0,0 @@
{
"salt": "AZPRFVJ58NM6M7J5CZQPJAH3EW5DYM52AEZ9Y1C1ER3W94QV8D8TQKF6CK8MYQRA9QMSKDQTGZ306ZS9GQ0M6R01CJ20KPP49WFDZK8",
"name": "The exchange",
"account_number": 3,
"bank_url": "http://localhost:8082/",
"type": "test",
"sig": "RPQXP9S4P8PQP7HEZQNRSZCT0ATNEP8GW0P5TPM34V5RX86FCD670V44R9NETSYDDKB8SZV7TKY9PAJYTY51D3VDWY9XXQ5BPFRXR28"
}

View File

@ -1,5 +0,0 @@
{
"url": "payto://x-taler-bank/http://localhost:8082/2",
"master_sig": "KQ0BWSCNVR7HGGSAMCYK8ZM30RBS1MHMXT3QBN01PZWC9TV72FEE5RJ7T84C8134EPV6WEBXXY2MTFNE8ZXST6JEJQKR8HX6FQPVY10",
"master_pub": "98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG"
}

View File

@ -71,7 +71,7 @@ CONFIG = "postgres:///talercheck"
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/iban.json
# What is the URL of our bank account? Must match WIRE_RESPONSE above!
URL = payto://x-taler-bank/localhost/42
PAYTO_URI = payto://x-taler-bank/localhost/42
METHOD = "x-taler-bank"
@ -84,7 +84,7 @@ WIRE_GATEWAY_URL = "http://localhost:9082/42/"
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/x-taler-bank.json
# What is the URL of our bank account? Must match WIRE_RESPONSE above!
URL = payto://x-taler-bank/localhost/2
PAYTO_URI = payto://x-taler-bank/localhost/2
WIRE_GATEWAY_URL = "http://localhost:9082/2/"

View File

@ -1,4 +1,4 @@
{
"url": "payto://x-taler-bank/localhost/2",
"payto_uri": "payto://x-taler-bank/localhost/2",
"master_sig": "HEWC1XDS0QZ53YQR451VRKD4N968NXWGZXS30HJ59MJ0PESACK1ZYPYCAT15P08WD58C7D7F6EVN26D59JKA75XEBDQCM8VYFETK82R"
}

View File

@ -58,7 +58,7 @@ CONFIG = "postgres:///talercheck"
[account-1]
# What is the URL of our account?
URL = "payto://x-taler-bank/localhost/42"
PAYTO_URI = "payto://x-taler-bank/localhost/42"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
@ -69,7 +69,7 @@ WIRE_GATEWAY_AUTH_METHOD = NONE
[account-2]
URL = payto://x-taler-bank/localhost/2
PAYTO_URI = payto://x-taler-bank/localhost/2
WIRE_GATEWAY_URL = "http://localhost:8082/2/"
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-2.json
WIRE_GATEWAY_AUTH_METHOD = BASIC

View File

@ -1,4 +1,4 @@
{
"url": "payto://x-taler-bank/localhost/2",
"payto_uri": "payto://x-taler-bank/localhost/2",
"master_sig": "HEWC1XDS0QZ53YQR451VRKD4N968NXWGZXS30HJ59MJ0PESACK1ZYPYCAT15P08WD58C7D7F6EVN26D59JKA75XEBDQCM8VYFETK82R"
}

View File

@ -184,7 +184,7 @@ insert_deposit_run (void *cls,
deposit.receiver_wire_account
= json_pack ("{s:s, s:s}",
"salt", "this-is-a-salt-value",
"url", str);
"payto_uri", str);
GNUNET_free (str);
}

View File

@ -105,7 +105,7 @@ wire_cb (void *cls,
{
char *method;
method = TALER_payto_get_method (accounts[i].url);
method = TALER_payto_get_method (accounts[i].payto_uri);
if (0 == strcmp (ws->expected_method,
method))
{

View File

@ -263,12 +263,12 @@ TALER_TESTING_prepare_bank (const char *config_filename,
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
config_section,
"URL", /* FIXME: config should be renamed to payto_uri, it's not an url even! */
"PAYTO_URI",
&exchange_payto_uri))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
config_section,
"URL");
"PAYTO_URI");
GNUNET_CONFIGURATION_destroy (cfg);
return GNUNET_SYSERR;
}
@ -418,12 +418,12 @@ TALER_TESTING_prepare_fakebank (const char *config_filename,
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
config_section,
"URL", /* FIXME: config should be renamed to payto_uri, it's not an url even! */
"PAYTO_URI",
&exchange_payto_uri))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
config_section,
"URL");
"PAYTO_URI");
GNUNET_CONFIGURATION_destroy (cfg);
return GNUNET_SYSERR;
}
@ -485,7 +485,7 @@ json_t *
TALER_TESTING_make_wire_details (const char *payto)
{
return json_pack ("{s:s, s:s}",
"url", payto,
"payto_uri", payto,
"salt",
"test-salt (must be constant for aggregation tests)");
}

View File

@ -27,18 +27,18 @@
* Compute the hash of the given wire details. The resulting
* hash is what is put into the contract.
*
* @param payto_url bank account
* @param payto_uri bank account
* @param[out] hc set to the hash
*/
void
TALER_exchange_wire_signature_hash (const char *payto_url,
TALER_exchange_wire_signature_hash (const char *payto_uri,
struct GNUNET_HashCode *hc)
{
GNUNET_assert (GNUNET_YES ==
GNUNET_CRYPTO_kdf (hc,
sizeof (*hc),
payto_url,
strlen (payto_url) + 1,
payto_uri,
strlen (payto_uri) + 1,
"exchange-wire-signature",
strlen ("exchange-wire-signature"),
NULL, 0));
@ -48,13 +48,13 @@ TALER_exchange_wire_signature_hash (const char *payto_url,
/**
* Check the signature in @a wire_s.
*
* @param payto_url URL that is signed
* @param payto_uri URL that is signed
* @param master_pub master public key of the exchange
* @param master_sig signature of the exchange
* @return #GNUNET_OK if signature is valid
*/
int
TALER_exchange_wire_signature_check (const char *payto_url,
TALER_exchange_wire_signature_check (const char *payto_uri,
const struct
TALER_MasterPublicKeyP *master_pub,
const struct
@ -64,7 +64,7 @@ TALER_exchange_wire_signature_check (const char *payto_url,
wd.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_DETAILS);
wd.purpose.size = htonl (sizeof (wd));
TALER_exchange_wire_signature_hash (payto_url,
TALER_exchange_wire_signature_hash (payto_uri,
&wd.h_wire_details);
return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_WIRE_DETAILS,
&wd.purpose,
@ -76,12 +76,12 @@ TALER_exchange_wire_signature_check (const char *payto_url,
/**
* Create a signed wire statement for the given account.
*
* @param payto_url account specification
* @param payto_uri account specification
* @param master_priv private key to sign with
* @param[out] master_sig where to write the signature
*/
void
TALER_exchange_wire_signature_make (const char *payto_url,
TALER_exchange_wire_signature_make (const char *payto_uri,
const struct
TALER_MasterPrivateKeyP *master_priv,
struct TALER_MasterSignatureP *master_sig)
@ -90,7 +90,7 @@ TALER_exchange_wire_signature_make (const char *payto_url,
wd.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_DETAILS);
wd.purpose.size = htonl (sizeof (wd));
TALER_exchange_wire_signature_hash (payto_url,
TALER_exchange_wire_signature_hash (payto_uri,
&wd.h_wire_details);
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_eddsa_sign (&master_priv->eddsa_priv,
@ -103,12 +103,12 @@ TALER_exchange_wire_signature_make (const char *payto_url,
* Compute the hash of the given wire details. The resulting
* hash is what is put into the contract.
*
* @param payto_url bank account
* @param payto_uri bank account
* @param salt salt used to eliminate brute-force inversion
* @param[out] hc set to the hash
*/
void
TALER_merchant_wire_signature_hash (const char *payto_url,
TALER_merchant_wire_signature_hash (const char *payto_uri,
const char *salt,
struct GNUNET_HashCode *hc)
{
@ -117,8 +117,8 @@ TALER_merchant_wire_signature_hash (const char *payto_url,
sizeof (*hc),
salt,
strlen (salt) + 1,
payto_url,
strlen (payto_url) + 1,
payto_uri,
strlen (payto_uri) + 1,
"merchant-wire-signature",
strlen ("merchant-wire-signature"),
NULL, 0));
@ -128,14 +128,14 @@ TALER_merchant_wire_signature_hash (const char *payto_url,
/**
* Check the signature in @a merch_sig. (Not yet used anywhere.)
*
* @param payto_url URL that is signed
* @param salt the salt used to salt the @a payto_url when hashing
* @param payto_uri URL that is signed
* @param salt the salt used to salt the @a payto_uri when hashing
* @param merch_pub master public key of the merchant
* @param merch_sig signature of the merchant
* @return #GNUNET_OK if signature is valid
*/
int
TALER_merchant_wire_signature_check (const char *payto_url,
TALER_merchant_wire_signature_check (const char *payto_uri,
const char *salt,
const struct
TALER_MerchantPublicKeyP *merch_pub,
@ -146,7 +146,7 @@ TALER_merchant_wire_signature_check (const char *payto_url,
wd.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_WIRE_DETAILS);
wd.purpose.size = htonl (sizeof (wd));
TALER_merchant_wire_signature_hash (payto_url,
TALER_merchant_wire_signature_hash (payto_uri,
salt,
&wd.h_wire_details);
return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_WIRE_DETAILS,
@ -159,13 +159,13 @@ TALER_merchant_wire_signature_check (const char *payto_url,
/**
* Create a signed wire statement for the given account. (Not yet used anywhere.)
*
* @param payto_url account specification
* @param salt the salt used to salt the @a payto_url when hashing
* @param payto_uri account specification
* @param salt the salt used to salt the @a payto_uri when hashing
* @param merch_priv private key to sign with
* @param[out] merch_sig where to write the signature
*/
void
TALER_merchant_wire_signature_make (const char *payto_url,
TALER_merchant_wire_signature_make (const char *payto_uri,
const char *salt,
const struct
TALER_MerchantPrivateKeyP *merch_priv,
@ -175,7 +175,7 @@ TALER_merchant_wire_signature_make (const char *payto_url,
wd.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_WIRE_DETAILS);
wd.purpose.size = htonl (sizeof (wd));
TALER_merchant_wire_signature_hash (payto_url,
TALER_merchant_wire_signature_hash (payto_uri,
salt,
&wd.h_wire_details);
GNUNET_assert (GNUNET_OK ==

View File

@ -546,22 +546,22 @@ TALER_url_absolute_mhd (struct MHD_Connection *connection,
/**
* Obtain the payment method from a @a payto_url
* Obtain the payment method from a @a payto_uri
*
* @param payto_url the URL to parse
* @return NULL on error (malformed @a payto_url)
* @param payto_uri the URL to parse
* @return NULL on error (malformed @a payto_uri)
*/
char *
TALER_payto_get_method (const char *payto_url)
TALER_payto_get_method (const char *payto_uri)
{
const char *start;
const char *end;
if (0 != strncmp (payto_url,
if (0 != strncmp (payto_uri,
PAYTO,
strlen (PAYTO)))
return NULL;
start = &payto_url[strlen (PAYTO)];
start = &payto_uri[strlen (PAYTO)];
end = strchr (start,
(unsigned char) '/');
if (NULL == end)