[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] 04/04: merge
From: |
gnunet |
Subject: |
[taler-anastasis] 04/04: merge |
Date: |
Wed, 22 Jan 2020 12:46:12 +0100 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
commit a36e1c3dcc4cc680b9ef28ac480b9c5146178c88
Merge: 33a2966 e0e6395
Author: Dennis Neufeld <address@hidden>
AuthorDate: Wed Jan 22 11:44:54 2020 +0000
merge
doc/ledger-guide.pdf | Bin 0 -> 848244 bytes
doc/ledger.txt | 196 ++++++++++++++++++++++++----
src/backend/anastasis-httpd_policy_upload.c | 3 +-
src/lib/anastasis_api_policy_store.c | 6 +-
src/lib/testing_api_cmd_policy_store.c | 13 +-
5 files changed, 182 insertions(+), 36 deletions(-)
diff --cc src/backend/anastasis-httpd_policy_upload.c
index 62572c4,f6336f8..149e21d
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@@ -706,7 -707,7 +706,8 @@@ AH_handler_policy_post (struct MHD_Conn
GNUNET_STRINGS_string_to_data (pay_id,
strlen (pay_id),
&puc->payment_identifier,
- sizeof (struct
ANASTASIS_PaymentSecretP))) )
- sizeof
(&puc->payment_identifier))) )
++ sizeof (struct
++
ANASTASIS_PaymentSecretP))) )
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
diff --cc src/lib/anastasis_api_policy_store.c
index b0a76f7,b569f7f..f0acabd
--- a/src/lib/anastasis_api_policy_store.c
+++ b/src/lib/anastasis_api_policy_store.c
@@@ -369,10 -369,10 +369,11 @@@ ANASTASIS_policy_store (struct GNUNET_C
job_headers = ext;
}
/* Setup Payment-Identifier header */
- if (NULL != paymentSecretP)
+ if (NULL != &paymentSecretP)
{
val = GNUNET_STRINGS_data_to_string_alloc (&paymentSecretP,
- sizeof (struct
ANASTASIS_PaymentSecretP));
- sizeof (paymentSecretP));
++ sizeof (struct
++
ANASTASIS_PaymentSecretP));
GNUNET_asprintf (&hdr,
"Payment-Identifier: %s",
val);
@@@ -409,9 -409,6 +410,10 @@@
acc_pub_str);
GNUNET_free (acc_pub_str);
+ char *paid_order_id;
+ paid_order_id = GNUNET_STRINGS_data_to_string_alloc (&paymentSecretP,
- sizeof (struct
ANASTASIS_PaymentSecretP));
++ sizeof (struct
++
ANASTASIS_PaymentSecretP));
pso->url = (GNUNET_YES == payment_requested)
? TALER_url_join (backend_url,
path,
diff --cc src/lib/testing_api_cmd_policy_store.c
index 10941e5,606ccbf..6204f2c
--- a/src/lib/testing_api_cmd_policy_store.c
+++ b/src/lib/testing_api_cmd_policy_store.c
@@@ -336,17 -350,6 +336,18 @@@ policy_store_run (void *cls
TALER_TESTING_interpreter_fail (pss->is);
return;
}
-
++
+ if (GNUNET_OK !=
+ GNUNET_STRINGS_string_to_data (order_id,
+ strlen (order_id),
+ &pss->payment_id,
- sizeof (struct
ANASTASIS_PaymentSecretP)))
++ sizeof (struct
++ ANASTASIS_PaymentSecretP)))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (pss->is);
+ return;
+ }
}
}
}
@@@ -361,17 -364,19 +362,17 @@@
&pss->anastasis_pub.pub);
GNUNET_free (priv);
}
-
- /*{
- // generate nonce
- GNUNET_CRYPTO_random_block
- (GNUNET_CRYPTO_QUALITY_WEAK,
- &pss->nonce,
- sizeof (pss->nonce));
- }*/
- {
- // hash recovery data
- GNUNET_CRYPTO_hash (pss->recovery_data,
- pss->recovery_data_size,
- &pss->curr_hash);
- }
++
+ if (0 != (ANASTASIS_TESTING_PSO_PREV_HASH_WRONG & pss->psopt))
+ GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
- &pss->prev_hash,
- sizeof (struct GNUNET_HashCode));
++ &pss->prev_hash,
++ sizeof (struct GNUNET_HashCode));
+
+ // hash recovery data
+ GNUNET_CRYPTO_hash (pss->recovery_data,
+ pss->recovery_data_size,
+ &pss->curr_hash);
-
++
pss->pso = ANASTASIS_policy_store (is->ctx,
pss->anastasis_url,
&pss->anastasis_priv,
--
To stop receiving notification emails like this one, please contact
address@hidden.