aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-11-03 08:09:18 +0100
committerChristian Grothoff <christian@grothoff.org>2024-11-05 10:37:38 +0100
commit7786dc9a6df5cb01c2913f6d3c2171f0b9e9eb85 (patch)
tree6b35cf3ca2ff73bea39350d8dd062a9f698b7618 /src
parenta26c2c9a882534e7035215419a073e1368fddec9 (diff)
more work on testing
Diffstat (limited to 'src')
-rw-r--r--src/include/taler_testing_lib.h2
-rw-r--r--src/testing/testing_api_cmd_batch_deposit.c14
-rw-r--r--src/testing/testing_api_cmd_batch_withdraw.c12
-rw-r--r--src/testing/testing_api_cmd_check_aml_decisions.c4
-rw-r--r--src/testing/testing_api_cmd_deposit.c12
-rw-r--r--src/testing/testing_api_cmd_deposits_get.c18
-rw-r--r--src/testing/testing_api_cmd_insert_deposit.c14
-rw-r--r--src/testing/testing_api_cmd_kyc_check_get.c4
-rw-r--r--src/testing/testing_api_cmd_kyc_proof.c6
-rw-r--r--src/testing/testing_api_cmd_kyc_wallet_get.c14
-rw-r--r--src/testing/testing_api_cmd_purse_merge.c14
-rw-r--r--src/testing/testing_api_cmd_reserve_close.c10
-rw-r--r--src/testing/testing_api_cmd_reserve_history.c10
-rw-r--r--src/testing/testing_api_cmd_reserve_purse.c14
-rw-r--r--src/testing/testing_api_cmd_run_fakebank.c9
15 files changed, 79 insertions, 78 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 5c00901f6..b95c9bb7d 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -1392,7 +1392,7 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_reserve_close (
const char *label,
const char *reserve_reference,
- const char *target_account,
+ struct TALER_FullPayto target_account,
unsigned int expected_response_code);
diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c
index 199404e1c..75bcf65fb 100644
--- a/src/testing/testing_api_cmd_batch_deposit.c
+++ b/src/testing/testing_api_cmd_batch_deposit.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2018-2022 Taler Systems SA
+ Copyright (C) 2018-2024 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
@@ -181,7 +181,7 @@ struct BatchDepositState
* Set to the KYC requirement payto hash *if* the exchange replied with a
* request for KYC.
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -274,11 +274,11 @@ batch_deposit_run (void *cls,
enum TALER_ErrorCode ec;
struct TALER_WireSaltP wire_salt;
struct TALER_MerchantWireHashP h_wire;
- const char *payto_uri;
+ struct TALER_FullPayto payto_uri;
struct TALER_EXCHANGE_CoinDepositDetail cdds[ds->num_coins];
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("payto_uri",
- &payto_uri),
+ TALER_JSON_spec_full_payto_uri ("payto_uri",
+ &payto_uri),
GNUNET_JSON_spec_fixed_auto ("salt",
&wire_salt),
GNUNET_JSON_spec_end ()
@@ -614,7 +614,7 @@ batch_deposit_traits (void *cls,
TALER_TESTING_make_trait_refund_deadline (index,
&ds->refund_deadline),
TALER_TESTING_make_trait_legi_requirement_row (&ds->requirement_row),
- TALER_TESTING_make_trait_h_payto (&ds->h_payto),
+ TALER_TESTING_make_trait_h_normalized_payto (&ds->h_payto),
TALER_TESTING_trait_end ()
};
@@ -631,7 +631,7 @@ batch_deposit_traits (void *cls,
struct TALER_TESTING_Command
TALER_TESTING_cmd_batch_deposit (
const char *label,
- const char *target_account_payto,
+ const struct TALER_FullPayto target_account_payto,
const char *contract_terms,
struct GNUNET_TIME_Relative refund_deadline,
unsigned int expected_response_code,
diff --git a/src/testing/testing_api_cmd_batch_withdraw.c b/src/testing/testing_api_cmd_batch_withdraw.c
index 1b056bdbb..170e95973 100644
--- a/src/testing/testing_api_cmd_batch_withdraw.c
+++ b/src/testing/testing_api_cmd_batch_withdraw.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2018-2022 Taler Systems SA
+ Copyright (C) 2018-2024 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
@@ -119,7 +119,7 @@ struct BatchWithdrawState
/**
* URI if the reserve we are withdrawing from.
*/
- char *reserve_payto_uri;
+ struct TALER_NormalizedPayto reserve_payto_uri;
/**
* Private key of the reserve we are withdrawing from.
@@ -150,7 +150,7 @@ struct BatchWithdrawState
* Set to the KYC requirement payto hash *if* the exchange replied with a
* request for KYC.
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -416,7 +416,7 @@ batch_withdraw_cleanup (void *cls,
}
GNUNET_free (ws->coins);
GNUNET_free (ws->exchange_url);
- GNUNET_free (ws->reserve_payto_uri);
+ GNUNET_free (ws->reserve_payto_uri.normalized_payto);
GNUNET_free (ws);
}
@@ -462,8 +462,8 @@ batch_withdraw_traits (void *cls,
TALER_TESTING_make_trait_amounts (index,
&cs->amount),
TALER_TESTING_make_trait_legi_requirement_row (&ws->requirement_row),
- TALER_TESTING_make_trait_h_payto (&ws->h_payto),
- TALER_TESTING_make_trait_payto_uri (ws->reserve_payto_uri),
+ TALER_TESTING_make_trait_h_normalized_payto (&ws->h_payto),
+ TALER_TESTING_make_trait_normalized_payto_uri (&ws->reserve_payto_uri),
TALER_TESTING_make_trait_exchange_url (ws->exchange_url),
TALER_TESTING_make_trait_age_commitment_proof (index,
ws->age > 0 ?
diff --git a/src/testing/testing_api_cmd_check_aml_decisions.c b/src/testing/testing_api_cmd_check_aml_decisions.c
index 0c31c5471..0c749c6a5 100644
--- a/src/testing/testing_api_cmd_check_aml_decisions.c
+++ b/src/testing/testing_api_cmd_check_aml_decisions.c
@@ -155,7 +155,7 @@ check_aml_decisions_run (
struct TALER_TESTING_Interpreter *is)
{
struct AmlCheckState *ds = cls;
- const struct TALER_PaytoHashP *h_payto = NULL;
+ const struct TALER_NormalizedPaytoHashP *h_payto = NULL;
const struct TALER_AmlOfficerPrivateKeyP *officer_priv;
const struct TALER_TESTING_Command *ref;
const char *exchange_url;
@@ -193,7 +193,7 @@ check_aml_decisions_run (
return;
}
GNUNET_assert (GNUNET_OK ==
- TALER_TESTING_get_trait_h_payto (
+ TALER_TESTING_get_trait_h_normalized_payto (
ref,
&h_payto));
}
diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c
index f45fce133..b43616ba3 100644
--- a/src/testing/testing_api_cmd_deposit.c
+++ b/src/testing/testing_api_cmd_deposit.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2018-2023 Taler Systems SA
+ Copyright (C) 2018-2024 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
@@ -311,10 +311,10 @@ deposit_run (void *cls,
struct TALER_PrivateContractHashP h_contract_terms;
enum TALER_ErrorCode ec;
struct TALER_WireSaltP wire_salt;
- const char *payto_uri;
+ struct TALER_FullPayto payto_uri;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("payto_uri",
- &payto_uri),
+ TALER_JSON_spec_full_payto_uri ("payto_uri",
+ &payto_uri),
GNUNET_JSON_spec_fixed_auto ("salt",
&wire_salt),
GNUNET_JSON_spec_end ()
@@ -713,7 +713,7 @@ TALER_TESTING_cmd_deposit (
const char *label,
const char *coin_reference,
unsigned int coin_index,
- const char *target_account_payto,
+ struct TALER_FullPayto target_account_payto,
const char *contract_terms,
struct GNUNET_TIME_Relative refund_deadline,
const char *amount,
@@ -776,7 +776,7 @@ TALER_TESTING_cmd_deposit_with_ref (
const char *label,
const char *coin_reference,
unsigned int coin_index,
- const char *target_account_payto,
+ struct TALER_FullPayto target_account_payto,
const char *contract_terms,
struct GNUNET_TIME_Relative refund_deadline,
const char *amount,
diff --git a/src/testing/testing_api_cmd_deposits_get.c b/src/testing/testing_api_cmd_deposits_get.c
index 60f968662..a537dd3f5 100644
--- a/src/testing/testing_api_cmd_deposits_get.c
+++ b/src/testing/testing_api_cmd_deposits_get.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2021 Taler Systems SA
+ Copyright (C) 2014-2021, 2024 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
@@ -60,7 +60,7 @@ struct TrackTransactionState
* Note: set based on our @e merchant_payto_uri, as
* the exchange does not respond with the payto hash.
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -77,7 +77,7 @@ struct TrackTransactionState
/**
* Payto URI of the merchant receiving the deposit.
*/
- char *merchant_payto_uri;
+ struct TALER_FullPayto merchant_payto_uri;
/**
* Index of the coin involved in the transaction. Recall:
@@ -164,8 +164,8 @@ deposit_wtid_cb (
break;
case MHD_HTTP_ACCEPTED:
/* allowed, nothing to check here */
- TALER_payto_hash (tts->merchant_payto_uri,
- &tts->h_payto);
+ TALER_full_payto_normalize_and_hash (tts->merchant_payto_uri,
+ &tts->h_payto);
tts->requirement_row
= dr->details.accepted.requirement_row;
break;
@@ -237,7 +237,7 @@ deposits_get_run (
TALER_TESTING_interpreter_fail (tts->is);
return;
}
- tts->merchant_payto_uri
+ tts->merchant_payto_uri.full_payto
= GNUNET_strdup (json_string_value (json_object_get (wire_details,
"payto_uri")));
if (GNUNET_OK !=
@@ -311,7 +311,7 @@ deposits_get_cleanup (
TALER_EXCHANGE_deposits_get_cancel (tts->tth);
tts->tth = NULL;
}
- GNUNET_free (tts->merchant_payto_uri);
+ GNUNET_free (tts->merchant_payto_uri.full_payto);
GNUNET_free (tts);
}
@@ -336,8 +336,8 @@ deposits_get_traits (void *cls,
TALER_TESTING_make_trait_wtid (&tts->wtid),
TALER_TESTING_make_trait_legi_requirement_row (
&tts->requirement_row),
- TALER_TESTING_make_trait_h_payto (&tts->h_payto),
- TALER_TESTING_make_trait_payto_uri (tts->merchant_payto_uri),
+ TALER_TESTING_make_trait_h_normalized_payto (&tts->h_payto),
+ TALER_TESTING_make_trait_full_payto_uri (&tts->merchant_payto_uri),
TALER_TESTING_trait_end ()
};
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c
index 03e704c72..2816758a6 100644
--- a/src/testing/testing_api_cmd_insert_deposit.c
+++ b/src/testing/testing_api_cmd_insert_deposit.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2018 Taler Systems SA
+ Copyright (C) 2018, 2024 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
@@ -138,7 +138,7 @@ insert_deposit_run (void *cls,
struct TALER_EXCHANGEDB_DenominationKeyInformation issue;
struct TALER_DenominationPublicKey dpk;
struct TALER_DenominationPrivateKey denom_priv;
- char *receiver_wire_account;
+ struct TALER_FullPayto receiver_wire_account;
(void) cmd;
if (NULL == ids->plugin)
@@ -254,13 +254,13 @@ insert_deposit_run (void *cls,
&dpk));
TALER_blinded_denom_sig_free (&bds);
}
- GNUNET_asprintf (&receiver_wire_account,
+ GNUNET_asprintf (&receiver_wire_account.full_payto,
"payto://x-taler-bank/localhost/%s?receiver-name=%s",
ids->merchant_account,
ids->merchant_account);
bd.receiver_wire_account = receiver_wire_account;
- TALER_payto_hash (bd.receiver_wire_account,
- &bd.wire_target_h_payto);
+ TALER_full_payto_hash (bd.receiver_wire_account,
+ &bd.wire_target_h_payto);
memset (&bd.wire_salt,
46,
sizeof (bd.wire_salt));
@@ -297,7 +297,7 @@ insert_deposit_run (void *cls,
{
GNUNET_break (0);
ids->plugin->rollback (ids->plugin->cls);
- GNUNET_free (receiver_wire_account);
+ GNUNET_free (receiver_wire_account.full_payto);
TALER_denom_pub_free (&dpk);
TALER_denom_priv_free (&denom_priv);
TALER_TESTING_interpreter_fail (is);
@@ -308,7 +308,7 @@ insert_deposit_run (void *cls,
TALER_denom_sig_free (&deposit.coin.denom_sig);
TALER_denom_pub_free (&dpk);
TALER_denom_priv_free (&denom_priv);
- GNUNET_free (receiver_wire_account);
+ GNUNET_free (receiver_wire_account.full_payto);
TALER_TESTING_interpreter_next (is);
}
diff --git a/src/testing/testing_api_cmd_kyc_check_get.c b/src/testing/testing_api_cmd_kyc_check_get.c
index fa0556d47..89411c295 100644
--- a/src/testing/testing_api_cmd_kyc_check_get.c
+++ b/src/testing/testing_api_cmd_kyc_check_get.c
@@ -126,7 +126,7 @@ check_kyc_run (void *cls,
struct KycCheckGetState *kcg = cls;
const struct TALER_TESTING_Command *res_cmd;
const struct TALER_TESTING_Command *acc_cmd;
- const struct TALER_PaytoHashP *h_payto;
+ const struct TALER_NormalizedPaytoHashP *h_payto;
const union TALER_AccountPrivateKeyP *account_priv;
(void) cmd;
@@ -150,7 +150,7 @@ check_kyc_run (void *cls,
return;
}
if (GNUNET_OK !=
- TALER_TESTING_get_trait_h_payto (
+ TALER_TESTING_get_trait_h_normalized_payto (
res_cmd,
&h_payto))
{
diff --git a/src/testing/testing_api_cmd_kyc_proof.c b/src/testing/testing_api_cmd_kyc_proof.c
index af6d9c139..4f72fbe46 100644
--- a/src/testing/testing_api_cmd_kyc_proof.c
+++ b/src/testing/testing_api_cmd_kyc_proof.c
@@ -126,7 +126,7 @@ proof_kyc_run (void *cls,
{
struct KycProofGetState *kps = cls;
const struct TALER_TESTING_Command *res_cmd;
- const struct TALER_PaytoHashP *h_payto;
+ const struct TALER_NormalizedPaytoHashP *h_payto;
char *uargs;
const char *exchange_url;
@@ -148,8 +148,8 @@ proof_kyc_run (void *cls,
return;
}
if (GNUNET_OK !=
- TALER_TESTING_get_trait_h_payto (res_cmd,
- &h_payto))
+ TALER_TESTING_get_trait_h_normalized_payto (res_cmd,
+ &h_payto))
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (kps->is);
diff --git a/src/testing/testing_api_cmd_kyc_wallet_get.c b/src/testing/testing_api_cmd_kyc_wallet_get.c
index 24bd7d4d7..4add41a9e 100644
--- a/src/testing/testing_api_cmd_kyc_wallet_get.c
+++ b/src/testing/testing_api_cmd_kyc_wallet_get.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2021 Taler Systems SA
+ Copyright (C) 2021-2024 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
@@ -46,7 +46,7 @@ struct KycWalletGetState
/**
* Payto URI of the reserve of the wallet.
*/
- char *reserve_payto_uri;
+ struct TALER_NormalizedPayto reserve_payto_uri;
/**
* Our command.
@@ -67,7 +67,7 @@ struct KycWalletGetState
* Set to the KYC requirement payto hash *if* the exchange replied with a
* request for KYC (#MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS).
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -226,7 +226,7 @@ wallet_kyc_cleanup (
TALER_EXCHANGE_kyc_wallet_cancel (kwg->kwh);
kwg->kwh = NULL;
}
- GNUNET_free (kwg->reserve_payto_uri);
+ GNUNET_free (kwg->reserve_payto_uri.normalized_payto);
GNUNET_free (kwg);
}
@@ -258,10 +258,10 @@ wallet_kyc_traits (void *cls,
&kwg->account_pub.reserve_pub),
TALER_TESTING_make_trait_legi_requirement_row (
&kwg->requirement_row),
- TALER_TESTING_make_trait_h_payto (
+ TALER_TESTING_make_trait_h_normalized_payto (
&kwg->h_payto),
- TALER_TESTING_make_trait_payto_uri (
- kwg->reserve_payto_uri),
+ TALER_TESTING_make_trait_normalized_payto_uri (
+ &kwg->reserve_payto_uri),
TALER_TESTING_trait_end ()
};
diff --git a/src/testing/testing_api_cmd_purse_merge.c b/src/testing/testing_api_cmd_purse_merge.c
index 515a14403..564b0ce02 100644
--- a/src/testing/testing_api_cmd_purse_merge.c
+++ b/src/testing/testing_api_cmd_purse_merge.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2022 Taler Systems SA
+ Copyright (C) 2022, 2024 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
@@ -75,7 +75,7 @@ struct PurseMergeState
* Hash of the payto://-URI for the reserve we are
* merging into.
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -298,7 +298,7 @@ merge_run (void *cls,
GNUNET_CRYPTO_eddsa_key_get_public (&ds->reserve_priv.eddsa_priv,
&ds->reserve_pub.eddsa_pub);
{
- char *payto_uri;
+ struct TALER_NormalizedPayto payto_uri;
const char *exchange_url;
const struct TALER_TESTING_Command *exchange_cmd;
@@ -315,9 +315,9 @@ merge_run (void *cls,
&exchange_url));
payto_uri = TALER_reserve_make_payto (exchange_url,
&ds->reserve_pub);
- TALER_payto_hash (payto_uri,
- &ds->h_payto);
- GNUNET_free (payto_uri);
+ TALER_normalized_payto_hash (payto_uri,
+ &ds->h_payto);
+ GNUNET_free (payto_uri.normalized_payto);
}
GNUNET_CRYPTO_eddsa_key_get_public (&merge_priv->eddsa_priv,
&ds->merge_pub.eddsa_pub);
@@ -396,7 +396,7 @@ merge_traits (void *cls,
TALER_TESTING_make_trait_timestamp (0,
&ds->merge_timestamp),
TALER_TESTING_make_trait_legi_requirement_row (&ds->requirement_row),
- TALER_TESTING_make_trait_h_payto (&ds->h_payto),
+ TALER_TESTING_make_trait_h_normalized_payto (&ds->h_payto),
TALER_TESTING_trait_end ()
};
diff --git a/src/testing/testing_api_cmd_reserve_close.c b/src/testing/testing_api_cmd_reserve_close.c
index 2d38696dd..d9ee35462 100644
--- a/src/testing/testing_api_cmd_reserve_close.c
+++ b/src/testing/testing_api_cmd_reserve_close.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2022 Taler Systems SA
+ Copyright (C) 2014-2024 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
@@ -46,7 +46,7 @@ struct CloseState
/**
* payto://-URI where to wire the funds.
*/
- const char *target_account;
+ struct TALER_FullPayto target_account;
/**
* Private key of the reserve being analyzed.
@@ -72,7 +72,7 @@ struct CloseState
* Set to the KYC requirement payto hash *if* the exchange replied with a
* request for KYC.
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -216,7 +216,7 @@ close_traits (void *cls,
struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_legi_requirement_row (
&cs->requirement_row),
- TALER_TESTING_make_trait_h_payto (
+ TALER_TESTING_make_trait_h_normalized_payto (
&cs->h_payto),
TALER_TESTING_trait_end ()
};
@@ -233,7 +233,7 @@ close_traits (void *cls,
struct TALER_TESTING_Command
TALER_TESTING_cmd_reserve_close (const char *label,
const char *reserve_reference,
- const char *target_account,
+ struct TALER_FullPayto target_account,
unsigned int expected_response_code)
{
struct CloseState *ss;
diff --git a/src/testing/testing_api_cmd_reserve_history.c b/src/testing/testing_api_cmd_reserve_history.c
index ecb236a54..bb1cf6f7e 100644
--- a/src/testing/testing_api_cmd_reserve_history.c
+++ b/src/testing/testing_api_cmd_reserve_history.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2023 Taler Systems SA
+ Copyright (C) 2014-2024 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
@@ -124,8 +124,9 @@ history_entry_cmp (
if ( (0 ==
TALER_amount_cmp (&h1->amount,
&h2->amount)) &&
- (0 == strcasecmp (h1->details.in_details.sender_url,
- h2->details.in_details.sender_url)) &&
+ (0 ==
+ TALER_full_payto_cmp (h1->details.in_details.sender_url,
+ h2->details.in_details.sender_url)) &&
(h1->details.in_details.wire_reference ==
h2->details.in_details.wire_reference) &&
(GNUNET_TIME_timestamp_cmp (h1->details.in_details.timestamp,
@@ -196,7 +197,8 @@ history_entry_cmp (
&&
(GNUNET_TIME_timestamp_cmp (h1->details.merge_details.purse_expiration,
==,
- h2->details.merge_details.purse_expiration))
+ h2->details.merge_details.purse_expiration)
+ )
&&
(0 ==
GNUNET_memcmp (&h1->details.merge_details.merge_pub,
diff --git a/src/testing/testing_api_cmd_reserve_purse.c b/src/testing/testing_api_cmd_reserve_purse.c
index a083711f6..e2975bd32 100644
--- a/src/testing/testing_api_cmd_reserve_purse.c
+++ b/src/testing/testing_api_cmd_reserve_purse.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2022 Taler Systems SA
+ Copyright (C) 2022, 2024 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
@@ -101,7 +101,7 @@ struct ReservePurseState
* Hash of the payto://-URI for the reserve we are
* merging into.
*/
- struct TALER_PaytoHashP h_payto;
+ struct TALER_NormalizedPaytoHashP h_payto;
/**
* Set to the KYC requirement row *if* the exchange replied with
@@ -225,7 +225,7 @@ purse_run (void *cls,
ds->expiration_rel));
{
- char *payto_uri;
+ struct TALER_NormalizedPayto payto_uri;
const char *exchange_url;
const struct TALER_TESTING_Command *exchange_cmd;
@@ -246,9 +246,9 @@ purse_run (void *cls,
= TALER_reserve_make_payto (
exchange_url,
&ds->account_pub.reserve_pub);
- TALER_payto_hash (payto_uri,
- &ds->h_payto);
- GNUNET_free (payto_uri);
+ TALER_normalized_payto_hash (payto_uri,
+ &ds->h_payto);
+ GNUNET_free (payto_uri.normalized_payto);
}
GNUNET_assert (0 ==
@@ -351,7 +351,7 @@ purse_traits (void *cls,
&ds->reserve_sig),
TALER_TESTING_make_trait_legi_requirement_row (
&ds->requirement_row),
- TALER_TESTING_make_trait_h_payto (
+ TALER_TESTING_make_trait_h_normalized_payto (
&ds->h_payto),
TALER_TESTING_trait_end ()
};
diff --git a/src/testing/testing_api_cmd_run_fakebank.c b/src/testing/testing_api_cmd_run_fakebank.c
index 7739d3c0c..9e555db0b 100644
--- a/src/testing/testing_api_cmd_run_fakebank.c
+++ b/src/testing/testing_api_cmd_run_fakebank.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2023 Taler Systems SA
+ (C) 2023, 2024 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
@@ -152,7 +152,7 @@ TALER_TESTING_cmd_run_fakebank (
{
struct RunFakebankState *rfs;
unsigned long long fakebank_port;
- char *exchange_payto_uri;
+ struct TALER_FullPayto exchange_payto_uri;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (cfg,
@@ -169,7 +169,7 @@ TALER_TESTING_cmd_run_fakebank (
GNUNET_CONFIGURATION_get_value_string (cfg,
exchange_account_section,
"PAYTO_URI",
- &exchange_payto_uri))
+ &exchange_payto_uri.full_payto))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
exchange_account_section,
@@ -195,9 +195,8 @@ TALER_TESTING_cmd_run_fakebank (
(unsigned int) fakebank_port,
exchange_xtalerbank_account);
GNUNET_free (exchange_xtalerbank_account);
- GNUNET_free (exchange_payto_uri);
}
- GNUNET_free (exchange_payto_uri);
+ GNUNET_free (exchange_payto_uri.full_payto);
rfs->ba.method = TALER_BANK_AUTH_NONE;
{
struct TALER_TESTING_Command cmd = {