[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: [testing] remove double callback
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: [testing] remove double callback |
Date: |
Wed, 22 May 2024 13:19:58 +0200 |
This is an automated email from the git hooks/post-receive script.
lukas-matyja pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new 6fbf449 [testing] remove double callback
6fbf449 is described below
commit 6fbf4497b5b44d44a6bb35dfd2fef36eef78d0a3
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Wed May 22 13:21:30 2024 +0200
[testing] remove double callback
---
src/lib/donau_api_csr_post.c | 2 +-
src/testing/testing_api_cmd_issue_receipts.c | 65 +++++++++++++++-------------
2 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/src/lib/donau_api_csr_post.c b/src/lib/donau_api_csr_post.c
index 4dddf13..9a31bf4 100644
--- a/src/lib/donau_api_csr_post.c
+++ b/src/lib/donau_api_csr_post.c
@@ -110,7 +110,7 @@ handle_csr_issue_post_finished (void *cls,
}
csrh->cb (csrh->cb_cls,
&csrresp);
- break;
+ csrh->cb = NULL;
// Donation unit was revoked.
case MHD_HTTP_GONE:
csrresp.hr.ec = TALER_JSON_get_error_code (j);
diff --git a/src/testing/testing_api_cmd_issue_receipts.c
b/src/testing/testing_api_cmd_issue_receipts.c
index 9b12528..15668dc 100644
--- a/src/testing/testing_api_cmd_issue_receipts.c
+++ b/src/testing/testing_api_cmd_issue_receipts.c
@@ -174,35 +174,38 @@ issue_receipts_status_cb (void *cls,
biresp->details.ok.blinded_sigs;
for (size_t i = 0; i < ss->num_bkp; i++)
{
- GNUNET_assert (GNUNET_OK ==
- DONAU_donation_unit_sig_unblind (
-
&ss->receipts[i].donation_unit_sig,
- &blinded_sigs[i],
- &ss->blinding_secrets[i],
- &ss->h_udis[i],
- ss->alg_values[i],
-
&ss->keys->donation_unit_keys[0].key));
-
- /* check udi message */
- struct DONAU_UniqueDonorIdentifierHashP checkudi_hash;
- DONAU_unique_donor_id_hash (
- &ss->h_donor_tax_id,
- &ss->receipts[i].nonce,
- &checkudi_hash);
- GNUNET_assert(0 == GNUNET_CRYPTO_hash_cmp(&checkudi_hash.hash,
&ss->h_udis[i].hash));
- /* check signature */
- if (GNUNET_OK != DONAU_donation_receipt_verify (
- &ss->keys->donation_unit_keys[0].key,
- &checkudi_hash,
- &ss->receipts[i].donation_unit_sig))
- {
- GNUNET_break_op (0);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Donation receipt signature invalid!\n");
- } else {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "!!!!!Donation receipt signature
valid!\n");
- }
+ GNUNET_assert (GNUNET_OK ==
+ DONAU_donation_unit_sig_unblind (
+ &ss->receipts[i].donation_unit_sig,
+ &blinded_sigs[i],
+ &ss->blinding_secrets[i],
+ &ss->h_udis[i],
+ ss->alg_values[i],
+ &ss->keys->donation_unit_keys[0].key));
+
+ /* check udi message */
+ struct DONAU_UniqueDonorIdentifierHashP checkudi_hash;
+ DONAU_unique_donor_id_hash (
+ &ss->h_donor_tax_id,
+ &ss->receipts[i].nonce,
+ &checkudi_hash);
+ GNUNET_assert (0 == GNUNET_CRYPTO_hash_cmp (&checkudi_hash.hash,
+ &ss->h_udis[i].hash));
+ /* check signature */
+ if (GNUNET_OK != DONAU_donation_receipt_verify (
+ &ss->keys->donation_unit_keys[0].key,
+ &checkudi_hash,
+ &ss->receipts[i].donation_unit_sig))
+ {
+ GNUNET_break_op (0);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Donation receipt signature invalid!\n");
+ }
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "!!!!!Donation receipt signature valid!\n");
+ }
}
TALER_TESTING_interpreter_next (ss->is);
@@ -252,6 +255,7 @@ cs_stage_two_callback (
if the corresponding blinded message is already initialized */
if (NULL != blinded_udi->blinded_message)
{
+ // FIXME: this should not happen.
return;
}
@@ -274,7 +278,8 @@ cs_stage_two_callback (
struct DONAU_BatchIssueValues *alg_values = GNUNET_new (struct
DONAU_BatchIssueValues);
struct DONAU_BudiMasterSecretP ps;
- struct DONAU_UniqueDonorIdentifierHashP *udi_hash =
&csr_data->ss->h_udis[csr_data->position];
+ struct DONAU_UniqueDonorIdentifierHashP *udi_hash =
+ &csr_data->ss->h_udis[csr_data->position];
union GNUNET_CRYPTO_BlindingSecretP *blinding_secret =
&csr_data->ss->blinding_secrets[csr_data->position];
struct DONAU_UniqueDonorIdentifierNonce *udi_nonce =
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: [testing] remove double callback,
gnunet <=