[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: fixed recovery test
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: fixed recovery test |
Date: |
Thu, 14 May 2020 16:12:12 +0200 |
This is an automated email from the git hooks/post-receive script.
ds-meister pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new cf8800b fixed recovery test
cf8800b is described below
commit cf8800b8cd2b212ff66e52dfb4eb64804ad26af5
Author: Dominik Meister <address@hidden>
AuthorDate: Thu May 14 16:12:04 2020 +0200
fixed recovery test
---
src/lib/anastasis.c | 28 ++++++++++++++++++++--------
src/lib/testing_cmd_challenge_answer.c | 4 ----
src/lib/testing_cmd_recover_secret.c | 2 ++
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index aab9438..263c182 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -344,6 +344,8 @@ keyshare_lookup_cb (void *cls,
if (success != UINT_MAX)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "At %s:%d policy was solved \n", __FILE__, __LINE__);
void *core_secret;
size_t core_secret_size;
struct ANASTASIS_CRYPTO_KeyShareP
@@ -354,10 +356,17 @@ keyshare_lookup_cb (void *cls,
{
for (unsigned int m = 0; m < c->recovery->solved_challenge_pos; m++)
{
- if (0 == uuid_compare (c->recovery->ri->dps[l].escrow_uuids[m],
+ if (0 == uuid_compare (c->recovery->ri->dps[success].escrow_uuids[l],
c->recovery->solved_challenges[m].challenge_uuid))
{
key_shares[l] = *c->recovery->solved_challenges[m].key_share;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "At %s:%d keyshare added %s-%llu at position %x b\n",
+ __FILE__, __LINE__,
+ TALER_B2S (&key_shares[l]),
+ (unsigned long long) sizeof (c->key_share),
+ l);
+
}
}
}
@@ -402,10 +411,6 @@ ANASTASIS_challenge_answer (struct GNUNET_CURL_Context
*ctx,
ANASTASIS_AnswerFeedback af,
void *af_cls)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "At %s:%d we are here 2 \n", __FILE__, __LINE__);
-
-
c->af = af;
c->ctx = ctx;
c->af_cls = af_cls;
@@ -681,7 +686,7 @@ policy_lookup_cb (void *cls,
buf[36] = '\0';
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d buf is %s\n", __FILE__, __LINE__,
- &buf);
+ buf);
GNUNET_assert (0 ==
uuid_parse (buf,
r->ri->dps[j].escrow_uuids[a]));
@@ -1071,9 +1076,16 @@ ANASTASIS_truth_upload (struct GNUNET_CURL_Context *ctx,
"At %s:%d truth key is %s-%llu b\n", __FILE__, __LINE__,
TALER_B2S (&t->truth_key),
(unsigned long long) sizeof (t->truth_key));
+
+
+ struct GNUNET_HashCode hashed_answer;
+ GNUNET_CRYPTO_hash (truth_data,
+ truth_data_size,
+ &hashed_answer);
+
ANASTASIS_CRYPTO_truth_encrypt (&t->truth_key,
- truth_data,
- truth_data_size,
+ &hashed_answer,
+ sizeof(hashed_answer),
&encrypted_truth,
&encrypted_truth_size);
diff --git a/src/lib/testing_cmd_challenge_answer.c
b/src/lib/testing_cmd_challenge_answer.c
index 441e500..7dd4659 100644
--- a/src/lib/testing_cmd_challenge_answer.c
+++ b/src/lib/testing_cmd_challenge_answer.c
@@ -115,10 +115,6 @@ challenge_answer_run (void *cls,
}
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "At %s:%d we are here 1 \n", __FILE__, __LINE__);
-
- // FIXME IS THIS ALLOWED ?
ANASTASIS_challenge_answer (is->ctx,
(struct ANASTASIS_Challenge *) c,
cs->answer,
diff --git a/src/lib/testing_cmd_recover_secret.c
b/src/lib/testing_cmd_recover_secret.c
index 3778c3d..3cd6d6d 100644
--- a/src/lib/testing_cmd_recover_secret.c
+++ b/src/lib/testing_cmd_recover_secret.c
@@ -108,6 +108,8 @@ core_secret_cb (void *cls,
const void *secret,
size_t secret_size)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "At %s:%d arrived at core secret cb \n", __FILE__, __LINE__);
struct RecoverSecretState *rss = cls;
if (0 != memcmp (secret, rss->core_secret, secret_size))
{
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: fixed recovery test,
gnunet <=